Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gitlab: Pipelines must succeed option with GOCD #283

Open
Janailtongp opened this issue Oct 14, 2024 · 2 comments
Open

Gitlab: Pipelines must succeed option with GOCD #283

Janailtongp opened this issue Oct 14, 2024 · 2 comments

Comments

@Janailtongp
Copy link

Hi everyone,

How to use: Settings > Merge checks > Pipelines must succeed option with GOCD?

Already received the pipeline result from gocd plugin for the commits, but the merge request checks not works. If "Pipelines must succeed" option is checked, the "Checking pipeline status" keeps in infinit loading.

I imagine it is due to the lack of the .gitlab-ci.yml file, but I don't know how to use it together with gocd.

Any idea how it would work?

@chadlwilson
Copy link
Contributor

It possibly only works with GitLab CI, not an external tool using the API. You probably need to check the GitLab documentation or ask their support whether it works with non GitLab CI tools?

@chadlwilson
Copy link
Contributor

https://docs.gitlab.com/ee/user/project/merge_requests/auto_merge.html#require-a-successful-pipeline-for-merge does say

You can configure your project to require a complete and successful pipeline before merge. This configuration works for both:

However GoCD does not have a dedicated integration so it's unclear to me whether that works just for something like this plugin, which only updates the pipeline status of a commit, but is maybe not known as a "pipeline" to Gitlab: https://docs.gitlab.com/ee/api/commits.html#set-the-pipeline-status-of-a-commit

It notes

This setting also prevents merge requests from merging if there is no pipeline_" which possibly means Gitlab itself needs to know there is a pipeline.

and

A merge request with no pipelines at all is not considered to have a successful pipeline, and cannot merge.

Can you share a (redacted) screenshot of what an MR and the commits on it look like for you when you think it should allow the 'Pipelines must succeed' check to continue?

It also probably depends on how you have configured GoCD to actually run the build off your merge requests. Are you using a manually created pipeling, or something like https://github.com/ashwanthkumar/gocd-build-github-pull-requests ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants