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

SCM Skip could use an option to not skip manual builds

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • scmskip-plugin
    • None
    • Latest Jenkins LTS and SCM Skip v1.0.1

      It sure would be nice if the SCM Skip plugin had an option to not skip builds that were manually triggered by a user. Currently, my declarative pipeline has to do:

      script {
        if ( currentBuild.getBuildCauses('hudson.model.Cause$UserIdCause').size() > 0 ) {
          scmSkip(deleteBuild: true, skipPattern: '.*\\[(ci skip|skip ci)\\].*')
        }
      }
      

      ... which is a lot uglier than with this hypothetical feature:

      scmSkip( alsoSkipManualBuilds: false, deleteBuild: true, 
        skipPattern: '.*\\[(ci skip|skip ci)\\].*')
      

      Note that I called it "alsoSkipManualBuilds" to avoid a double-negative; obviously the default should be current behavior, if you care.

            plavc Gregor PlavĨak
            bryceman Bryce Schober
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: