Skip to content

Attestation scripts in CI should not compare directly against STDOUT #6190

@ChrisPenner

Description

@ChrisPenner

Currently in ci.yaml the success or failure of attestation checks is:

          RESULT=$(./scripts/proofs/tests.sh --check)
          echo "Test proof: $RESULT"
          if [[ "$RESULT" == "pass" ]]; then
            exit 0
          elif [[ "$RESULT" == "fail" ]]; then
            echo "::error::Tests previously FAILED. Fix and re-run './scripts/proofs/tests.sh'."
            exit 1
          else
            echo "::error::Test proof not found. Run './scripts/proofs/tests.sh', commit the proofs file, and push again."
            exit 1
          fi

If I want to run the script with --verbose when debugging it also means the CI job will never pass, since --verbose changes stdout.

likely:

  1. the scripts should return their status via exit code
  2. --verbose should likely output on stderr instead
  3. the ci script should check against error code, not stdout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions