Fix k8s image tag

This commit is contained in:
Nikolai Rodionov 2023-02-25 19:36:04 +01:00
parent 11a4b518c6
commit 3b3b572f50

View File

@ -43,7 +43,7 @@ steps:
tags: ${DRONE_COMMIT_SHA}
- name: Deploy a preview ApplicationSet
image: alpine/k8s
image: alpine/k8s:1.24.10
when:
branch:
exclude:
@ -51,14 +51,14 @@ steps:
environment:
KUBECONFIG_CONTENT:
from_secret: KUBECONFIG_CONTENT
ARGO_APP_BRANCH: ${DRONE_BRANCH}
ARGO_APP_HOSTNAME: "${DRONE_BRANCH}-dev.badhouseplants.net"
ARGO_APP_IMAGE_TAG: ${DRONE_COMMIT_SHA}
commands:
- mkdir $HOME/.kube
- echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config
- apk update --no-cache && apk add yq gettext
- export ARGO_APP_CHART_VERSION=`cat chart/Chart.yaml | yq '.version'
- export ARGO_APP_BRANCH=$DRONE_BRANCH
- export ARGO_APP_HOSTNAME="${DRONE_BRANCH}-dev.badhouseplants.net"
- export ARGO_APP_IMAGE_TAG=$DRONE_COMMIT_SHA
- kubectl get -f applicationset.yaml -o yaml > /tmp/old_appset.yaml
- yq 'del(.spec.generators[].list.elements[] | select(.name == ""))' /tmp/old_application.set > /tmp/clean_appset.yaml
- envsubst < ./kube/template.yaml > /tmp/elements.yaml