RTECO-858: Add JFrog CLI Task support for Bamboo Deployment Projects - #49
Merged
Merged
Conversation
JfTask implements TaskType only and is therefore invisible in the Deployment Project task picker. Bamboo requires DeploymentTaskType to be implemented for a task to appear there. Add JfDeploymentTask which: - Extends JfContext (inheriting AbstractTaskConfigurator) so the same configuration UI and FTL template (editJfTask.ftl) are reused - Implements DeploymentTaskType so it appears in the Deployment Project task picker - Reuses JfInstaller, ExecutableRunner, and ServerConfigManager — the full jf CLI download, config-add, and command-run flow is identical to JfTask - Adapts environment variable setup for the deployment context: build-specific vars (JFROG_CLI_BUILD_NAME, JFROG_CLI_BUILD_NUMBER, JFROG_CLI_BUILD_URL) are omitted since no BuildContext is available; JFROG_CLI_HOME_DIR is isolated per deployment run using the deployment result ID Register the new task in atlassian-plugin.xml with category "deployment". Co-authored-by: Cursor <cursoragent@cursor.com>
agrasth
reviewed
May 26, 2026
|
|
||
| @Inject | ||
| @ComponentImport | ||
| private AdministrationConfigurationAccessor administrationConfigurationAccessor; |
Contributor
There was a problem hiding this comment.
Dead code, administrationConfigurationAccessor is injected but never used. Can you pls check this.
agrasth
reviewed
May 26, 2026
| template are shared with JfTask via JfContext. --> | ||
| <taskType key="JfDeploymentTask" name="JFrog CLI Task" class="org.jfrog.bamboo.JfDeploymentTask"> | ||
| <category name="deployment"/> | ||
| <configuration class="org.jfrog.bamboo.JfDeploymentTask"/> |
Contributor
There was a problem hiding this comment.
shouldn't point to JfContext instead of JfDeploymentTask?
agrasth
reviewed
May 26, 2026
| /** | ||
| * Resolves the working directory, falling back to the task's default if no custom path is set. | ||
| */ | ||
| private File getWorkingDirectory(String customWd, File defaultWd) throws IOException { |
Contributor
There was a problem hiding this comment.
getWorkingDirectory and runConfigAdd duplicated from JfTask — should live in JfContext
agrasth
approved these changes
May 26, 2026
- Move shared getWorkingDirectory and runConfigAdd helpers into JfContext so JfDeploymentTask can inherit them instead of duplicating bodies. - Drop the duplicated helpers from JfDeploymentTask. - Remove the unused AdministrationConfigurationAccessor injection (and its setter/import) from JfDeploymentTask — deployment context has no build URL to construct. - Point the JfDeploymentTask <configuration> in atlassian-plugin.xml at JfContext, since the configurator/UI lives there. Co-authored-by: Cursor <cursoragent@cursor.com>
3 of 6 tasks
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.
JfTask implements TaskType only and is therefore invisible in the Deployment Project task picker. Bamboo requires DeploymentTaskType to be implemented for a task to appear there.
Add JfDeploymentTask which:
Register the new task in atlassian-plugin.xml with category "deployment".