variables: CI_PROJECT_DIR: "." CI_REGISTRY_IMAGE: hub.ducoterra.net/ducoterra/django CI_COMMIT_TAG: 3.8.2_1 stages: - build - test - deploy push: stage: build image: name: gcr.io/kaniko-project/executor:debug entrypoint: [""] script: # - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG pip: stage: test image: name: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG entrypoint: [""] script: - echo $(pip freeze) project: stage: test image: name: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG entrypoint: [""] script: - django-admin startproject config . pods: stage: deploy image: name: ubuntu:18.04 entrypoint: [""] script: - curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl - chmod +x ./kubectl - ./kubectl version --client - ./kubectl get po