Merge branch 'shaka-ci' into 'master'

Shaka ci

See merge request klafyvel/klafirc!2
This commit is contained in:
klafyvel 2018-08-09 15:05:28 +02:00
commit 8b0c10b537

View file

@ -2,15 +2,37 @@ 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_job:
.build_image: &build_image
stage: build
script:
- apk add --no-cache curl
- docker build -f Dockerfile -t gitlab.rezometz.org:5678/klafyvel/klafirc .
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN gitlab.rezometz.org:5678
- docker push gitlab.rezometz.org:5678/klafyvel/klafirc:latest
- "curl -X POST lupercus.rez -d \"$API_VARS\" -H \"Content-Type: application/json\""
- 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\""
only:
- master