mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 08:23:15 +01:00
change mac acceptance test image.tar path
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
parent
cca9d33b36
commit
0c100c4037
2
.github/workflows/validations.yaml
vendored
2
.github/workflows/validations.yaml
vendored
@ -311,7 +311,7 @@ jobs:
|
|||||||
id: go-cache
|
id: go-cache
|
||||||
uses: actions/cache@v2.1.3
|
uses: actions/cache@v2.1.3
|
||||||
with:
|
with:
|
||||||
path: /tmp/image.tar
|
path: image.tar
|
||||||
key: ${{ runner.os }}-${{ hashFiles('test/acceptance/mac.sh') }}
|
key: ${{ runner.os }}-${{ hashFiles('test/acceptance/mac.sh') }}
|
||||||
|
|
||||||
- name: Run Acceptance Tests (Mac)
|
- name: Run Acceptance Tests (Mac)
|
||||||
|
|||||||
@ -7,7 +7,7 @@ ACC_DIR=$2
|
|||||||
TEST_IMAGE=$3
|
TEST_IMAGE=$3
|
||||||
RESULTSDIR=$4
|
RESULTSDIR=$4
|
||||||
|
|
||||||
TEST_IMAGE_TAR=/tmp/image.tar
|
TEST_IMAGE_TAR=image.tar
|
||||||
TEST_TYPE=mac
|
TEST_TYPE=mac
|
||||||
WORK_DIR=`mktemp -d -t "syft-acceptance-test-${TEST_TYPE}-XXXXXX"`
|
WORK_DIR=`mktemp -d -t "syft-acceptance-test-${TEST_TYPE}-XXXXXX"`
|
||||||
NORMAL_TEST_IMAGE=$(echo ${TEST_IMAGE} | tr ':' '-' )
|
NORMAL_TEST_IMAGE=$(echo ${TEST_IMAGE} | tr ':' '-' )
|
||||||
@ -29,18 +29,20 @@ function cleanup {
|
|||||||
|
|
||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
|
|
||||||
# install skopeo
|
|
||||||
skopeo --version || brew install skopeo
|
|
||||||
|
|
||||||
# fetch test image
|
# fetch test image
|
||||||
[[ -f ${TEST_IMAGE_TAR} ]] || skopeo --override-os linux copy "docker://docker.io/${TEST_IMAGE}" "docker-archive:${TEST_IMAGE_TAR}"
|
if [[ -f ${TEST_IMAGE_TAR} ]]
|
||||||
ls -alh ${TEST_IMAGE_TAR}
|
then
|
||||||
|
echo "using existing image"
|
||||||
|
else
|
||||||
|
skopeo --version || brew install skopeo
|
||||||
|
skopeo --override-os linux copy "docker://docker.io/${TEST_IMAGE}" "docker-archive:${TEST_IMAGE_TAR}"
|
||||||
|
fi
|
||||||
|
|
||||||
# run syft
|
# run syft
|
||||||
SYFT_PATH="${DISTDIR}/syft-macos_darwin_amd64/syft"
|
SYFT_PATH="${DISTDIR}/syft-macos_darwin_amd64/syft"
|
||||||
chmod 755 "${SYFT_PATH}"
|
chmod 755 "${SYFT_PATH}"
|
||||||
"${SYFT_PATH}" version
|
"${SYFT_PATH}" version
|
||||||
SYFT_CHECK_FOR_APP_UPDATE=0 "${SYFT_PATH}" packages docker-archive://${TEST_IMAGE_TAR} -vv -o json > "${REPORT}"
|
SYFT_CHECK_FOR_APP_UPDATE=0 "${SYFT_PATH}" packages docker-archive:${TEST_IMAGE_TAR} -vv -o json > "${REPORT}"
|
||||||
|
|
||||||
# keep the generated report around
|
# keep the generated report around
|
||||||
mkdir -p ${RESULTSDIR}
|
mkdir -p ${RESULTSDIR}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user