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

The plugin is not able to read job name

XMLWordPrintable

      I have created a project using Pipeline locally.

      The project just runs some Junit tests. When I add aggregator plugin as post build action to generate reports. It gives error that job not found.

      Pipeline config:

      pipeline {
          agent any
          stages {
              stage('Build') {
                  steps {
                      echo sh(script: 'env|sort', returnStdout: true)
                      // Get some code from a GitHub repository
                      git '<repo url>'
                      // Run Maven on a Unix agent.
                      sh "mvn clean compile test"
                      // To run Maven on a Windows agent, use
                      // bat "mvn -Dmaven.test.failure.ignore=true clean package"
                  }
                  post {
                      // If Maven was able to run the tests, even if some of the test
                      // failed, record the test results and archive the jar file.
                      always {
                         // sh "mvn site"
                          junit allowEmptyResults: true, keepLongStdio: true, skipMarkingBuildUnstable: true, testResults: '**/target/surefire-reports/TEST-*.xml'
                          // archiveArtifacts 'target/*.jar'
                          testResultsAggregator afterbody: 'Thanks',
                              beforebody: 'Test',
                              columns: 'Job, Status, Percentage, Total, Pass, Fail, Skip',
                              compareWithPreviousRun: true,
                              jobs: [[jobFriendlyName: 'Testing', jobName: 'Tesr']],
                              data: [[groupName: 'My Group', jobs: [[jobFriendlyName: 'Testing', jobName: 'Tesr']]]],
                              ignoreAbortedJobs: false,
                              ignoreDisabledJobs: false,
                              ignoreNotFoundJobs: false,
                              ignoreRunningJobs: false,
                              outOfDateResults: '', recipientsList: 'vikrang@thoughtworks.com', recipientsListBCC: 'vikrang@thoughtworks.com', recipientsListCC: 'vikrang@thoughtworks.com', recipientsListIgnored: 'meetvikrant@gmail.com', sortresults: 'NAME', subject: 'Test reports', theme: 'light'
                      }
                  }
              } 
      

      JENKINS_URL=http://localhost:8080/
      JENKINS_VERSION=2.332.3
      JOB_BASE_NAME=Tesr
      JOB_DISPLAY_URL=http://localhost:8080/job/Tesr/display/redirect
      JOB_NAME=Tesr
      JOB_URL=http://localhost:8080/job/Tesr

      Recording test results 
      [Checks API] No suitable checks publisher found. 
      [Pipeline] testResultsAggregator 
      Starting Aggregate Test Results Action 
      Collecting Data from Jenkins Job with name 'Tesr'  ...Job Not Found
      Analyze .. Finished 
      Generate XML Report...Finished XML Report 
      Generate HTML Report...Finished HTML Report 
      Generate HTML Report...Finished HTML Report 
      Generate Email Report 
      No mail will be Send since all Jobs are having status  'NOT FOUND'.
      Generate Email Report 
      No mail will be Send since all Jobs are having status  'NOT FOUND'.
      Finished Aggregate Test Results Action
      

        1. image-2022-05-15-18-35-15-361.png
          56 kB
          Vikrant Chauhan
        2. image-2022-05-15-19-20-55-022.png
          162 kB
          Vikrant Chauhan

            socrates Socrates Sidereas
            vikrantc55 Vikrant Chauhan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: