You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
ssh-run version: 0.4.1
```
- step:
name: Set environment variables (test)
deployment: test
script:
- echo "Setting environment variables"
- pipe: atlassian/ssh-run:0.4.1
variables:
SSH_USER: '<omitted>'
SERVER: '<omitted>'
COMMAND: 'echo "Branch: \$BRANCH, Commit: \$COMMIT, Env: \$ASPNETCORE_ENVIRONMENT, Conn: \$CONNECTION_STRING" > test.txt'
MODE: 'command'
DEBUG: 'true'
ENV_VARS: >-
BRANCH=${BITBUCKET_BRANCH}
COMMIT=${BITBUCKET_COMMIT}
ASPNETCORE_ENVIRONMENT=${ENVIRONMENT}
CONNECTION_STRING=${CONNECTION_STRING}
```
I have a secured variable (CONNECTION_STRING) defined in my deployments section in repository settings. I'd like to export this secured variable to the remote server using ssh-run. Currently I'm just testing that the environment variables are received correctly. This works when CONNECTION_STRING is not a secured variable, but fails when it's secured. The error I get is:
`bash: Allow: command not found`
Is this by design? I expected that the secured variable won't appear in the logs, but should still be exportable / usable.
Actually, looks like my connection string had an "Allow user variables" directive that wasn't being escaped. That's likely what it's complaining about. False alarm :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.