I have created a repository variable MY_VARIABLE in Settings/Pipelines/Repository Variable. Using the pipe: atlassian/ssh-run:0.2.2 I execute an script with
echo "This is MY_VARIABLE: $MY_VARIABLE"
the script just prints "This is MY_VARIABLE:"
How can I solve this issue?
My script is the following one:
CP_OUTPUT=$(cp -uRv /value_iq/git/etl/* /value_iq/etl/)
echo "-------------------------------" >> /value_iq/bitbucket_deployment.log
echo "$(date +"%Y-%m-%d %H:%M:%S") Bitbucket $BITBUCKET_BRANCH deployed Commit: $BITBUCKET_COMMIT. " >> /value_iq/bitbucket_deployment.log
echo "$CP_OUTPUT" >> /value_iq/bitbucket_deployment.log
mysql --user=$DB_USER --password=$DB_PASSWD value_iq << EOF
INSERT INTO bitbucket_deployments (branch, commit, log, created_by) VALUES ("$BITBUCKET_BRANCH", "$BITBUCKET_COMMIT", "$CP_OUTPUT", "$VIQ_USER");
The script is executed by the following pipe:
- pipe: atlassian/ssh-run:0.2.3
Non of the variables used in the script have a value, except for $CP_OUTPUT that is created within the script.
...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events