I was trying to add the file to the docker home directory for login to docker. But, I can not add a file script to the test section.
variables:
DOCKER_AUTH: echo -n "gitlab-ci-token:$CI_JOB_TOKEN" | base64
DOCKER_AUTH_CONFIG: echo {\"auths\":{\"container-host:port\":{\"auth\":\"$(eval $DOCKER_AUTH)\"}}}
test-on-scdf-tasks:
extends: .test-on-downstream
script:
- mkdir -p $HOME/.docker
- eval $DOCKER_AUTH_CONFIG > $HOME/.docker/config.json
trigger:
project: example/scdf-tasks
branch: master
strategy: depend
CodePudding user response:
script
and trigger
are mutually exclusive. You can only use one OR the other.
If you trigger a pipeline, the job definitions in that pipeline control the script. You cannot add any script to it.
If you have a job with a script:
section, it cannot also have a trigger:
.