Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-47643

Allow [ci skip] to work for non-pull request changes

      the README for version 0.1.1 of https://plugins.jenkins.io/bitbucket-scm-trait-commit-skip indicates, in the Description, that "The filtering is only performed at change requests events, so push events to non-pull requests will be always run."

      it would be totally amazing and make my day if this functionality applied equally to non-pull request changes (we never build pull requests).

      i assigned it to you, javier, just to make sure you'd see it. please feel free to detach yourself.

          [JENKINS-47643] Allow [ci skip] to work for non-pull request changes

          Just for the record: I have finally started working on it.
          Still untested, Github associated feature seems to be easy, from the provided API, to implement. OTOH, BitBucket API seems its missing some bolts (so might slow everything a bit)

          Javier Delgado added a comment - Just for the record: I have finally started working on it. Still untested, Github associated feature seems to be easy, from the provided API, to implement. OTOH, BitBucket API seems its missing some bolts (so might slow everything a bit)

          Kevin Burnett added a comment -

          you are a hero.

          Kevin Burnett added a comment - you are a hero.

          kburnett, marbon and dbsanfte, could you test the opened pull request artifacts? Both hpi files found at https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fscm-trait-commit-skip-plugin/detail/feature%2FskippingBranches/1/artifacts (github and bitbucket) implement filtering branches on both [skip-ci] and [ci-skip] committed messages

          Javier Delgado added a comment - kburnett , marbon and dbsanfte , could you test the opened pull request artifacts? Both hpi files found at https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fscm-trait-commit-skip-plugin/detail/feature%2FskippingBranches/1/artifacts (github and bitbucket) implement filtering branches on both [skip-ci] and [ci-skip] committed messages

          Forgot to say that for testing this on bitbucket, another incrementals dependency must be manually installed (hpi from https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fbitbucket-branch-source-plugin/detail/PR-145/7/artifacts)

          Needless to say that these are developments versions ans should be installed (desireably) on a test Jenkins instance

          Javier Delgado added a comment - Forgot to say that for testing this on bitbucket, another incrementals dependency must be manually installed (hpi from https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fbitbucket-branch-source-plugin/detail/PR-145/7/artifacts ) Needless to say that these are developments versions ans should be installed (desireably) on a test Jenkins instance

          Kevin Burnett added a comment -

          i got the dependent plugin from https://repo.jenkins-ci.org/incrementals/org/jenkins-ci/plugins/cloudbees-bitbucket-branch-source/2.2.13-rc440.a1f1e6c1d925/, tested it out with jasquat, and it works as designed. in our context, the fact that the branch is tagged excluded and therefore deleted by the orphaned item strategy (exactly as witokondoria said it would be) actually is a dealbreaker. we are very excited about this feature, but i think we need to wait for JENKINS-45502 to be implemented so that "ci skip" can be implemented without this side effect (FYI, stephenconnolly / jamesdumay).

          two additional notes:

          • you need to specify "ci skip" without the hyphen
          • when you specify behaviours, there are now two called "Commit message filtering behaviour" (one for pull requests and one for branches). they should probably have different names. see screenshot below.

          thanks a ton, witokondoria.

          Kevin Burnett added a comment - i got the dependent plugin from https://repo.jenkins-ci.org/incrementals/org/jenkins-ci/plugins/cloudbees-bitbucket-branch-source/2.2.13-rc440.a1f1e6c1d925/ , tested it out with jasquat , and it works as designed. in our context, the fact that the branch is tagged excluded and therefore deleted by the orphaned item strategy (exactly as witokondoria said it would be) actually is a dealbreaker. we are very excited about this feature, but i think we need to wait for JENKINS-45502 to be implemented so that "ci skip" can be implemented without this side effect (FYI, stephenconnolly / jamesdumay ). two additional notes: you need to specify "ci skip" without the hyphen when you specify behaviours, there are now two called "Commit message filtering behaviour" (one for pull requests and one for branches). they should probably have different names. see screenshot below. thanks a ton, witokondoria .

          Certainly, the expected tokens doesnt contain hypens (á la circleci - https://circleci.com/docs/2.0/skip-build/)
          There is another PR, still unreviewed, to allow a regexp (instead of such fixed tokens).
          Will fix the behaviour names so they differ
          The outcome of JENKINS-45502 will indeed alter how the skipping is performed. Nevertheless, giving the ticket priority and activity, I wouldnt foresee it to receive work mid-term.

          Javier Delgado added a comment - Certainly, the expected tokens doesnt contain hypens (á la circleci - https://circleci.com/docs/2.0/skip-build/ ) There is another PR, still unreviewed, to allow a regexp (instead of such fixed tokens). Will fix the behaviour names so they differ The outcome of JENKINS-45502 will indeed alter how the skipping is performed. Nevertheless, giving the ticket priority and activity, I wouldnt foresee it to receive work mid-term.

          witokondoria any updates on this. We are really looking forward to this feature...

          Alex Simenduev added a comment - witokondoria any updates on this. We are really looking forward to this feature...

          This should be included on the 0.2.0 released plugin. Should appear at the update center shortly.

          Could you provide feedback, in order to close this ticket?

          Javier Delgado added a comment - This should be included on the 0.2.0 released plugin. Should appear at the update center shortly. Could you provide feedback, in order to close this ticket?

          Thanks a lot witokondoria. Works as expected!

          Alex Simenduev added a comment - Thanks a lot witokondoria . Works as expected!

          Tom Kiemes added a comment -

          witokondoria sorry to bother, but was this developed just for Bitbucket or also for GitHub?

          I am using version 0.4.0 of "GitHub Commit Skip SCM Behaviour" plugin on a Jenkins connected to GitHub Enterprise and my configuration looks as follows:

          • GitHub Organisation project
          • Build strategies (in this order; not sure if the order is important here):
            • Change requests
            • Regular branches
            • Skip build trigger if commit message contains
              • Pattern : skip

          The documentation still states, that "The filtering is only performed for change request events, so push events to non-pull requests will be always run". But the same sentence is still in the doc for BitBucket and as far as I understand the discussion, this is working?

          Any help would be appreciated.

          Best regards, Tom

          Tom Kiemes added a comment - witokondoria sorry to bother, but was this developed just for Bitbucket or also for GitHub? I am using version 0.4.0 of "GitHub Commit Skip SCM Behaviour" plugin on a Jenkins connected to GitHub Enterprise and my configuration looks as follows: GitHub Organisation project Build strategies (in this order; not sure if the order is important here): Change requests Regular branches Skip build trigger if commit message contains Pattern : skip The documentation still states, that "The filtering is only performed for change request events, so push events to non-pull requests will be always run". But the same sentence is still in the doc for BitBucket and as far as I understand the discussion, this is working? Any help would be appreciated. Best regards, Tom

            witokondoria Javier Delgado
            kburnett Kevin Burnett
            Votes:
            6 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: