Issue Summary
If Bamboo 7.0.x have incorrect deployment project artifact linked data, it is not fixed during upgrade to Bamboo 7.1.x
Steps to Reproduce
- Install Bamboo 7.0.2
- Integrate with Bitbucket Server
- Use the following RSS Bamboo YAML Specs:
--- # Build plan version: 2 plan: project-key: SPECS name: bamboo specs key: STASH branches: create: for-new-branch stages: - Default Stage: jobs: - Build Build: tasks: - script: - echo hello > test.txt artifacts: - name: test.txt pattern: test.txt shared: true required: true --- version: 2 deployment: name: deployment source-plan: SPECS-STASH release-naming: release-1 environments: - Production Production: triggers: - build-success tasks: - clean - artifact-download - script: - echo hello
- Run Specs build in Bamboo to create the build plan and deployment project
- Create a new branch in Bitbucket Server
It will automatically create branch plan in Bamboo. The Specs build in the branch plan incorrectly linked deployment project with the branch plan - Run master build plan or deployment project
It works fine - Upgrade Bamboo to version 7.1.1
- Delete the branch plan in Bamboo
- Run the build plan or deployment project
Expected Results
Deployment manage to download the artifact successfully
Actual Results
The below exception is thrown in the deployment log file:
simple 25-Aug-2020 06:21:23 Starting task 'Artifact download' of type 'com.atlassian.bamboo.plugins.bamboo-artifact-downloader-plugin:artifactdownloadertask' simple 25-Aug-2020 06:21:23 Preparing to download plan result SPECS-STASH-2 artifact: Non required shared artifact: [test.txt], pattern: [test.txt] error 25-Aug-2020 06:21:23 Unable to download artifact Non required shared artifact: [test.txt], pattern: [test.txt]
Notes
- The incorrect deployment project linked bug have been fixed in Bamboo 7.1.1 but the problematic data isn't fixed during the upgrade
- If there are 100 repositories with Specs and incorrect linked data, it will be troublesome to rerun Specs builds for all affected repositories
Workaround
- Use the following SQL to look for affected repositories:
SELECT vl.NAME as repository_name FROM VCS_LOCATION vl JOIN VCS_SPECS_STATE vss ON vss.VCS_LOCATION_ID=vl.VCS_LOCATION_ID JOIN VCS_SPECS_SOURCE vsso ON vsso.VCS_SPECS_STATE_ID=vss.VCS_SPECS_STATE_ID JOIN DEPLOYMENT_PROJECT dp ON dp.VCS_SPECS_SOURCE_ID=vsso.VCS_SPECS_SOURCE_ID JOIN DEPLOYMENT_PROJECT_ITEM dpi ON dpi.DEPLOYMENT_PROJECT_ID=dp.DEPLOYMENT_PROJECT_ID JOIN DEPLOYMENT_PROJECT_ITEM_BA dpib ON dpib.BAM_ARTIFACT_ITEM_ID=dpi.DEPLOYMENT_PROJECT_ITEM_ID JOIN ARTIFACT_DEFINITION ad ON ad.ARTIFACT_DEFINITION_ID=dpib.ARTIFACT_DEFINITION_ID JOIN BUILD bj ON bj.BUILD_ID=ad.PRODUCER_JOB_ID JOIN CHAIN_STAGE cs ON cs.STAGE_ID=bj.STAGE_ID JOIN BUILD bb ON bb.BUILD_ID=cs.BUILD_ID WHERE bb.BUILD_TYPE='CHAIN_BRANCH' GROUP BY vl.NAME;
- Rerun Specs build for the repository in the main branch again
- relates to
-
BAM-21073 Deployment release fails trying to download artifact from wrong branch when using Bamboo Specs
- Closed
- is cloned as
-
BDEV-16178 Loading...