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

Removing triggers block does not remove triggers from config.xml

XMLWordPrintable

      Create a pipeline with the following configuration and run the job.

      pipeline {
          agent {
              label 'my_label'
          }
      
          triggers {
              upstream upstreamProjects: 'upstream', threshold: hudson.model.Result.SUCCESS
          }
      
          options{
              timestamps()
          }
      
          stages {
              stage('build') {
                  steps {
                      echo 'building'
                  }
              }
          }
      

      Create another job (upstream) in the same folder and run it (should see original pipeline is triggered).

      Remove triggers from original pipeline, rerun it (to ensure a new config.xml could be generated)

      Rerun upstream job

      The second run should trigger the pipeline job. What I've done in the past to workaround this is to put in a bogus upstream job in triggers to force a rewrite of config.xml.

            abayer Andrew Bayer
            rpocase Robby Pocase
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: