Jenkins ignores Jenkinsfile

Viewed 177

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?

1 Answers

You should add the Git Parameter Jenkins plugin, which will allow you to specify the branch to build in your Pipeline project.

https://wiki.jenkins.io/download/attachments/58917601/image2018-9-20_22-0-7.png?version=1&modificationDate=1537473611000&api=v2

That way, you can associate your Jenkinsfile to the right branch to build.

Related