Skip to content

Commit

Permalink
ci: parse ovmf binaries from metadata (#1962)
Browse files Browse the repository at this point in the history
Subsequently the metadata will be uploaded to the
attestationconfigapi so the CLI can use the data to
precalculate measurements.
  • Loading branch information
derpsteb authored Jul 27, 2023
1 parent 28e29ff commit 583d302
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/aws-snp-launchmeasurement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,19 @@ jobs:
ovmfPath=$(realpath result/ovmf_img.fd)
echo "ovmfPath=${ovmfPath}" | tee -a "$GITHUB_OUTPUT"
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # tag=v3.5.2
with:
repository: IBM/sev-snp-measure.git
repository: edgelesssys/sev-snp-measure-go.git
ref: main
path: sev-snp-measure
path: sev-snp-measure-go


- name: Run sev-snp-measure
- name: Generate API objects
shell: bash
run: |
pushd sev-snp-measure || exit 1
echo '[]' > intermediate.json
for vcpus in 2 4 8 16 32 48 64;
do
measurement="$(./sev-snp-measure.py --mode snp --vmm-type=ec2 --vcpus="$vcpus" --ovmf=${{ steps.build-uefi.outputs.ovmfPath }})"
pushd sev-snp-measure-go/sevsnpmeasure || exit 1
go build .
jq --arg vcpus "$vcpus" --arg measurement "$measurement" '. += [{"vcpus": $vcpus, "measurement": $measurement}]' intermediate.json > measurements.json
cp measurements.json intermediate.json
done
./sevsnpmeasure parse-metadata ${{ steps.build-uefi.outputs.ovmfPath }} -o metadata.json
jq < measurements.json
jq < metadata.json

0 comments on commit 583d302

Please sign in to comment.