Description
Issue Summary
This is reproducible on Data Center: (yes)
Bamboo Agent will not correctly follow HTTP 301/302 redirects whilst uploading artifacts back to Bamboo Server.
Steps to Reproduce
- Add an HTTP 301/302 redirect on your Reverse proxy from the original Bamboo URL to a new Bamboo URL (when moving the Bamboo hostname for example)
- Restart your Agent. Keep the Remote Agent configuration as is (I.E. using the old Bamboo URL)
- Create an artifact definition and run the Plan
Expected Results
Artifact definition and upload should succeed
Actual Results
The plan fails with:
13-Apr-2022 13:37:52 Unable to publish artifact [Build log]: 13-Apr-2022 13:37:52 The artifact is required, build will now fail.
On the Agent I can see:
2022-04-13 13:36:49,564 WARN [2-BAM::agent7-corretto::Agent:pool-5-thread-1] [AbstractArtifactManager] Publishing [Build log] for ABC-DFG-SBLA-21: no files matching [./build-log.txt] in directory /home/bamboo/bamboo-agent-home-corretto/xm l-data/build-dir/ABC-DFG-SBLA 2022-04-13 13:36:49,565 INFO [2-BAM::agent7-corretto::Agent:pool-5-thread-1] [AbstractArtifactManager] Trying to publish the artifact with handler: com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler 2022-04-13 13:36:49,569 ERROR [2-BAM::agent7-corretto::Agent:pool-5-thread-1] [BambooArtifactHttpTransport] Unexpected HTTP status code: HTTP/1.1 301 Moved Permanently 2022-04-13 13:36:49,570 INFO [2-BAM::agent7-corretto::Agent:pool-5-thread-1] [AbstractArtifactManager] Handler com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler did not publish the artifact 2022-04-13 13:36:49,570 ERROR [2-BAM::agent7-corretto::Agent:pool-5-thread-1] [AbstractArtifactManager] Unable to publish artifact [Build log]: 2022-04-13 13:36:49,570 ERROR [2-BAM::agent7-corretto::Agent:pool-5-thread-1] [AbstractArtifactManager] The artifact is required, build will now fail. 2022-04-13 13:36:49,570 INFO [2-BAM::agent7-corretto::Agent:pool-5-thread-1] [RemoteExecutionPhaseServiceImpl] ABC - DFG - Save build logs as Artifact #21 (ABC-DFG-SBLA-21) execution finished
Workaround
- Don't use a redirected Bamboo URL
- Update the Agent's <bamboo-agent-home>/conf/wrapper.conf to wrapper.app.parameter.2 to reflect the new Bamboo URL
Attachments
Issue Links
- is duplicated by
-
BAM-4268 Artifact copier does not handle '301 Moved Permanently'
- Closed