Backport deployment task support to Bamboo 9.x - #50
Merged
Merged
Conversation
Creates a Bamboo 9.6.5-compatible line of the plugin that includes the deployment-project task type added in b75c92b (RTECO-858), the admin URL namespace fix from 7dc86e3, and the security improvements from bff5c83 — all restored to work with the pre-10.x runtime. Reverts 0ae9650 (Bamboo 10.x compatibility): * pom: bamboo 9.6.5, Java 11, amps 8.13.6, spring-scanner 3.0.3 * pom: drop OSGi <instructions>, restore <enableQuickReload>/ <extractDependencies>, un-provide the Jackson deps so they bundle * ServerConfigManager: back to a concrete @component class exposing getInstance() via ContainerManager.autowireComponent; folds in the bff5c83 log-sanitization fixes; ServerConfigManagerImpl deleted * spring-scanner.xml: deleted (not needed by scanner 3.x) * atlassian-plugin.xml: restore <component> declaration for ServerConfigManager (kept /admin/jfrog namespace + JfDeploymentTask) * Actions and tasks: drop @Inject/@ComponentImport annotations; JfTask/JfDeploymentTask fetch getInstance() lazily so unit tests can still inject mocks via the existing setters Version bumped to 1.0.5.1 so Bamboo 9.x installations pick this over the 10.x-only 1.0.6+ releases. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The class is registered as a Spring bean via <component key="jfrogServerConfigManager" ...> in atlassian-plugin.xml. Keeping @component in addition caused Spring's annotation scan to register a second bean under the default name 'serverConfigManager', producing NoUniqueBeanDefinitionException when JfrogServerConfigAction and ExistingServersListAction constructor-inject ServerConfigManager by type. Removing the annotation makes the bean identity depend on the explicit XML declaration only. Matches the effective 1.0.5 behaviour, where the runtime scan activator was absent so @component was inert. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces the
bamboo-9.xmaintenance line and delivers the customer-requested deployment-project task support on it. The 10.x-only1.0.6+releases can't be installed on Bamboo 9.x; this PR produces a1.0.5.1build that runs on 9.x and includes the deployment task from #49.The change is effectively a targeted revert of #27 (
0ae9650, "Bamboo 10.x compatibility") applied on top of currentmain, keeping everything else — the deployment task (#49), admin URL namespace fix (#42), HTTP protocol support, security improvements (#37), and the Maven Central repo (#39).9.6.5/ Java11/amps 8.13.6/spring-scanner 3.0.3inpom.xml.ServerConfigManagerback to concrete@Componentclass withgetInstance(), with the log-sanitization fixes from Security Improvements & GitHub Actions Workflows #37 folded in.ServerConfigManagerImpl.javaandMETA-INF/spring/spring-scanner.xmldeleted (spring-scanner 3 doesn't need the latter).@Inject/@ComponentImportannotations removed fromJfTask,JfDeploymentTask,JfContext, and both admin actions.JfTask/JfDeploymentTasknow fetchServerConfigManager.getInstance()lazily (only if not already set), so unit tests can inject mocks via the existing setters.1.0.5.1so Bamboo 9.x's UPM correctly prefers this over any newer 10.x-only releases.Test plan
mvn test— 9/9 tests passing locally (JfrogServerConfigActionTest8/8,JfTaskUnitTest1/1)mvn package— producesbamboo-jfrog-plugin-1.0.5.1.jar(~6 MB, Jackson bundled)JfTaskandJfDeploymentTasktask types, plus the<component>forServerConfigManager1.0.5.1.jaron a local Bamboo 9.x instance; confirm the JFrog CLI Task appears in both Build Plan tasks and Deployment Project tasksjfcommand from a build plan task and from a deployment project taskNotes for reviewers
bamboo-9.x, notmain. Once merged,bamboo-9.xbecomes the ongoing 9.x support line; future 9.x fixes should PR into it.maven.compiler.target=11, so CI's JDK 17 still produces 9.x-compatible bytecode.