From 3842e50c4971b9f07c8243a2cf4fa36a1d54d22b Mon Sep 17 00:00:00 2001 From: Fabian Kammel Date: Wed, 20 Jul 2022 10:47:22 +0200 Subject: [PATCH] use common boostrapperhost field and wait before reading pcr values (#281) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * use common boostrapperhost field and wait before reading pcr values * use wait to be more explicit about goal Signed-off-by: Fabian Kammel Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com> --- .github/actions/constellation_measure/action.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/actions/constellation_measure/action.yml b/.github/actions/constellation_measure/action.yml index fde20c88f..690596f8b 100644 --- a/.github/actions/constellation_measure/action.yml +++ b/.github/actions/constellation_measure/action.yml @@ -41,17 +41,14 @@ runs: # for why we ignore certain measurement values. - name: Fetch PCRs run: | + KUBECONFIG="$PWD/constellation-admin.conf" kubectl wait ds/verification-service -n kube-system --for condition=available + CONSTELL_IP=$(jq -r ".bootstrapperhost" constellation-state.json) + pcr-reader --constell-ip ${CONSTELL_IP} -format yaml > measurements.yaml case $CSP in azure) - FIRST_NODE=$(jq -r ".azurecontrolplanes | keys | first" constellation-state.json) - CONSTELL_IP=$(jq -r ".azurecontrolplanes.\"${FIRST_NODE}\".PublicIP" constellation-state.json) - pcr-reader --constell-ip ${CONSTELL_IP} -format yaml > measurements.yaml yq e 'del(.[0,6,10,11,12,13,14,15,16,17,18,19,20,21,22,23])' -i measurements.yaml ;; gcp) - FIRST_NODE=$(jq -r ".gcpcontrolplanes | keys | first" constellation-state.json) - CONSTELL_IP=$(jq -r ".gcpcontrolplanes.\"${FIRST_NODE}\".PublicIP" constellation-state.json) - pcr-reader --constell-ip ${CONSTELL_IP} -format yaml > measurements.yaml yq e 'del(.[11,12,13,14,15,16,17,18,19,20,21,22,23])' -i measurements.yaml ;; esac