mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-05 20:40:16 -08:00
test: use aquasecurity repository for test images (#8677)
This commit is contained in:
8
.github/workflows/cache-test-images.yaml
vendored
8
.github/workflows/cache-test-images.yaml
vendored
@@ -27,7 +27,7 @@ jobs:
|
||||
run: |
|
||||
source integration/testimages.ini
|
||||
IMAGE_LIST=$(skopeo list-tags docker://$TEST_IMAGES)
|
||||
DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags += ["containerd"] | .Tags | sort' | sha256sum | cut -d' ' -f1)
|
||||
DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags += ["containerd"] | .Tags |= sort' | sha256sum | cut -d' ' -f1)
|
||||
echo "digest=$DIGEST" >> $GITHUB_OUTPUT
|
||||
|
||||
## We need to work with test image cache only for main branch
|
||||
@@ -37,8 +37,6 @@ jobs:
|
||||
with:
|
||||
path: integration/testdata/fixtures/images
|
||||
key: cache-test-images-${{ steps.image-digest.outputs.digest }}
|
||||
restore-keys:
|
||||
cache-test-images-
|
||||
|
||||
- name: Download test images
|
||||
if: github.ref_name == 'main'
|
||||
@@ -66,7 +64,7 @@ jobs:
|
||||
run: |
|
||||
source integration/testimages.ini
|
||||
IMAGE_LIST=$(skopeo list-tags docker://$TEST_VM_IMAGES)
|
||||
DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags | sort' | sha256sum | cut -d' ' -f1)
|
||||
DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags |= sort' | sha256sum | cut -d' ' -f1)
|
||||
echo "digest=$DIGEST" >> $GITHUB_OUTPUT
|
||||
|
||||
## We need to work with test VM image cache only for main branch
|
||||
@@ -76,8 +74,6 @@ jobs:
|
||||
with:
|
||||
path: integration/testdata/fixtures/vm-images
|
||||
key: cache-test-vm-images-${{ steps.image-digest.outputs.digest }}
|
||||
restore-keys:
|
||||
cache-test-vm-images-
|
||||
|
||||
- name: Download test VM images
|
||||
if: github.ref_name == 'main'
|
||||
|
||||
12
.github/workflows/test.yaml
vendored
12
.github/workflows/test.yaml
vendored
@@ -86,7 +86,7 @@ jobs:
|
||||
run: |
|
||||
source integration/testimages.ini
|
||||
IMAGE_LIST=$(skopeo list-tags docker://$TEST_IMAGES)
|
||||
DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags += ["containerd"] | .Tags | sort' | sha256sum | cut -d' ' -f1)
|
||||
DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags += ["containerd"] | .Tags |= sort' | sha256sum | cut -d' ' -f1)
|
||||
echo "digest=$DIGEST" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Restore test images from cache
|
||||
@@ -94,8 +94,6 @@ jobs:
|
||||
with:
|
||||
path: integration/testdata/fixtures/images
|
||||
key: cache-test-images-${{ steps.image-digest.outputs.digest }}
|
||||
restore-keys:
|
||||
cache-test-images-
|
||||
|
||||
- name: Run integration tests
|
||||
run: mage test:integration
|
||||
@@ -140,7 +138,7 @@ jobs:
|
||||
run: |
|
||||
source integration/testimages.ini
|
||||
IMAGE_LIST=$(skopeo list-tags docker://$TEST_IMAGES)
|
||||
DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags += ["containerd"] | .Tags | sort' | sha256sum | cut -d' ' -f1)
|
||||
DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags += ["containerd"] | .Tags |= sort' | sha256sum | cut -d' ' -f1)
|
||||
echo "digest=$DIGEST" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Restore test images from cache
|
||||
@@ -148,8 +146,6 @@ jobs:
|
||||
with:
|
||||
path: integration/testdata/fixtures/images
|
||||
key: cache-test-images-${{ steps.image-digest.outputs.digest }}
|
||||
restore-keys:
|
||||
cache-test-images-
|
||||
|
||||
- name: Run module integration tests
|
||||
shell: bash
|
||||
@@ -177,7 +173,7 @@ jobs:
|
||||
run: |
|
||||
source integration/testimages.ini
|
||||
IMAGE_LIST=$(skopeo list-tags docker://$TEST_VM_IMAGES)
|
||||
DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags | sort' | sha256sum | cut -d' ' -f1)
|
||||
DIGEST=$(echo "$IMAGE_LIST" | jq '.Tags |= sort' | sha256sum | cut -d' ' -f1)
|
||||
echo "digest=$DIGEST" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Restore test VM images from cache
|
||||
@@ -185,8 +181,6 @@ jobs:
|
||||
with:
|
||||
path: integration/testdata/fixtures/vm-images
|
||||
key: cache-test-vm-images-${{ steps.image-digest.outputs.digest }}
|
||||
restore-keys:
|
||||
cache-test-vm-images-
|
||||
|
||||
- name: Run vm integration tests
|
||||
run: |
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# Configuration file for both shell scripts and Go programs
|
||||
TEST_IMAGES=ghcr.io/knqyf263/trivy-test-images
|
||||
TEST_VM_IMAGES=ghcr.io/knqyf263/trivy-test-vm-images
|
||||
TEST_IMAGES=ghcr.io/aquasecurity/trivy-test-images
|
||||
TEST_VM_IMAGES=ghcr.io/aquasecurity/trivy-test-vm-images
|
||||
|
||||
Reference in New Issue
Block a user