So I’ve been using secret variables in our .gitlab-ci.yml
file and have always defined them like so:
...
before_script:
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
...
or sometimes I’d use them as:
...
environment:
name: review/$CI_COMMIT_REF_NAME
...
This works perfectly for us but I came across a video last night where they made use of a variable in a different syntax:
${VAR_NAME}
Are there any differences between the different syntax I mentioned here? Are there situations where one of the syntax won’t work?