diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7e4b663..09f890a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ default: stages: - tests - - build and push + - build-and-push - deploy tests_job1: @@ -19,20 +19,24 @@ tests_job1: - pytest tests/ build_job1: - stage: build and push + image: + + +push_job: + stage: build-and-push image: name: gcr.io/kaniko-project/executor:v1.23.0-debug entrypoint: [""] before_script: - - - mkdir -p /kaniko/.docker - - cp "$DOCKER_AUTH_CONFIG" /kaniko/.docker/config.json + - mkdir -p /kaniko/.docker + - cp "$DOCKER_AUTH_CONFIG" /kaniko/.docker/config.json script: - - /kaniko/executor - --context "${CI_PROJECT_DIR}" - --dockerfile "${CI_PROJECT_DIR}/Dockerfile" - --destination "${DOCKERHUB_USER}/quote-bot:${CI_COMMIT_SHORT_SHA}" \ - --destination "${DOCKERHUB_USER}/quote-bot:latest" + - > + /kaniko/executor + --context "${CI_PROJECT_DIR}" + --dockerfile "${CI_PROJECT_DIR}/Dockerfile" + --destination "${DOCKERHUB_USER}/quote-bot:${CI_COMMIT_SHORT_SHA}" + --destination "${DOCKERHUB_USER}/quote-bot:latest" deploy_to_server: stage: deploy