comet/.gitlab-ci.yml

41 lines
770 B
YAML
Raw Normal View History

2018-12-14 19:40:29 +00:00
image: docker
services:
- docker:dind
before_script:
- apk add --no-cache curl
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN gitlab.rezometz.org:5678
stages:
- build
- deploy
.build_image: &build_image
stage: build
script:
- docker build -f Dockerfile -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .
build_image_test:
<<: *build_image
stage: build
except:
- master
build_image_prod:
<<: *build_image
stage: build
after_script:
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE:latest
only:
- master
deploy:
stage: deploy
script:
- "curl -X POST lupercus.rez -d \"$API_VARS\" -H \"Content-Type: application/json\" --fail"
only:
- master
environment:
name: production