Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The project is not enabled for Jenkins. Missing .jenkins file. #27

Closed
pmartindev opened this issue Oct 17, 2018 · 5 comments
Closed

The project is not enabled for Jenkins. Missing .jenkins file. #27

pmartindev opened this issue Oct 17, 2018 · 5 comments

Comments

@pmartindev
Copy link

pmartindev commented Oct 17, 2018

I have a workspace with the following directory structure:

Programming
    Github
        mydatabaseinstance
            .jenkins
            Jenkinsfile
            provision.template

When I open the provision.template file in the editor, and run the Jenkins: Update Status command, I get the following errror:

The project is not enabled for Jenkins. Missing .jenkins file.

@alefragnani
Copy link
Owner

Hi @pmartindev

Is .jenkins a file or folder/directory? The extension expects a .jenkins file in the root folder of the opened project, with this minimal info:

{
    "url": "http://127.0.0.1:8080/job/myproject"
}

Hope this helps

@pmartindev
Copy link
Author

Hi @alefragnani, thank you for the response! Currently, .jenkins is a file located within the root of my github repository. Not sure if that is what you mean by an "opened project". I have a workspace named Programming, and a folder under that named Github for all of my Github projects. The project mydatabaseinstance is the name of the project that I have a Jenkins pipeline created for. My .jenkins file looks as such.

{
"url": "https://jenkins.mywebsite.io/job/(TESTING)mydatabaseinstance/",
"username": "pmartindev",
"password": "mypassword"
}

@alefragnani
Copy link
Owner

Hi @pmartindev ,

The .Jenkins file needs to be at the root folder of the opened project (the folder that you open in VS Code). So, in order for the extension to work properly, you have to open mydatabaseinstance folder in VS Code, otherwise, it won't work.

If I did understand correctly, you opened Programming in VS Code, so that appears to be the reason for the error message.

Is this your scenario?

@pmartindev
Copy link
Author

pmartindev commented Oct 26, 2018

Yep, I opened just the mydatabaseinstance folder and it worked, thanks! Is this how most people use the plugin? To me, most developers seem to have multiple repositories checked out into one workspace/folder and would want the status of each build for repository of each project. Maybe an option in the .jenkins file could be something like rootDirectory: where the user could specify where the root directory of the project the .jenkins file references.

@alefragnani
Copy link
Owner

Good to know it worked 🎉

The reason for this model is commented here, and the issue is opened, to change the behavior. Feel free to upvote #9 so I could identify which features are more important

Hope this helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants