ci: remove force flag from CLI commands (#2479)

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2023-10-20 08:10:26 +02:00 committed by GitHub
parent 6c0a3b8efa
commit eeaba28d02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 11 deletions

View File

@ -124,16 +124,13 @@ runs:
run: | run: |
yq eval -i '(.internalLoadBalancer) = true' constellation-conf.yaml yq eval -i '(.internalLoadBalancer) = true' constellation-conf.yaml
# Uses --force flag since the CLI currently does not have a pre-release version and is always on the latest released version.
# However, many of our pipelines work on prerelease images. Thus the used images are newer than the CLI's version.
# This makes the version validation in the CLI fail.
- name: Constellation create - name: Constellation create
shell: bash shell: bash
run: | run: |
echo "Creating cluster using config:" echo "Creating cluster using config:"
cat constellation-conf.yaml cat constellation-conf.yaml
sudo sh -c 'echo "127.0.0.1 license.confidential.cloud" >> /etc/hosts' || true sudo sh -c 'echo "127.0.0.1 license.confidential.cloud" >> /etc/hosts' || true
constellation create -y --force --debug --tf-log=DEBUG constellation create -y --debug --tf-log=DEBUG
- name: Cdbg deploy - name: Cdbg deploy
if: inputs.isDebugImage == 'true' if: inputs.isDebugImage == 'true'
@ -150,7 +147,7 @@ runs:
id: constellation-init id: constellation-init
shell: bash shell: bash
run: | run: |
constellation init --force --debug constellation init --debug
echo "KUBECONFIG=$(pwd)/constellation-admin.conf" | tee -a $GITHUB_OUTPUT echo "KUBECONFIG=$(pwd)/constellation-admin.conf" | tee -a $GITHUB_OUTPUT
- name: Wait for nodes to join and become ready - name: Wait for nodes to join and become ready

View File

@ -27,7 +27,7 @@ runs:
echo "Re-enabling the join-service and waiting for the node to be back up" echo "Re-enabling the join-service and waiting for the node to be back up"
kubectl patch daemonset -n kube-system join-service --type=json -p='[{"op": "remove", "path": "/spec/template/spec/nodeSelector/some-tag"}]' kubectl patch daemonset -n kube-system join-service --type=json -p='[{"op": "remove", "path": "/spec/template/spec/nodeSelector/some-tag"}]'
kubectl wait --for=condition=Ready=true --timeout=10m --all nodes kubectl wait --for=condition=Ready=true --timeout=10m --all nodes
- name: Restart all control plane nodes - name: Restart all control plane nodes
shell: bash shell: bash
env: env:
@ -37,7 +37,7 @@ runs:
for CONTROL_PLANE_NODE in ${CONTROL_PLANE_NODES}; do for CONTROL_PLANE_NODE in ${CONTROL_PLANE_NODES}; do
kubectl debug node/$CONTROL_PLANE_NODE --image=ubuntu -- bash -c "echo reboot > reboot.sh && chroot /host < reboot.sh" kubectl debug node/$CONTROL_PLANE_NODE --image=ubuntu -- bash -c "echo reboot > reboot.sh && chroot /host < reboot.sh"
done done
- name: Constellation recover - name: Constellation recover
shell: bash shell: bash
run: | run: |
@ -45,7 +45,7 @@ runs:
start_time=$(date +%s) start_time=$(date +%s)
recovered=0 recovered=0
while true; do while true; do
output=$(constellation recover --force) output=$(constellation recover)
if echo "$output" | grep -q "Pushed recovery key."; then if echo "$output" | grep -q "Pushed recovery key."; then
echo "$output" echo "$output"
i=$(echo "$output" | grep -o "Pushed recovery key." | wc -l | sed 's/ //g') i=$(echo "$output" | grep -o "Pushed recovery key." | wc -l | sed 's/ //g')

View File

@ -39,7 +39,7 @@ runs:
- name: Constellation verify - name: Constellation verify
shell: bash shell: bash
run: constellation verify --cluster-id $(yq -r ".clusterValues.clusterID" constellation-state.yaml) --force run: constellation verify --cluster-id $(yq -r ".clusterValues.clusterID" constellation-state.yaml)
- name: Verify all nodes - name: Verify all nodes
shell: bash shell: bash
@ -68,9 +68,9 @@ runs:
if [[ ${{ inputs.cloudProvider }} == "azure" ]]; then if [[ ${{ inputs.cloudProvider }} == "azure" ]]; then
echo "Extracting Azure TCB versions for API update" echo "Extracting Azure TCB versions for API update"
constellation verify --cluster-id "${clusterID}" --force --node-endpoint localhost:9090 -o json > "snp-report-${node}.json" constellation verify --cluster-id "${clusterID}" --node-endpoint localhost:9090 -o json > "snp-report-${node}.json"
else else
constellation verify --cluster-id "${clusterID}" --force --node-endpoint localhost:9090 constellation verify --cluster-id "${clusterID}" --node-endpoint localhost:9090
fi fi
kill $forwarderPID kill $forwarderPID