Commit 96c9fc0a authored by Tom Powell's avatar Tom Powell

CI all the things!

parent 4d7520f4
Pipeline #36658217 canceled with stages
in 55 seconds
stages:
- test
- build
- deploy
test:
stage: test
......@@ -25,7 +26,22 @@ build:
- docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker build . -t $CI_REGISTRY_IMAGE:$CI_PIPELINE_IID
- docker push $CI_REGISTRY_IMAGE:$CI_PIPELINE_IID
deploy:
stage: deploy
variables:
KUBECONFIG: /kubeconfig.yml
script:
- curl -sLo /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.12.2/bin/linux/amd64/kubectl
- chmod +x /usr/local/bin/kubectl
- mkdir ~/.kube/
- echo $KUBE_CONFIG | base64 -d > $KUBECONFIG
- kubectl config view
- kubectl config set-credentials gitlab --token=$KUBE_TOKEN
- kubectl -n builds set image deployment/builds $CI_REGISTRY_IMAGE:$CI_PIPELINE_IID
- kubectl -n builds rollout status --timeout 60s deploy/builds || (kubectl -n builds rollout undo deploy/builds && false)
only:
refs:
- master
# EVERYTHING BELOW HERE CAN BE IGNORED
# DO NOT TOUCH ANYTHING BELOW THIS LINE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment