22 lines
677 B
YAML
22 lines
677 B
YAML
stages:
|
|
- build
|
|
|
|
variables:
|
|
IMAGE_NAME: thallian/alpine-s6
|
|
DOWNSTREAM_PROJECTS: "11 12 14 15 17 18"
|
|
|
|
build:
|
|
stage: build
|
|
script:
|
|
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD $DOCKER_REGISTRY
|
|
- docker build -t $IMAGE_NAME:$CI_COMMIT_SHA .
|
|
- docker build -t $IMAGE_NAME:$CI_COMMIT_REF_NAME .
|
|
- docker build -t $IMAGE_NAME:latest .
|
|
- docker push $IMAGE_NAME:$CI_COMMIT_SHA
|
|
- docker push $IMAGE_NAME:$CI_COMMIT_REF_NAME
|
|
- docker push $IMAGE_NAME:latest
|
|
- |
|
|
for proj in $DOWNSTREAM_PROJECTS; do
|
|
curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=master $CI_API_V4_URL/projects/$proj/trigger/pipeline
|
|
done
|