variables: GIT_SUBMODULE_STRATEGY: recursive stages: - build - deploy test: stage: build image: name: gcr.io/kaniko-project/executor:debug entrypoint: [""] script: - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --no-push except: - master build: stage: build image: name: gcr.io/kaniko-project/executor:debug entrypoint: [""] script: - cp $DOCKER_SECRET_CONFIG /kaniko/.docker/config.json - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination indiepaas/website:$CI_COMMIT_SHORT_SHA only: - master deploy: stage: deploy tags: - deploy image: name: lachlanevenson/k8s-kubectl entrypoint: [""] script: - cat $CI_PROJECT_DIR/k8s.yml | sed "s/latest/$CI_COMMIT_SHORT_SHA/" | kubectl apply -f - only: - master