gitlab-ci-local icon indicating copy to clipboard operation
gitlab-ci-local copied to clipboard

--preview doesn't expand variable values

Open atli-c opened this issue 4 years ago • 2 comments

Add support for: https://docs.gitlab.com/ee/ci/variables/#use-variables-in-other-variables

atli-c avatar Sep 30 '21 07:09 atli-c

I made a mistake. I thought that this wasn't supported because I didn't see what I expected from gitlab-ci-local --preview. I can see that it is in fact supported when running jobs.

atli-c avatar Sep 30 '21 07:09 atli-c

Feature request: gitlab-ci-local --preview should show variable values when possible.

A possible solution: show value in YAML comment.
Job in .gitlab-ci.yml file:

job:
  variables:
    FLAGS: '-al'
    LS_CMD: 'ls "$FLAGS" $$TMP_DIR'

Output from gitlab-ci-local --preview

---
job:
  variables:
    FLAGS: '-al'
    LS_CMD: 'ls "$FLAGS" $$TMP_DIR' # ls "-al" $TMP_DIR

atli-c avatar Sep 30 '21 08:09 atli-c

We just decided that --preview should never do this. It breaks to possibility to ship output to https://gitlab.com/ci/lint endpoint

firecow avatar Mar 14 '24 12:03 firecow