Skip to end of banner
Go to start of banner

How to install add-ons from builds

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

Description

This describes the techniques we use to install Jira, Confluence, Bitbucket, or Bamboo add-ons into server instances via UPM via the UPM Command Line Interface (CLI). More over, we have standardized creating builds that employ this technique. See Plan Creation Scripting for details on this.

We use a Maven build process and the following shows the details of this. Obviously, you can use the UPM CLI directly on the command line or in any other processing, just the details may be a bit different (wink).

Standard install add-on template

This is for standard Atlassian add-ons that are built with a typical Maven project.

  • Uninstall the add-on first to be absolutely safe as UPM will not replace an add-on that has a lower version number. Worse, an install completes successfully anyway.
  • Install the add-on with either an obr (first choice) or jar found in the standard Maven location.
standard-task-install.txt
# Assumes working directory is standard Maven project structure
# parameter: server        - like  https://confuence.examplegear.com

# Uninstall
-a addTask               --plan @plan@ --job @job@ \
                                               --description "un-install add-on" \
                                               --taskKey CLI_UPM \
                                               --field "scriptLocation = INLINE" \
                                               --field "scriptBody = -a uninstallAddon --addon @default --continue -s %server% -p ${bamboo.automationPassword}"

# Install
-a addTask               --plan @plan@ --job @job@ \
                                               --description "install add-on" \
                                               --taskKey CLI_UPM \
                                               --field "scriptLocation = INLINE" \
                                               --field "scriptBody = -a installAddon --wait --file @default -s %server% -p ${bamboo.automationPassword}"

# Single thread install jobs
-a addAgentAssignment --assignment @plan@-@job@ --agent install

Example

create-plan-script.txt
-a createPlan            --plan "..." --replace \
...


-a addVariables          --plan @plan@ --field1 server         --value1 "https://..."
...

-a addStage              --plan @plan@ --stage "FIRST"

-a addJob                --plan @plan@ --stage "@stage@" --job JOB1
...

# Maven build
-a run                   --file standard-task-maven3.txt \
                         --findReplace "%goal%:clean package"

# Install
-a run                   --file standard-task-install.txt \
                         --findReplace %server%:${bamboo.server}


...
  • No labels