matrix-puppeteer-line/.gitlab-ci.yml

32 lines
1.8 KiB
YAML
Raw Normal View History

2020-08-17 15:04:22 -04:00
build:
stage: build
2020-08-17 15:04:22 -04:00
image: docker:latest
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
2020-08-17 15:04:22 -04:00
- docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build --pull --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- if [ $CI_COMMIT_BRANCH == "master" ]; then docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:latest && docker push $CI_REGISTRY_IMAGE:latest; fi
- if [ $CI_COMMIT_BRANCH != "master" ]; then docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME && docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME; fi
2020-11-11 16:19:19 -05:00
after_script:
- |
if [ "$CI_COMMIT_BRANCH" = "master" ]; then
apk add --update curl
rm -rf /var/cache/apk/*
curl "$NOVA_ADMIN_API_URL" -H "Content-Type: application/json" -d '{"password":"'"$NOVA_ADMIN_NIGHTLY_PASS"'","bridge":"'$NOVA_BRIDGE_TYPE'","image":"'$CI_REGISTRY_IMAGE':'$CI_COMMIT_SHA'"}'
fi
2020-08-24 08:23:10 -04:00
build puppeteer:
stage: build
image: docker:latest
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- cd puppet
- docker pull $CI_REGISTRY_IMAGE/puppeteer:latest || true
- docker build --pull --cache-from $CI_REGISTRY_IMAGE/puppeteer:latest --tag $CI_REGISTRY_IMAGE/puppeteer:$CI_COMMIT_SHA .
- docker push $CI_REGISTRY_IMAGE/puppeteer:$CI_COMMIT_SHA
- if [ $CI_COMMIT_BRANCH == "master" ]; then docker tag $CI_REGISTRY_IMAGE/puppeteer:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE/puppeteer:latest && docker push $CI_REGISTRY_IMAGE/puppeteer:latest; fi
- if [ $CI_COMMIT_BRANCH != "master" ]; then docker tag $CI_REGISTRY_IMAGE/puppeteer:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE/puppeteer:$CI_COMMIT_REF_NAME && docker push $CI_REGISTRY_IMAGE/puppeteer:$CI_COMMIT_REF_NAME; fi