mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-01-13 08:29:38 -05:00
ci: fix Constellation recover e2e test (#1081)
* AB#2859 wait for cp to recover * AB#2859 remove unnecessary inputs & echo
This commit is contained in:
parent
fb1b1f50fd
commit
cb894e5df5
33
.github/actions/e2e_recover/action.yml
vendored
33
.github/actions/e2e_recover/action.yml
vendored
@ -11,15 +11,6 @@ inputs:
|
||||
masterSecret:
|
||||
description: "The master-secret for the cluster."
|
||||
required: true
|
||||
cloudProvider:
|
||||
description: "Which cloud provider to use."
|
||||
required: true
|
||||
gcpProject:
|
||||
description: "The GCP project Constellation is deployed in."
|
||||
required: false
|
||||
resourceGroup:
|
||||
description: "The Azure resource group Constellation is deployed in."
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
@ -55,7 +46,7 @@ runs:
|
||||
i=$(echo "$output" | grep -o "Pushed recovery key." | wc -l | sed 's/ //g')
|
||||
recovered=$((recovered+i))
|
||||
if [[ $recovered -eq ${{ inputs.controlNodesCount }} ]]; then
|
||||
exit 0
|
||||
break
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -68,6 +59,26 @@ runs:
|
||||
echo "Did not recover all nodes yet, retrying in 5 seconds [$recovered/${{ inputs.controlNodesCount }}]"
|
||||
sleep 5
|
||||
done
|
||||
kubectl wait --for=condition=Ready --timeout=10m --all nodes
|
||||
- name: Wait for control plane to get back up
|
||||
shell: bash
|
||||
run: |
|
||||
timeout=600
|
||||
start_time=$(date +%s)
|
||||
while true; do
|
||||
output=$(kubectl wait --for=condition=Ready --timeout=10m --all nodes || true)
|
||||
if echo "$output" | grep -q "condition met"; then
|
||||
echo "$output"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
current_time=$(date +%s)
|
||||
if ((current_time - start_time > timeout)); then
|
||||
echo "Waiting for control plane to get back up timed out after $timeout seconds."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Cannot reach control plane, retrying in 10 seconds"
|
||||
sleep 10
|
||||
done
|
||||
env:
|
||||
KUBECONFIG: ${{ inputs.kubeconfig }}
|
||||
|
3
.github/actions/e2e_test/action.yml
vendored
3
.github/actions/e2e_test/action.yml
vendored
@ -233,8 +233,5 @@ runs:
|
||||
uses: ./.github/actions/e2e_recover
|
||||
with:
|
||||
controlNodesCount: ${{ inputs.controlNodesCount }}
|
||||
cloudProvider: ${{ inputs.cloudProvider }}
|
||||
gcpProject: ${{ inputs.gcpProject }}
|
||||
kubeconfig: ${{ steps.constellation-create.outputs.kubeconfig }}
|
||||
masterSecret: ${{ steps.constellation-create.outputs.masterSecret }}
|
||||
azureResourceGroup: ${{ inputs.azureResourceGroup }}
|
||||
|
Loading…
Reference in New Issue
Block a user