firecow / gitlab-ci-local

Tired of pushing to test your .gitlab-ci.yml?
MIT License
2.15k stars 125 forks source link

$$ in ci/cd variables not working as expected #1099

Closed ANGkeith closed 6 months ago

ANGkeith commented 6 months ago

Use the $ character in CI/CD variables

Minimal .gitlab-ci.yml illustrating the issue

---
$ character in CI/CD variable:
  variables:
    FLAGS: '-al'
    LS_CMD: 'ls "$FLAGS" $$TMP_DIR'
  script:
    - echo "$LS_CMD"  

Expected behavior

'ls -al $TMP_DIR'

Current behavior

'ls -al'