Skip to content

Commit

Permalink
Merge pull request #16035 from joshrwolf/crane-tests
Browse files Browse the repository at this point in the history
add crane tests
  • Loading branch information
joshrwolf authored Mar 29, 2024
2 parents efe3a2f + a149923 commit 330c0ca
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions crane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,26 @@ update:
github:
identifier: google/go-containerregistry
strip-prefix: v

test:
environment:
contents:
packages:
- jq
pipeline:
- name: Verify Crane installation
runs: |
crane version || exit 1
- name: Fetch and verify manifest
runs: |
crane manifest chainguard/static | jq '.schemaVersion' | grep '2' || exit 1
- name: List tags for a public image
runs: |
crane ls chainguard/static | grep -E 'latest|v[0-9]+.[0-9]+.[0-9]+' || exit 1
- name: Validate image existence
runs: |
crane digest chainguard/static:latest && echo "Image exists" || exit 1
- name: Pull and save an image locally
runs: |
crane pull chainguard/static:latest static_latest.tar || exit 1
[ -f static_latest.tar ] || exit 1

0 comments on commit 330c0ca

Please sign in to comment.