简体   繁体   中英

Jenkins and GitLab CI integration with Multibranch and individual pipelines

I am testing a Jenkins CI/CD method. There is a single git repo with a Master branch, a QA branch, and a Dev branch. There are also many individual developer and feature branches that get merged into dev. The dev branch gets merged up to qa and qa up to master.

I have a jenkins environment using the gitlab-plugin where there is a folder containing a multibranch pipeline that runs the jenkinfiles in the developer/feature branches on any commit. It ignores the master, dev, and qa branches. In the folder is also 4 pipelines, 3 of which handle merge requests per each of the main branches. The fourth one is simply a deploy script for the master.

The issue is that GitLab's commit status for merge requests refuses to work when the multibranch pipeline is there. The CI tag just says can not connect to CI service after a merge request is submitted. However, if I remove the multibranch pipeline, the CI status tag immediately starts working.

Note that the builds are all still running fine in Jenkins, its simply gitlabs status tags that are the issue.

Any ideas on how to fix this?

edit: as I was reading this after submitting I realized how dumb it is to have 3 pipelines for merge requests, its only 1 now that handles all 3 branches

Turns out that gitlab was broken and doesn't support extension pipelines well. Additionally, I was incorrectly correlating the multibranched pipelines. This error would be fixed in the immediate next patch from this date (9.3.3)

See merge at https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12478

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM