File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
test/integration/attestation-cmd/verify Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ # Get the root directory of the repository
5+ rootDir=" $( git rev-parse --show-toplevel) "
6+
7+ ghBuildPath=" $rootDir /bin/gh"
8+
9+ artifactPath=" $rootDir /pkg/cmd/attestation/test/data/sigstore-js-2.1.0.tgz"
10+ bundlePath=" $rootDir /pkg/cmd/attestation/test/data/sigstore-js-2.1.0_with_2_bundles.jsonl"
11+
12+ # Download a custom trusted root for verification
13+ if ! $ghBuildPath attestation trusted-root > trusted_root.jsonl; then
14+ # cleanup test data
15+ echo " Failed to download trusted root"
16+ exit 1
17+ fi
18+
19+ if ! $ghBuildPath attestation verify " $artifactPath " -b " $bundlePath " --digest-alg=sha512 --owner=sigstore --custom-trusted-root trusted_root.jsonl; then
20+ echo " Failed to verify package with a Sigstore v0.2.0 bundle"
21+ exit 1
22+ fi
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ # Get the root directory of the repository
5+ rootDir=" $( git rev-parse --show-toplevel) "
6+
7+ ghBuildPath=" $rootDir /bin/gh"
8+
9+ ghCLIArtifact=" $rootDir /pkg/cmd/attestation/test/data/gh_2.60.1_windows_arm64.zip"
10+
11+ # Verify the gh CLI artifact
12+ echo " Testing with package $ghCLIArtifact "
13+ if ! $ghBuildPath attestation verify " $ghCLIArtifact " --digest-alg=sha256 --owner=cli; then
14+ echo " Failed to verify"
15+ exit 1
16+ fi
You can’t perform that action at this time.
0 commit comments