test vars
This commit is contained in:
@@ -1,8 +1,6 @@
|
|||||||
variables:
|
variables:
|
||||||
CI_PROJECT_DIR: "."
|
CI_PROJECT_DIR: "."
|
||||||
CI_REGISTRY_IMAGE: hub.ducoterra.net/ducoterra/mysite
|
CI_REGISTRY_IMAGE: hub.ducoterra.net/ducoterra/mysite
|
||||||
DEPLOY_TEST: test
|
|
||||||
DEPLOY_PROD: prod
|
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
@@ -10,6 +8,8 @@ stages:
|
|||||||
- deploy
|
- deploy
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
variables:
|
||||||
|
DEPLOY: test
|
||||||
only:
|
only:
|
||||||
variables:
|
variables:
|
||||||
- $CI_COMMIT_TAG
|
- $CI_COMMIT_TAG
|
||||||
@@ -18,6 +18,7 @@ build:
|
|||||||
name: gcr.io/kaniko-project/executor:debug
|
name: gcr.io/kaniko-project/executor:debug
|
||||||
entrypoint: [""]
|
entrypoint: [""]
|
||||||
script:
|
script:
|
||||||
|
- echo $DEPLOY
|
||||||
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
|
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@@ -32,6 +33,8 @@ test:
|
|||||||
- python manage.py test
|
- python manage.py test
|
||||||
|
|
||||||
deploy_to_test:
|
deploy_to_test:
|
||||||
|
variables:
|
||||||
|
DEPLOY: test
|
||||||
stage: deploy
|
stage: deploy
|
||||||
only:
|
only:
|
||||||
variables:
|
variables:
|
||||||
@@ -52,6 +55,8 @@ deploy_to_test:
|
|||||||
- ./kubectl exec $POD -- python manage.py migrate
|
- ./kubectl exec $POD -- python manage.py migrate
|
||||||
|
|
||||||
deploy_to_prod:
|
deploy_to_prod:
|
||||||
|
variables:
|
||||||
|
DEPLOY: test
|
||||||
stage: deploy
|
stage: deploy
|
||||||
only:
|
only:
|
||||||
variables:
|
variables:
|
||||||
|
|||||||
Reference in New Issue
Block a user