Issue
I have a branch with example Jenkinsfile
on Bitbucket. I have Jenkins
installed on my linux box. I can create projects via web interface. Particularly, I can specify Freestyle project
and inside it I can specify branch. I can add build steps on web interface and it will checkout branch and execute steps. But it will take it from web interface, not from Jenkinsfile
.
Or I can create Pipeline
type of project. In this case I am unable to specify branch, only repository URL
. If I run the project, it doesn't even checkout.
How to activate Jenkinsfile
?
Solution
You should add the Git Parameter Jenkins plugin, which will allow you to specify the branch to build in your Pipeline project.
That way, you can associate your Jenkinsfile to the right branch to build.
Answered By - VonC
Answer Checked By - Gilberto Lyons (JavaFixing Admin)