I\'ve a group of multibranch pipeline jobs generated with the following piece groovy script:
[
\'repo1\',
\'repo2\',
].each { service ->
multib
I found this very useful Setup Example (Continuous Integration with Jenkins and GitLab) . Especially the part Source Code management:
We need to specify the name as “origin”, which will be used by the other sections. For the Refspec we need to input:
+refs/heads/*:refs/remotes/origin/* +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/*
And also:
Branch Specifier we need
origin/${gitlabSourceBranch}
which will be filled in based on the web hook we’ll be setting up next.
Edit1
You could try the following for one multibranch pipeline:
ci
ci
Edit2
I could not find a suitable git-project to run and try to reproduce this behaviour. So if someone know a similar project and could share, please comment and I could do some more testing.
For Gitlab (requested a trial key, otherwise it will be a GitLab Community Edition):
sudo docker run --detach --hostname gitlab.example.com --publish 443:443 --publish 80:80 --publish 22:22 --name gitlab --restart always --volume /srv/gitlab/config:/etc/gitlab --volume /srv/gitlab/logs:/var/log/gitlab --volume /srv/gitlab/data:/var/opt/gitlab gitlab/gitlab-ee:11.8.1-ee.0
For Jenkins:
sudo docker run -u root --rm -d -p 8080:8080 -p 50000:50000 -v jenkins-data:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock jenkins/jenkins:2.150.3
Then "Integration" —> "Jenkins CI" in Gitlab as in this image:
Hope this can help you!