Skip to content

publishBuildInfo cast exception #636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
reece-oliver opened this issue Apr 5, 2022 · 0 comments
Open

publishBuildInfo cast exception #636

reece-oliver opened this issue Apr 5, 2022 · 0 comments
Labels
bug Create a report to help us improve

Comments

@reece-oliver
Copy link

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.

@reece-oliver reece-oliver added the bug Create a report to help us improve label Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Create a report to help us improve
Projects
None yet
Development

No branches or pull requests

1 participant