publishBuildInfo cast exception
Opened this issue · 0 comments
reece-oliver commented
Describe the bug
Upgraded to artifactory plugin 3.16.1 from 3.14.2 and when I try to publishBuildInfo to my artifactory server I see the below error
org.jfrog.build.api.Artifact cannot be cast to org.jfrog.build.extractor.ci.Artifact
Stack trace
11:25:39 org.jfrog.build.extractor.ci.BuildInfo.ToBuild(BuildInfo.java:618)
11:25:39 org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.PublishBuildInfo.<init>(PublishBuildInfo.java:29)
11:25:39 org.jfrog.build.extractor.clientConfiguration.client.artifactory.ArtifactoryManager.publishBuildInfo(ArtifactoryManager.java:140)
11:25:39 org.jfrog.build.extractor.retention.Utils.sendBuildAndBuildRetention(Utils.java:65)
11:25:39 org.jfrog.hudson.pipeline.common.BuildInfoDeployer.deploy(BuildInfoDeployer.java:87)
11:25:39 org.jfrog.hudson.pipeline.common.executors.PublishBuildInfoExecutor.execute(PublishBuildInfoExecutor.java:38)
11:25:39 org.jfrog.hudson.pipeline.scripted.steps.PublishBuildInfoStep$Execution.runStep(PublishBuildInfoStep.java:46)
11:25:39 org.jfrog.hudson.pipeline.scripted.steps.PublishBuildInfoStep$Execution.runStep(PublishBuildInfoStep.java:34)
11:25:39 org.jfrog.hudson.pipeline.ArtifactorySynchronousNonBlockingStepExecution.run(ArtifactorySynchronousNonBlockingStepExecution.java:54)
11:25:39 org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
To Reproduce
def server = Artifactory.server 'na-artifactory'
def buildInfo = Artifactory.newBuildInfo()
<blah blah stuff inbetween>
server.publishBuildInfo(buildInfo)
Expected behavior
It should publish the buildInfo to artifactory, it does this fine in artifactory plugin 3.14.2
Screenshots
If applicable, add screenshots to help explain your problem.
Versions
- Artifactory Version: 3.16.1
Additional context
Add any other context about the problem here.