Update .gitlab-ci.yml file
This commit is contained in:
+17
-7
@@ -3,16 +3,10 @@ default:
|
|||||||
- universal
|
- universal
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- build
|
|
||||||
- tests
|
- tests
|
||||||
|
- build and push
|
||||||
- deploy
|
- deploy
|
||||||
|
|
||||||
build_job1:
|
|
||||||
stage: build
|
|
||||||
image: docker:latest
|
|
||||||
script:
|
|
||||||
- docker build -t quote-bot:v1 .
|
|
||||||
|
|
||||||
tests_job1:
|
tests_job1:
|
||||||
stage: tests
|
stage: tests
|
||||||
image: python:3.11-slim
|
image: python:3.11-slim
|
||||||
@@ -24,6 +18,22 @@ tests_job1:
|
|||||||
script:
|
script:
|
||||||
- pytest tests/
|
- pytest tests/
|
||||||
|
|
||||||
|
build_job1:
|
||||||
|
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
|
||||||
|
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"
|
||||||
|
|
||||||
deploy_to_server:
|
deploy_to_server:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
image: ghcr.io/ansible/creator-ee:v0.22.0
|
image: ghcr.io/ansible/creator-ee:v0.22.0
|
||||||
|
|||||||
Reference in New Issue
Block a user