tasks: - script: | #!/bin/bash set -ex case ${bamboo_planRepository_branch} in main) USER=${bamboo.release_deployer_username} PASSWORD=${bamboo.release_deployer_password} REPOSITORY="nlveg-gen-release-local-01" ;; *.x) USER=${bamboo.release_deployer_username} PASSWORD=${bamboo.release_deployer_password} REPOSITORY="nlveg-gen-release-local-01" ;; *) USER=${bamboo.snapshot_deployer_username} PASSWORD=${bamboo.snapshot_deployer_password} REPOSITORY="nlveg-gen-devteam-local-01" ;; esac # Inject custom variables into inject-variables source file (inception) # (Bamboo does not allow proper variable substition operations) echo -e "\nvmname=conpl_${bamboo.buildNumber}_$(date +"%m-%d-%Y")_$(echo "${bamboo.planRepository.revision}" | head -c7 -z)" >> pipeline.parameters echo "artifactory_username=${USER}" >> pipeline.parameters echo "artifactory_password=${PASSWORD}" >> pipeline.parameters echo "artifactory_repository=${REPOSITORY}" >> pipeline.parameters echo "var_file=${VAR_FILE}" >> pipeline.parameters - inject-variables: file: pipeline.parameters scope: RESULT other: clean-working-dir: true requirements: - AGENT_TYPE: Linux_Base_Agent