How to: Install Bamboo add-ons without using the UI
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
要約
In some scenarios like when using automation tools, it might be required to install add-ons to Bamboo without using the UI.
環境
Any Bamboo release
ソリューション
Manual install - requires downtime
To install a plugin in Bamboo without using the UI you just need to follow the steps below:
- Bamboo をシャットダウンします。
- Copy the plugin .jar file into:
- Bamboo 7 and earlier: <bamboo-home>/plugins
- Bamboo 8 and later: <bamboo-home>/shared/plugins (or the equivalent shared folder if running on a cluster)
- Make sure to set the file ownership and permissions to match the Bamboo service user
- Start-up Bamboo.
Some Apps are provided in OSGi Bundle Repository (OBR) file format due to dependencies. If that's your case, please unzip the ".obr" file – you may have to rename its extension to ".zip" first – and copy any resulting .jar files to the Bamboo plugins folder, including the ones located in the OBR's /dependencies folder
Semi-automated via a Script - no downtime
From Bamboo 9.2.11, the upload button used to install apps from the marketplace has been disabled, that may impact the ability to use an automated upload script as the one below. It's possible to re-enable the upload button so that you can upload apps through the UI or via an automated command line upload instruction. To do that, add the -Dupm.plugin.upload.enabled=true
system property considering your operating system. For more details, see Configuring your system properties.
This solution will require you to copy the .jar or .obr file to the Server or any host that can reach the Bamboo Server and run a script that will push the App:
- Download the .jar or .obr file to a temporary location
- Create and run the following script. You will have to modify the URL, credentials and the APP_FILE_PATH for it to work:
#!/bin/bash # # Install an App in Bamboo via a script # This script requires curl and jq to work # BAMBOO_URL=https://bamboo.mydomain.net BAMBOO_CONTEXT_PATH=/ BAMBOO_BASE_URL=$BAMBOO_URL$BAMBOO_CONTEXT_PATH ADMIN_USER=admin ADMIN_PASS=adminpass # It can also be an .obr file APP_FILE_PATH=./plugin-file-to-be-installed.jar UPM_TOKEN=$(curl -k -I --user $ADMIN_USER:$ADMIN_PASS -H 'Accept: application/vnd.atl.plugins.installed+json' "${BAMBOO_BASE_URL}rest/plugins/1.0/?os_authType=basic" 2>/dev/null | grep 'upm-token' | cut -d " " -f 2 | tr -d '\r') curl --user ${ADMIN_USER}:${ADMIN_PASS} -k -H 'Accept: application/json' "${BAMBOO_BASE_URL}rest/plugins/1.0/?token=${UPM_TOKEN}" --compressed -F plugin=@${APP_FILE_PATH} 2>/dev/null | jq -r
For those apps that require a license, you will have to manually insert the license using the Bamboo UI.