You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

40 lines
872 B

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 gitlab.rezometz.org:5678/klafyvel/klafirc:$CI_COMMIT_SHA .
build_image_test:
<<: *build_image
stage: build
except:
- master
after_script:
- "echo test: $CI_REGISTRY_IMAGE"
build_image_prod:
<<: *build_image
stage: build
after_script:
- docker tag gitlab.rezometz.org:5678/klafyvel/klafirc:$CI_COMMIT_SHA gitlab.rezometz.org:5678/klafyvel/klafirc:latest
- docker push gitlab.rezometz.org:5678/klafyvel/klafirc:latest
only:
- master
deploy:
stage: deploy
script:
- "curl -X POST lupercus.rez -d \"$API_VARS\" -H \"Content-Type: application/json\""
only:
- master