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

archiveArtifacts produces an empty/erroneous log for Blue Ocean

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Duplicate
    • blueocean-plugin
    • None
    • Jenkins 2.19.1, Blue Ocean 1.0.0-b08

    Description

      See screenshots, for the following snippet of a Jenkinsfile

      def isPullRequest = !!(env.CHANGE_ID)
      
      node('docker') {
          stage('Checkout') {
              checkout scm
              sh 'git rev-parse HEAD > GIT_COMMIT'
              String shortCommit = readFile('GIT_COMMIT').take(6)
          }
      
          timestamps {
              stage('Generate Plugin Data') {
                  docker.image('maven').inside {
                      sh 'mvn -PgeneratePluginData'
                  }
              }
      
              /*
               * Running everything within an nginx container to provide the
               * DATA_FILE_URL necessary for the build and execution of the docker
               * container
               */
              docker.image('nginx:alpine').withRun('-v $PWD/target:/usr/share/nginx/html') { c ->
      
                  /*
                   * Building our war file inside a Maven container which links to
                   * the nginx container for accessing the DATA_FILE_URL
                   */
                  stage('Build') {
                      docker.image('maven').inside("--link ${c.id}:nginx") {
                          withEnv([
                              'DATA_FILE_URL=http://nginx/plugins.json.gzip',
                          ]) {
                              sh 'mvn -B -Dmaven.test.failure.ignore verify'
                          }
                      }
      
                      /** archive all our artifacts for reporting later */
                      junit 'target/surefire-reports/**/*.xml'
                      archiveArtifacts archives: 'target/**/*.war', fingerprint: true
                  }
           }
      }
      

      I watched this build in karoake mode and it was green when the junit step executed, and then when the archiveArtifacts executed it turned red.

      The log:at http://blackberry:8080/blue/rest/organizations/jenkins/pipelines/Experiments/plugin-site/branches/full-docker/runs/3/nodes/28/steps//40/log/ is an empty 200.

      Attachments

        1. empty-log.png
          empty-log.png
          182 kB
        2. oops.png
          oops.png
          23 kB
        3. stage-view.png
          stage-view.png
          167 kB
        4. wat.png
          wat.png
          59 kB
        5. wat-console-output.png
          wat-console-output.png
          57 kB

        Issue Links

          Activity

            rtyler R. Tyler Croy added a comment -

            The step in the screenshots is still in progress and shows red. So the combination of no log output and a red step makes the execution appear to be totally broken when really it's still executing.

            rtyler R. Tyler Croy added a comment - The step in the screenshots is still in progress and shows red. So the combination of no log output and a red step makes the execution appear to be totally broken when really it's still executing.
            michaelneale Michael Neale added a comment -

            201604291_tyler got it - so the end result is ok IF there was a log. And in progress would be ok IF there was a log - fair to say? If so, I think we have enough to go on here.

            michaelneale Michael Neale added a comment - 201604291_tyler got it - so the end result is ok IF there was a log. And in progress would be ok IF there was a log - fair to say? If so, I think we have enough to go on here.
            michaelneale Michael Neale added a comment -

            Beaten my head bloody trying to repro or understand this for hours. Booking a hangout.

            michaelneale Michael Neale added a comment - Beaten my head bloody trying to repro or understand this for hours. Booking a hangout.
            michaelneale Michael Neale added a comment -

            Triaged this - finally.

            Was able to reproduce the abort oddness with a wonky pipeline here:
            https://issues.jenkins-ci.org/browse/JENKINS-39133

            and the general problem is missing logs as described here:
            https://issues.jenkins-ci.org/browse/JENKINS-38759

            There is also oddness with docker+pipeline getting all confused. artifact archiving doesn't seem to return a log when running like this nor does it show up afterwards (same as in stage view) so may find another ticket for that specific issue (probably not blue ocean related).

            There may be other things we come across as part of these.

            michaelneale Michael Neale added a comment - Triaged this - finally. Was able to reproduce the abort oddness with a wonky pipeline here: https://issues.jenkins-ci.org/browse/JENKINS-39133 and the general problem is missing logs as described here: https://issues.jenkins-ci.org/browse/JENKINS-38759 There is also oddness with docker+pipeline getting all confused. artifact archiving doesn't seem to return a log when running like this nor does it show up afterwards (same as in stage view) so may find another ticket for that specific issue (probably not blue ocean related). There may be other things we come across as part of these.
            michaelneale Michael Neale added a comment -

            just moved some details to that ticket to remove the chatter

            michaelneale Michael Neale added a comment - just moved some details to that ticket to remove the chatter

            People

              Unassigned Unassigned
              rtyler R. Tyler Croy
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: