Closed LahariGuntha closed 6 years ago
Here my branch is "svcdev"...I want to trigger a job only when the change is pushed to "svcdev" branch only...I also have other branches...like svcdev1,master etc...Job should not be trigerred when the change is pushed to master or "svcdev1" branch
Could someone please look into this Issue??
It appears that branch cannot be found. Check the job settings under the Source Code Management section in Jenkins to confirm you have the correct repo URL, name, etc. There are several dependent settings that could be relevant here. I had a similar issue and ended up filtering the branch name via regex which also helped.
@LahariGuntha yes, please double-check your git SCM settings as @karlgb suggested. If they are definitely OK, please try the regex filter instead of branch name filter and let me know if that works. If so there may be a bug in the branch name filtering. Thanks.
Hi,
I have the following below configuration: I have created a "Pipeline" project.
So I have the below configuration:
I have given the name to the pipeline...and have passed some parameters to the build...
I have tried "Filter by Branch"...But it was not working... So I thought of trying "Filter by Regular Expression": I have "Regular Expression"
(.
I have created "Access Token" in Gitlab and added it here...as shown below..
Here is my final config:
I have given my Git URL...Branches to build...
Now...even when I change my code in master then also the build is getting triggered. Should there be any change in my Jenkins configuration???
Even "Filter by Regex" is not working here..
@LahariGuntha for one thing, your access token is set up incorrectly. You do not want to check "trigger builds from scripts." You want to enter the access token in the Jenkins Credentials interface. Please re-read the README for the steps on how to do that. However that API key is only needed for sending build status back to GitLab. It is unrelated to the branch filtering issue.
Can you share your pipeline code where you actually clone the git repo? The plugin will show an error for a branch name filter before the first time the job is run, because it does not yet know what branches exist in the repo.
Hi,
I just removed the "Trigger builds from scripts" and I used "Regex" ..Now it is working.. Thanks for the Support
Hi,
I want to trigger a job in Jenkins whenever there is a code change that is pushed to a branch...Not master or any other branches... I was trying to Use Gitlab plugin of version-1.5.4... My jenkins is of version - 2.46.3 Job Type-Pipeline
But it is throwing Error like :