new standard deploy templates
This commit is contained in:
@@ -36,15 +36,14 @@ deploy:
|
||||
- $CI_COMMIT_TAG
|
||||
stage: deploy
|
||||
image:
|
||||
name: debian:latest
|
||||
name: debian:10
|
||||
entrypoint: [""]
|
||||
script:
|
||||
- echo $CI_REGISTRY_IMAGE
|
||||
- apt -qq update >> /dev/null && apt -qq install -y curl gettext >> /dev/null
|
||||
- curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
|
||||
- chmod +x ./kubectl
|
||||
- envsubst < k8s/deploy.yaml > out.yaml
|
||||
- mv out.yaml k8s/deploy.yaml
|
||||
- ./kubectl apply -f k8s
|
||||
- mkdir /deploy
|
||||
- for f in $(find k8s -regex '.*\\.ya*ml); do envsubst < $f > "/deploy/$(basename $f)"; done'
|
||||
- ./kubectl apply -f /deploy
|
||||
- ./kubectl rollout status deploy $DEPLOY
|
||||
- ./kubectl exec $(./kubectl get pods --selector=app=$DEPLOY --output=jsonpath='{.items[*].metadata.name}') -- python manage.py migrate
|
||||
Reference in New Issue
Block a user