mirror of
https://github.com/siderolabs/talos.git
synced 2025-08-19 05:31:14 +02:00
chore: Fix azure image upload
Single quote causes variable to not be evaluated Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
This commit is contained in:
parent
9b91cd4511
commit
b1dc400fea
@ -24,7 +24,7 @@ az login --service-principal --username ${CLIENT_ID} --password ${CLIENT_SECRET}
|
|||||||
AZURE_STORAGE_CONNECTION_STRING=$(az storage account show-connection-string -n ${STORAGE_ACCOUNT} -g ${GROUP} -o tsv)
|
AZURE_STORAGE_CONNECTION_STRING=$(az storage account show-connection-string -n ${STORAGE_ACCOUNT} -g ${GROUP} -o tsv)
|
||||||
|
|
||||||
## Push blob
|
## Push blob
|
||||||
AZURE_STORAGE_CONNECTION_STRING='${AZURE_STORAGE_CONNECTION_STRING}' az storage blob upload --container-name ${STORAGE_CONTAINER} -f ${TMP}/azure.vhd -n azure-${TAG}.vhd
|
AZURE_STORAGE_CONNECTION_STRING="${AZURE_STORAGE_CONNECTION_STRING}" az storage blob upload --container-name ${STORAGE_CONTAINER} -f ${TMP}/azure.vhd -n azure-${TAG}.vhd
|
||||||
|
|
||||||
## Delete image
|
## Delete image
|
||||||
az image delete --name talos-e2e-${TAG} -g ${GROUP}
|
az image delete --name talos-e2e-${TAG} -g ${GROUP}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -eou pipefail
|
set -eou pipefail
|
||||||
|
|
||||||
|
PLATFORM=""
|
||||||
|
|
||||||
source ./hack/test/e2e-runner.sh
|
source ./hack/test/e2e-runner.sh
|
||||||
|
|
||||||
## Create tmp dir
|
## Create tmp dir
|
||||||
@ -16,7 +18,7 @@ e2e_run "kubectl apply -f ${TMP}/provider-components.yaml -f ${TMP}/capi-secrets
|
|||||||
## Wait for talosconfig in cm then dump it out
|
## Wait for talosconfig in cm then dump it out
|
||||||
e2e_run "timeout=\$((\$(date +%s) + ${TIMEOUT}))
|
e2e_run "timeout=\$((\$(date +%s) + ${TIMEOUT}))
|
||||||
pod='pod/cluster-api-provider-talos-controller-manager-0'
|
pod='pod/cluster-api-provider-talos-controller-manager-0'
|
||||||
until KUBECONFIG=${TMP}/kubeconfig kubectl wait --timeout=1s --for=condition=Ready -n ${CAPI_NS} ${pod}; do
|
until KUBECONFIG=${TMP}/kubeconfig kubectl wait --timeout=1s --for=condition=Ready -n ${CAPI_NS} \${pod}; do
|
||||||
[[ \$(date +%s) -gt \$timeout ]] && exit 1
|
[[ \$(date +%s) -gt \$timeout ]] && exit 1
|
||||||
echo 'Waiting to CAPT pod to be available...'
|
echo 'Waiting to CAPT pod to be available...'
|
||||||
sleep 10
|
sleep 10
|
||||||
|
@ -10,10 +10,10 @@ NAME_PREFIX="talos-e2e-${TAG}-${PLATFORM}"
|
|||||||
|
|
||||||
## Cleanup the platform resources upon any exit
|
## Cleanup the platform resources upon any exit
|
||||||
cleanup() {
|
cleanup() {
|
||||||
e2e_run "kubectl delete machine ${NAME_PREFIX}-master-0 ${NAME_PREFIX}-master-1 ${NAME_PREFIX}-master-2
|
e2e_run "KUBECONFIG=${TMP}/kubeconfig kubectl delete machine ${NAME_PREFIX}-master-0 ${NAME_PREFIX}-master-1 ${NAME_PREFIX}-master-2
|
||||||
kubectl scale machinedeployment ${NAME_PREFIX}-workers --replicas=0
|
KUBECONFIG=${TMP}/kubeconfig kubectl scale machinedeployment ${NAME_PREFIX}-workers --replicas=0
|
||||||
kubectl delete machinedeployment ${NAME_PREFIX}-workers
|
KUBECONFIG=${TMP}/kubeconfig kubectl delete machinedeployment ${NAME_PREFIX}-workers
|
||||||
kubectl delete cluster ${NAME_PREFIX}"
|
KUBECONFIG=${TMP}/kubeconfig kubectl delete cluster ${NAME_PREFIX}"
|
||||||
}
|
}
|
||||||
|
|
||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
@ -22,7 +22,7 @@ trap cleanup EXIT
|
|||||||
sed "s/{{TAG}}/${TAG}/" ${PWD}/hack/test/manifests/${PLATFORM}-cluster.yaml > ${TMPPLATFORM}/cluster.yaml
|
sed "s/{{TAG}}/${TAG}/" ${PWD}/hack/test/manifests/${PLATFORM}-cluster.yaml > ${TMPPLATFORM}/cluster.yaml
|
||||||
|
|
||||||
## Download kustomize and template out capi cluster, then deploy it
|
## Download kustomize and template out capi cluster, then deploy it
|
||||||
e2e_run "kubectl apply -f ${TMPPLATFORM}/cluster.yaml"
|
e2e_run "KUBECONFIG=${TMP}/kubeconfig kubectl apply -f ${TMPPLATFORM}/cluster.yaml"
|
||||||
|
|
||||||
## Wait for talosconfig in cm then dump it out
|
## Wait for talosconfig in cm then dump it out
|
||||||
e2e_run "timeout=\$((\$(date +%s) + ${TIMEOUT}))
|
e2e_run "timeout=\$((\$(date +%s) + ${TIMEOUT}))
|
||||||
@ -30,7 +30,7 @@ e2e_run "timeout=\$((\$(date +%s) + ${TIMEOUT}))
|
|||||||
[[ \$(date +%s) -gt \$timeout ]] && exit 1
|
[[ \$(date +%s) -gt \$timeout ]] && exit 1
|
||||||
sleep 10
|
sleep 10
|
||||||
done
|
done
|
||||||
kubectl get cm -n ${CAPI_NS} ${NAME_PREFIX}-master-0 -o jsonpath='{.data.talosconfig}' > ${TALOSCONFIG}"
|
KUBECONFIG=${TMP}/kubeconfig kubectl get cm -n ${CAPI_NS} ${NAME_PREFIX}-master-0 -o jsonpath='{.data.talosconfig}' > ${TALOSCONFIG}"
|
||||||
|
|
||||||
## Wait for kubeconfig from capi master-0
|
## Wait for kubeconfig from capi master-0
|
||||||
e2e_run "timeout=\$((\$(date +%s) + ${TIMEOUT}))
|
e2e_run "timeout=\$((\$(date +%s) + ${TIMEOUT}))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user