mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-06-28 07:57:23 -04:00
ci: fix relative paths for verify e2e test (#3249)
* Use absolute paths to avoid issues with bazel run changing working directory * Fix error message in attestationconfig cli --------- Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
65ed286c7d
commit
e08ed38be8
2 changed files with 10 additions and 3 deletions
9
.github/actions/e2e_verify/action.yml
vendored
9
.github/actions/e2e_verify/action.yml
vendored
|
@ -96,7 +96,14 @@ runs:
|
||||||
run: |
|
run: |
|
||||||
reports=attestation-report-*.json
|
reports=attestation-report-*.json
|
||||||
|
|
||||||
report=$(bazel run //internal/api/attestationconfigapi/cli -- compare ${{ inputs.attestationVariant }} ${reports})
|
# bazel run changes the working directory
|
||||||
|
# convert the relative paths to absolute paths to avoid issues
|
||||||
|
absolute_reports=""
|
||||||
|
for report in ${reports}; do
|
||||||
|
absolute_reports="${absolute_reports} $(realpath "${report}")"
|
||||||
|
done
|
||||||
|
|
||||||
|
report=$(bazel run //internal/api/attestationconfigapi/cli -- compare ${{ inputs.attestationVariant }} ${absolute_reports})
|
||||||
|
|
||||||
path=$(realpath "${report}")
|
path=$(realpath "${report}")
|
||||||
cat "${path}"
|
cat "${path}"
|
||||||
|
|
|
@ -66,13 +66,13 @@ func compareVersions(attestationVariant variant.Variant, files []string, fs file
|
||||||
lowestVersion := files[0]
|
lowestVersion := files[0]
|
||||||
lowestReport, err := readReport(files[0], fs)
|
lowestReport, err := readReport(files[0], fs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("reading tdx report: %w", err)
|
return "", fmt.Errorf("reading report: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, file := range files[1:] {
|
for _, file := range files[1:] {
|
||||||
report, err := readReport(file, fs)
|
report, err := readReport(file, fs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("reading tdx report: %w", err)
|
return "", fmt.Errorf("reading report: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if client.IsInputNewerThanOtherVersion(attestationVariant, lowestReport, report) {
|
if client.IsInputNewerThanOtherVersion(attestationVariant, lowestReport, report) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue