stages:
- build
- test
- push
- deploy

variables:
REGISTRY_GROUP_PROJECT: $CI_REGISTRY/root/restexamples

before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY

build-image:
stage: build
script:
- docker build . --tag $REGISTRY_GROUP_PROJECT/restexamples:latest

test-image:
stage: test
script:
- echo Insert fancy API test here!

push-image:
stage: push
script:
- docker push $REGISTRY_GROUP_PROJECT/restexamples:latest

deploy-2-dev:
stage: deploy
script:
- echo You should use Ansible here!
environment:
name: dev
url: https://dev.jonashackt.io

