Skip to content
Snippets Groups Projects
Commit ba58a771 authored by Daniel Holmer's avatar Daniel Holmer
Browse files

Merge branch 'filtered_scream' of gitlab.liu.se:diginclude/sapis into filtered_scream

parents de2c9d9d 52bd5040
No related branches found
No related tags found
No related merge requests found
Pipeline #66170 skipped
......@@ -9,11 +9,13 @@ push:image:
when: manual
image:
name: gcr.io/kaniko-project/executor:debug
#name: gcr.io/kaniko-project/executor:v1.6.0
entrypoint: []
script:
- mkdir -p /root/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_JOB_TOKEN\"}}}"
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_JOB_TOKEN\"}}}" > /root/.docker/config.json
#- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_JOB_TOKEN\"}}}" > /root/.docker/config.json
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(echo -n ${CI_REGISTRY_USER}:${CI_REGISTRY_PASSWORD} | base64)\"}}}" > /root/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile $DOCKER_PROXY --destination $CI_REGISTRY_IMAGE --verbosity warn
......@@ -21,7 +23,7 @@ push:image:
checkit:
stage: deploy
when: manual
image: boxboat/kubectl
#image: boxboat/kubectl
#image: lachlanevenson/k8s-kubectl
environment:
name: production
......@@ -31,58 +33,7 @@ checkit:
- echo $CI_ENVIRONMENT_SLUG
- echo $CI_PROJECT_PATH_SLUG
- echo $CI_REGISTRY_IMAGE
- kubectl get pods --output=wide
- kubectl describe pod
#- kubectl get pods --output=wide
#- kubectl describe pod
.start:environment:
stage: deploy
image: boxboat/kubectl
before_script: []
environment:
name: production
script:
- kubectl -v=4 apply -f $CI_PROJECT_DIR/sapis_setup.yml
- kubectl apply -f ./sapis_service.yml
- kubectl apply -f sapis_deploy.yml
- kubectl get pods
only:
- test_for_deploy
#variables:
# GIT_STRATEGY: none
.stop:environment:
stage: deploy
when: manual
image: boxboat/kubectl
before_script: []
script:
- kubectl delete deploy rune-sapis
- kubectl delete svc rune-sapis
- ls
# Only exists on production environment, so failed deletion is not an error
- kubectl delete ingress rune-sapis || true
variables:
GIT_STRATEGY: none
deploy:production:
stage: deploy
extends: .start:environment
environment:
name: production
on_stop: stop:production
#script:
# - echo "$CI_ENVIRONMENT_NAME"
# - echo "$CI_ENVIRONMENT_SLUG"
# - echo "$CI_PROJECT_PATH_SLUG"
# - echo "$CI_REGISTRY_IMAGE"
stop:production:
extends: .stop:environment
environment:
name: production
action: stop
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment