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

Axivion parser does not work with folder credentials

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • warnings-ng-plugin
    • 10.5.2

      When using the warnings ng plugin for axivion (maybe also other variants?), this doesn't work with folder-based credentials.

      Example pipeline:

      pipeline {
          agent any
      
          stages {
              stage('Hello') {
                  steps {
                      recordIssues(
                          tools: [
                              axivionSuite(
                                  basedir: '$WORKSPACE', 
                                  credentialsId: 'foobar', 
                                  ignoreSuppressedOrJustified: false, 
                                  projectUrl: 'https://axivion.company.org/axivion/projects/myproject'
                              )
                          ]
                      )
                  }
              }
          }
      }
      

      leads to the following error:

      12:24:50  edu.hm.hafner.analysis.ParsingException: Could not find the credentials for foobar
      12:24:50  	at io.jenkins.plugins.analysis.warnings.axivion.AxivionSuite.withValidCredentials(AxivionSuite.java:223)
      12:24:50  	at io.jenkins.plugins.analysis.warnings.axivion.AxivionSuite.scan(AxivionSuite.java:191)
      12:24:50  	at io.jenkins.plugins.analysis.core.steps.IssuesScanner.scan(IssuesScanner.java:104)
      12:24:50  	at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.scanWithTool(IssuesRecorder.java:809)
      12:24:50  	at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.record(IssuesRecorder.java:773)
      12:24:50  	at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:741)
      12:24:50  	at io.jenkins.plugins.analysis.core.steps.RecordIssuesStep$Execution.run(RecordIssuesStep.java:1160)
      12:24:50  	at io.jenkins.plugins.analysis.core.steps.RecordIssuesStep$Execution.run(RecordIssuesStep.java:1116)
      12:24:50  	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      12:24:50  	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      12:24:50  	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      12:24:50  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      12:24:50  	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      12:24:50  	at java.base/java.lang.Thread.run(Thread.java:829)
      12:24:50  Finished: FAILURE
      

      The credentials does exist on a folder level though, as seen in the attached picture. Specifying the credential on a global level works as intended, but doesn't make sense if other folders, are not supposed to use said credential.

            abosch Artur Bosch
            degelma Marian Degel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: