Closed e-picas closed 4 months ago
This fixes #1137
With the original YML in the ticket:
my_job: image: node:lts script: - echo 'test'
The rendering of the --preview option is now safe (no more image.docker.user: null):
--preview
image.docker.user: null
$ node ../test-gitlab-ci-local/gitlab-ci-local/src/index.js --preview --- stages: - .pre - build - test - deploy - .post my_job: image: name: node:lts script: - echo 'test'
And it passes the ci/lint validation:
ci/lint
$ jq --null-input --arg yaml "$(node ../test-gitlab-ci-local/gitlab-ci-local/src/index.js --preview)" '.content=$yaml' \ | curl "https://gitlab.com/api/v4/projects/${PROJECT_ID}/ci/lint" \ --header "Authorization: Bearer ${GITLAB_TOKEN}" \ --header 'Content-Type: application/json' \ --data @- | jq '.errors' []
I also deleted the image.docker.user: null in the test cases.
eslint is failing @e-picas
@firecow ok fixed
This fixes #1137
With the original YML in the ticket:
The rendering of the
--preview
option is now safe (no moreimage.docker.user: null
):And it passes the
ci/lint
validation:I also deleted the
image.docker.user: null
in the test cases.