Issue Summary
Bamboo will not allow build and deployment logs to be downloaded over a Personal Access Token.
BAM-20764: Attempting to download an artifact or build log using "curl + personal access token" returns nothing and the command succeeds (fixed in Bamboo Data Center 9.5.0) has presumably added support to download Artifacts and Build logs over a Personal Access Token, but only Artifact downloads are working as requested.
Steps to Reproduce
- Run a build/deployment
- Create a PAT (Personal Access Token)
- Try to download the build or deployment logs using the PAT
curl -H "Authorization: Bearer <ACCESS_TOKEN>" -X GET '<BAMBOO_URL>/download/<BUILD-KEY>/<BUILD-KEY-JOB-BUILDNUM>.log'
Expected Results
The logs will be downloaded by using a token
Actual Results
Bamboo responds with a 401 (Unauthorized) or redirects the request to a SAML/SSO login URL.
Workaround
Use basic auth (user + password).
curl --user <USER>:<PASSWORD> -X GET '<BAMBOO_URL>/download/<BUILD-KEY>/<BUILD-KEY-NUM>.log'
curl --user <USER>:<PASSWORD> -X GET '<BAMBOO_URL>/deployment-download/<DEPLOY_PROJECT_ID>/build_logs/<DEPLOY_PROJECT_ID>-<ENVIRONMENT_ID>-<RESULT_ID>.log'