I have made some changes on my Jenkinsfile and I want to test the new Jenkins pipeline before delivery.
I did commit my changes on a feature branch but when I run the Jenkins pipeline it is definetely not running the version commited on my feature branch.
See the logs below:
Obtained Jenkinsfile from git https://bitbucket-xxx.y.zzz/myrepo/myfolder/my-api.git
[Pipeline] Start of Pipeline
....
Logs do not show which branch is checked out.
EDIT: I added a branch specifier in the branch to build section And it worked ! Thanks @unickq your answer led me to do this
Jenkinsfile loaded from master/main branch by default.
To test it you need to change Branches to build
in job configuration section. Or manually set the pipeline script there.