variables:
  CI_PROJECT_NAME: "minecraft"
  CI_PROJECT_DIR: "."
  CI_REGISTRY_IMAGE: hub.ducoterra.net/ducoterra/minecraft

stages:
  - build
  - test
  - deploy

build:
  only:
    variables:
    - $CI_COMMIT_TAG
  stage: build
  image:
    name: gcr.io/kaniko-project/executor:debug
    entrypoint: [""]
  script:
    - echo $DEPLOY
    - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG