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

Support [ci-skip] flag #60

Closed
p0deje opened this issue May 18, 2013 · 13 comments
Closed

Support [ci-skip] flag #60

p0deje opened this issue May 18, 2013 · 13 comments

Comments

@p0deje
Copy link
Contributor

p0deje commented May 18, 2013

Something like Travis CI supports. You can add [ci skip] to commit message and build will not be triggered for this commit.

P.S. Thanks for awesome plugin!

@kristianfreeman
Copy link

I'd love to see this as well.

@valdisrigdon
Copy link
Collaborator

Patches would be welcome for this feature.

@ShonM
Copy link

ShonM commented Mar 27, 2014

There is a jenkins-skip-ci plugin, however GHPRB assumes NOT_BUILT is a failure

@valdisrigdon
Copy link
Collaborator

@ShonM @imkmf what's the behavior you'd like to see? Right now when we start a build, we toss a "PENDING" status on the commit. The jenkins-skip-ci plugin is implemented as a BuildWrapper, so the build is technically started before it's halted by the plugin.

Some options:

  • make ghprb aware of the "skip-ci" plugin and delay setting a commit status until we really know that it's building. The downside here is that the PENDING status will never be set.
  • map NOT_BUILD to something other than FAILURE, but I'm not sure what the right status is

@ShonM
Copy link

ShonM commented Apr 1, 2014

I would love if GHPRB didn't build when [skip ci] was present, if that's at all possible. Could pending be set later, instead of immediately when a job is queued? I'm not sure I can see the whole process in my head but that sounds like it would be ok to me. Then it's only pending when the job starts actually building. That could mean it's queued, but the status is not pending. That would be ok with me, our Jenkins instance usually powers through jobs quickly enough that wouldn't cause issues

@valdisrigdon
Copy link
Collaborator

I'm starting to think that a SUCCESS status is a better choice. If a user puts in [skip ci], then they would expect that it would build successfully, and not fail. I can explain that easier than I can a FAILURE, and it keeps the idea that ghprb updates the status API as often as it can.

Thoughts?

@ShonM
Copy link

ShonM commented Apr 1, 2014

That might work. Could it be configurable?

@p0deje
Copy link
Contributor Author

p0deje commented Oct 30, 2014

This is now implemented in https://github.com/jenkinsci/ghprb-plugin

@p0deje p0deje closed this as completed Oct 30, 2014
@shehzan10
Copy link

I've been trying to get [skip ci] to make GHPRB skip the PR. However, I am yet to see a build get skipped. I have tried putting this phrase in the PR description (with other text) and in the comments but neither seem to work. What is the best place to put this phrase? Is there a PR I can see that used this feature?

@DavidTanner
Copy link
Collaborator

The default regex is .[skip\W+ci]., so if it has't been changed in your config then if you add [skip ci] anywhere in your comments the plugin will ignore it. Check your config and verify it what the actual regex is though in the job config page under advanced.

@shehzan10
Copy link

.[skip\W+ci]. is what I have (the default one) both in the main config as well as the job config. Unfortunately this doesn't seem to work. I've tried putting it in the merge header as well without success. I'll try poking around to see if I see any problems elsewhere.

@DavidTanner
Copy link
Collaborator

Looking at the code, the plugin will only skip the build if the comment is in the main PR comments
https://github.com/jenkinsci/ghprb-plugin/blob/ghprb-1.22.4/src/main/java/org/jenkinsci/plugins/ghprb/GhprbPullRequest.java#L115

@shehzan10
Copy link

Thanks for that. I'll try it out.

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

No branches or pull requests

6 participants