How can I use wget
adding the $CI_JOB_TOKEN
or any other header information during gitlab_ci.yml
build?
build:
stage: build
before_script:
- wget --header='JOB-TOKEN: $CI_JOB_TOKEN' https://git.my-company.com/projects/1234/repository/files/file.txt?ref=master
Result:
Pipeline cannot be run.
jobs:build:before_script config should be a string or a nested array of strings up to 10 levels deep
Why? According to: https://docs.gitlab.com/ee/ci/jobs/ci_job_token.html#troubleshooting the wget command with header information should work, in general.