Closed e-picas closed 4 months ago
This fixes #1139
With the original YML in the ticket:
my_job: script: - echo 'test' my_job2: needs: - my_job script: - echo 'test'
The rendering of the --preview option is now safe (no more needs.need.pipeline: null and needs.need.project: null):
--preview
needs.need.pipeline: null
needs.need.project: null
$ node ../test-gitlab-ci-local/gitlab-ci-local/src/index.js --preview --- stages: - .pre - build - test - deploy - .post my_job: script: - echo 'test' my_job2: needs: - job: my_job artifacts: true optional: false script: - echo 'test'
And it passes the ci/lint validation:
$ 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' []
@e-picas eslint is failing
@firecow ok fixed
This fixes #1139
With the original YML in the ticket:
The rendering of the
--preview
option is now safe (no moreneeds.need.pipeline: null
andneeds.need.project: null
):And it passes the ci/lint validation: