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

Aborting a build can result in an UNKNOWN stage state

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • blueocean-plugin
    • None
    • pannonian

      This is not easy to reproduce (usually if you have a long running archive you can see it sometimes).

      Using the script below may help.
      To reproduce:

      • run pipeline
      • Notice it sites in the build stage for a while
      • Press stop button when in this state
      • Note that the build stage goes purple vomit colour

      Expected behavior:

      • Should just go red, not purple vomit.

      Pipeline:

      
      node {
          stage('Checkout') {
              sh "echo 42"        
              
      
          }
      
          
          stage('Generate Plugin Data') {
              docker.image('cloudbees/java-build-tools').inside {
                  sh 'echo 42'
              }
          }
          
                  stage('Build') {
                      docker.image('cloudbees/java-build-tools').inside {
                          withEnv([
                              'DATA_FILE_URL=http://nginx/plugins.json.gzip',
                          ]) {
                              sh 'echo foo > smeg.txt'
                          }
                      }
      
                      /** archive all our artifacts for reporting later */
                      archiveArtifacts archives: '*.txt', fingerprint: true
                  }
          
      
      }
      

            vivek Vivek Pandey
            michaelneale Michael Neale
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: