Description
Problem
This is reproducible on Data Center:
Artifact Download Task is not expanding variables on Bamboo 9.
This is a regression as it is not reproducible in Bamboo <= 8.2
Environment
Bamboo 9 (not reproducible on Bamboo 8)
Steps to Reproduce
- Add an Artifact Download task to a Plan
- Set the Destination path as a Global, Project or Plan variable (it even works with injected variables)
Expected Results
Bamboo should expand the variables and store the artifacts correctly
Actual Results
Bamboo treats the variables as strings and stores the artifacts in literal folders named after the variable names. E.g.:
[bamboo@bambooserver ABC-CON-JOB1]$ ls -al total 8 drwxr-x---. 2 bamboo bamboo 24 Sep 29 13:57 '${bamboo.buildNumber}'
Workarounds
Option 1:
- Do not use variables on the Destination Path
Option 2:
- Add a Script task before the Artifact Download task that would:
- Create static folders based on the variables names you desire
and - Create symbolic links pointing to the recently created folders
# Using ${bamboo.product_name_core} as an example # It can be any variable # Create the folder based on the variable value mkdir ${bamboo.product_name_core} # On Linux run ln -s ${bamboo_product_name_core} static-product-name-core # On Windows run # mklink /D ${bamboo.product_name_core} static-product-name-core
- Create static folders based on the variables names you desire
- Use the symbolic link location (static-product-name-core) on the Destination Path of the Artifact Download task