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

Prevent build executions for commits that contain specific commit message or changes #370

Open
ljackiewicz opened this issue Oct 20, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@ljackiewicz
Copy link
Contributor

What feature do you want to see added?

Git plugin implements behaviours (traits) that prevent to run builds for commits that contain specific commit message ("Polling ignores commits with certain messages", MessageExclusion) or contain changes of specific files ("Polling ignores commits in certain paths", PathRestriction).

Is it possible to add similar behaviour to GitLab Branch Source plugin? If so, what is the easiest way to achieve this?

Upstream changes

No response

@ljackiewicz ljackiewicz added the enhancement New feature or request label Oct 20, 2023
@gordin123
Copy link

gordin123 commented Oct 20, 2023

Currently, it does not seem that these traits exist for gitlab-branch-source.
Triggering only when changes to specific files in the repo is possible using the "Build included regions" strategy from "Pipeline: Multibranch build strategy extension" plug-in. This has several drawbacks, though:

  • the strategies only apply when triggered by the webhook, not on a new scan (don't know if this a bug in gitlab-branch-source/Multibranch build strategy extension or if this is the expected behaviour)
  • the extension was a little bit unreliably in our setup, triggering the build even if the "region" was not changed
  • for some of the strategies an actual checkout is required. So they are not working for number 1 builds. I think this is not an issue with the "Build included regions", though. Only for other strategies like "Cancel ci by ignore file"

@jonasgroenke
Copy link
Contributor

There is another gitlab plugin that, has this option (ciSkip) and a lot more options for the webhooks.
Unfortunately it's not supporting merge requests for multibranch pipelines.

This is the description of ciSkip:

If enabled, then the build will be skipped when a GitLab comment includes the text ci-skip.

Personally, I don't understand why it's not supporting merge requests for multibranch pipelines, because it looks like the hook only must be delegated to the source branch of the merge request.

It would be cool if only one plugin handled the webhooks, not two plugins with half of the functionality.

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

No branches or pull requests

3 participants