Uploaded image for project: 'Jenkins Artifactory Plug-in'
  1. Jenkins Artifactory Plug-in
  2. HAP-1378

issues.collect failing after upgrade (3.6.3->3.8)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: 4 - Normal
    • Resolution: Done
    • Affects Version/s: 3.8.0
    • Fix Version/s: 3.8.1
    • Component/s: None
    • Labels:
      None

      Description

      Jenkins v2.235.5, Artifactory v6.19.1

      For a while we have been using issues.collect's method from Artifactory plugin from our Jenkins pipeline to collect Jira tickets. It was working like a charm, but no longer since the update. The pipeline code we use is as from the Artifactory documentation:

      def config = """{
                  "version": 1,
                  "issues": {
                     "trackerName": "JIRA",
                     "regexp": "(.+-[0-9]+):\\s(.+)",
                     "keyGroupIndex": 1,
                     "summaryGroupIndex": 2,
                     "trackerUrl": "https://jira.autoform.com/browse/"
                  }
               }"""
      
      steps.echo "Uploading from ${paths['pattern']} to ${paths['target']}"
      
      def buildinfo = server.upload(uploadSpec)
      buildinfo.issues.collect(server, config)
      server.publishBuildInfo(buildinfo)

      The stacktrace is:

      om.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "type" (class org.jfrog.build.api.Build), not marked as ignorable (25 known properties: "statuses", "started", "governance", "agent", "vcs", "modules", "number", "artifactoryPrincipal", "name", "principal", "url", "buildRetention", "properties", "parentName", "buildAgent", "version", "durationMillis", "licenseControl", "parentBuildId", "artifactoryPluginVersion", "startedDate", "parentNumber", "runParameters", "buildDependencies", "issues"])
       at [Source: UNKNOWN; line: 1, column: 10527] (through reference chain: org.jfrog.build.api.Build["type"])
      	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
      	at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:855)
      	at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1212)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1604)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1582)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:299)
      	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:156)
      	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4524)
      	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3466)
      	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3434)
      	at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.getBuildFromJson(ArtifactoryBuildInfoClient.java:656)
      	at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.getBuildInfo(ArtifactoryBuildInfoClient.java:209)
      Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from 192.168.2.141/192.168.2.141:61304
      		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1788)
      		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
      		at hudson.remoting.Channel.call(Channel.java:998)
      		at hudson.FilePath.act(FilePath.java:1069)
      		at hudson.FilePath.act(FilePath.java:1058)
      		at org.jfrog.hudson.pipeline.common.executors.CollectIssuesExecutor.execute(CollectIssuesExecutor.java:49)
      		at org.jfrog.hudson.pipeline.scripted.steps.CollectIssuesStep$Execution.run(CollectIssuesStep.java:57)
      		at org.jfrog.hudson.pipeline.scripted.steps.CollectIssuesStep$Execution.run(CollectIssuesStep.java:41)
      		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      		at java.lang.Thread.run(Thread.java:748)
      Caused: java.io.IOException: Failed to get build info. Unrecognized field "type" (class org.jfrog.build.api.Build), not marked as ignorable (25 known properties: "statuses", "started", "governance", "agent", "vcs", "modules", "number", "artifactoryPrincipal", "name", "principal", "url", "buildRetention", "properties", "parentName", "buildAgent", "version", "durationMillis", "licenseControl", "parentBuildId", "artifactoryPluginVersion", "startedDate", "parentNumber", "runParameters", "buildDependencies", "issues"])
       at [Source: (String)"{"properties":{"buildInfo.env.NODE_NAME":"chbodio1","javamelody.gzip-compression-disabled":"true","buildInfo.env.AF_LICENSE_TYPE_FORMING":"A","file.encoding.pkg":"sun.io","buildInfo.env.PROCESSOR_ARCHITEW6432":"AMD64","buildInfo.env.PATHEXT":".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC","buildInfo.env.ALLUSERSPROFILE":"C:\\ProgramData","java.home":"/usr/lib/jvm/java-8-openjdk-amd64/jre","buildInfo.env.BUILD_ID":"104","buildInfo.env.ProgramW6432":"C:\\Program Files","buildInfo.env.VBOX_"[truncated 11599 chars]; line: 1, column: 10527] (through reference chain: org.jfrog.build.api.Build["type"])
      	at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.getBuildInfo(ArtifactoryBuildInfoClient.java:211)
      	at org.jfrog.build.extractor.issuesCollection.IssuesCollector.getPreviousVcsRevision(IssuesCollector.java:70)
      	at org.jfrog.build.extractor.issuesCollection.IssuesCollector.collectIssues(IssuesCollector.java:44)
      	at org.jfrog.hudson.pipeline.common.executors.CollectIssuesExecutor$CollectIssuesCallable.invoke(CollectIssuesExecutor.java:82)
      	at org.jfrog.hudson.pipeline.common.executors.CollectIssuesExecutor$CollectIssuesCallable.invoke(CollectIssuesExecutor.java:62)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3073)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      	at hudson.remoting.Request$2.run(Request.java:369)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:117)
      	at java.lang.Thread.run(Unknown Source)
      Finished: FAILURE

       

        Attachments

          Activity

            People

            Assignee:
            eyalb Eyal Ben Moshe
            Reporter:
            buffalonan Ferran Moreno
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: