Fix k8s image tag
This commit is contained in:
parent
11a4b518c6
commit
3b3b572f50
@ -43,7 +43,7 @@ steps:
|
|||||||
tags: ${DRONE_COMMIT_SHA}
|
tags: ${DRONE_COMMIT_SHA}
|
||||||
|
|
||||||
- name: Deploy a preview ApplicationSet
|
- name: Deploy a preview ApplicationSet
|
||||||
image: alpine/k8s
|
image: alpine/k8s:1.24.10
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
exclude:
|
exclude:
|
||||||
@ -51,14 +51,14 @@ steps:
|
|||||||
environment:
|
environment:
|
||||||
KUBECONFIG_CONTENT:
|
KUBECONFIG_CONTENT:
|
||||||
from_secret: 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:
|
commands:
|
||||||
- mkdir $HOME/.kube
|
- mkdir $HOME/.kube
|
||||||
- echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config
|
- echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config
|
||||||
- apk update --no-cache && apk add yq gettext
|
- apk update --no-cache && apk add yq gettext
|
||||||
- export ARGO_APP_CHART_VERSION=`cat chart/Chart.yaml | yq '.version'
|
- 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
|
- 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
|
- yq 'del(.spec.generators[].list.elements[] | select(.name == ""))' /tmp/old_application.set > /tmp/clean_appset.yaml
|
||||||
- envsubst < ./kube/template.yaml > /tmp/elements.yaml
|
- envsubst < ./kube/template.yaml > /tmp/elements.yaml
|
||||||
|
Reference in New Issue
Block a user