jfrog / bamboo-artifactory-plugin

Atlassian Bamboo plugin that enables traceable build artifacts with Artifactory
https://plugins.atlassian.com/plugin/details/27818
Apache License 2.0
42 stars 55 forks source link

BAP 3.3.0 missing Artifactory Pro Release Staging property fields #195

Closed trevormarshall closed 10 months ago

trevormarshall commented 1 year ago

Description We attempted our first release with BAP 3.3.0 today and see what may be regressions? When we browse to the build we would like promote (authentication required), we no longer see the section at the top with fields for the current, release and next snapshot versions.

Furthermore, we just noticed that build info stopped being published to our Artifactory server after the upgrade 3.2.10 to 3.3.0

Finally, we cannot find the documentation for 3.3.0 published yet (this page has latest release 3.2.10 still), so we are unsure if these changes were planned, so are assuming they were not.

To Reproduce Upgrade from 3.2.10 to 3.3.0, browse to Artifactory Release and Promotion tab. Look for fields under Artifactory Pro Release Staging

Expected behavior

Versions

Additional context We are attempting to downgrade the plugin to 3.2.10 for our release.

Screenshots BAP 3.2.10

BAP 3 2 10

BAP 3.3.0

BAP 3 3 0
trevormarshall commented 1 year ago

Downgrade to BAP 3.2.10 resolved this, but this will block upgrades to Bamboo 9. We are working with JFrog Support on this in parallel.

RobiNino commented 1 year ago

Hi @trevormarshall , Thanks for reporting this issue. The release notes in the documentation page will be updated soon. In the meantime, they are available here and basically contain the changes from #193 .

I suspect that the issue in the release promotion is caused due to the build info not being published, so let's focus on that first. So far I was unable to reproduce. Please assist by providing the following answers:

  1. Did you try upgrading to Bamboo 9 along the update of the extension, or was the extension version 3.3.0 only tested on Bamboo 8?
  2. Is there anything different in the logs you could point out? Any logs regarding build info that are no longer shown (try looking "Saving Build Info ..." in particular).
  3. Do the deployed Maven artifact contain build-info relevant properties?

Note that one of the changes was a fix in the authentication of Maven release promotion, but it is backward compatible and you would have seen an authentication error if that was the case.

Thanks for your cooperation.

trevormarshall commented 1 year ago

hi @RobiNino,

  1. Version 3.3.0 was tested only on 8.0.12 and 8.1.10
  2. The only errors in the logs were some freemarker errors. The attached stack trace was submitted to JFrog Support and mentions gradleVersionsConfig.ftl:
    - Failed at: #if versionsList?size gt 0 [in template "templates/plugins/release/fragments/gradleVersionsConfig.ftl" at line 7, column 5]
    ~ Reached through: #nested [in template "freemarker-lib/ui.ftl" in macro "bambooSection" at line 124, column 9]
    ~ Reached through: @ui.bambooSection dependsOn="moduleVe... [in template "templates/plugins/release/fragments/gradleVersionsConfig.ftl" at line 5, column 1]
    - Reached through: #include "fragments/gradleVersionsCon... [in template "templates/plugins/release/releasePromotionAction.ftl" at line 93, column 13]
    - Reached through: @ww.form action=targetAction submitLa... [in template "templates/plugins/release/releasePromotionAction.ftl" at line 88, column 5]
  3. If I understand your question correctly, yes when the artifacts are deployed successfully with plugin 3.2.10 we do see the build info published (login req'd for full details) and we also use the plugin to attach properties to certain artifacts.

One thing that occurred to me just now that may be relevant, is that we use a reference token for a non-existent user for the server authentication now. In the global plugin settings and in the artifactory.override.deployer. vars. We no longer use the encrypted password.

Thank you for looking into this. BAP-330-error.txt

snn37 commented 1 year ago

Hi all! Faced the same problem on plugin version 3.3.1, rolling back to 3.3.0 did not help. This blocks some of our important builds, and we also get an error when building the release:

Exception occurred while executing custom pre-build action '[org.jfrog.bamboo.release.action.ArtifactoryPreBuildAction@1495b8e2](mailto:org.jfrog.bamboo.release.action.ArtifactoryPreBuildAction@1495b8e2)'. Building will abort... java.lang.Exception: java.lang.NullPointerException at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask$1.onThrow(PrepareBuildTask.java:146) at com.atlassian.bamboo.plugin.BambooPluginUtils.callUnsafeCode(BambooPluginUtils.java:66) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.runPreBuildActions(PrepareBuildTask.java:151) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:105) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.executeBuildPhase(DefaultBuildAgent.java:207) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:179) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:169) at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:118) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:162) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.lambda$start$0(DefaultBuildAgent.java:124) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.NullPointerException at org.jfrog.build.extractor.maven.transformer.PomTransformer.setVersion(PomTransformer.java:257) at org.jfrog.build.extractor.maven.transformer.PomTransformer.changeCurrentModuleVersion(PomTransformer.java:193) at org.jfrog.build.extractor.maven.transformer.PomTransformer.transform(PomTransformer.java:126) at org.jfrog.bamboo.release.provider.MavenReleaseProvider.transformDescriptor(MavenReleaseProvider.java:65) at org.jfrog.bamboo.release.action.ArtifactoryPreBuildAction.call(ArtifactoryPreBuildAction.java:74) at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask$1.call(PrepareBuildTask.java:140) at com.atlassian.bamboo.plugin.BambooPluginUtils.callUnsafeCode(BambooPluginUtils.java:55) ... 13 more

image

Bamboo - 9.2.1 Artifactory - 7.18.6 Artifactory plugin - 3.3.0

Does anyone have any news about this?

RobiNino commented 1 year ago

Hi @trevormarshall @snn37 , We were able to reproduce the issue with the missing fields on the Release Staging page, and found out that was due to a compatibility issue. Versions 3.3.0 & 3.3.1 of the plugin are only compatible with Bamboo 9.0.0 and above. These versions were updated with the correct compatibility info. Our apologies of the inconvenience caused by this, and for the delay in finding out the source of the problem. We'd appreciate your feedback after you upgrade to Bamboo 9, thanks.

trevormarshall commented 10 months ago

We finally upgraded to Bamboo 9 and the latest BAP plugin, successfully. But we are no longer releasing projects from Bamboo.