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

Show job link and charts even if latest build does not contain results

      I have a build that in some cases is avoided - logs are not produced.

      I would like to be able to compensate reports generation, so no matter if new results are collected, the graph and links are displayed. Currenly only a build that records issues is showing both of those.

      I tried to compensate it by generating report with empty issues collection but then the graph drops to 0

       

      Example - every second build generates report:

      pipeline {
          agent any
          stages {
              stage ('recordIssues') {
                  when { expression { env.BUILD_NUMBER.toBigInteger().mod( 2 ) == 0 } }
                  steps {
                      recordIssues(
                          tools: [
                              intel(pattern: "logs\\**\\*.*"), 
                          ]
                      )
                  }
              }        stage ('compensate') {
                  when { expression { env.BUILD_NUMBER.toBigInteger().mod( 2 ) != 0 } }
                  steps {
                      echo "don't know how..."
                  }
              }
          }    
      }
      

          [JENKINS-57636] Show job link and charts even if latest build does not contain results

          Ulli Hafner added a comment -

          Which links do you mean? The link on the job page or on the build page?

          Ulli Hafner added a comment - Which links do you mean? The link on the job page or on the build page?

          on the job page

          Jakub Pawlinski added a comment - on the job page

          Ulli Hafner added a comment -

          I'm not sure if this is technically possible as the action that shows the links and the trend is created within the action of the build results. If there is no action for a build this does not work. Maybe we should have a flag in recordIssues that creates an empty build action.

          Ulli Hafner added a comment - I'm not sure if this is technically possible as the action that shows the links and the trend is created within the action of the build results. If there is no action for a build this does not work. Maybe we should have a flag in recordIssues that creates an empty build action.

          possibility of empty build action would do just right

          Jakub Pawlinski added a comment - possibility of empty build action would do just right

            Unassigned Unassigned
            quas Jakub Pawlinski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: