From 9ecd46e4d07d6d87ec4b667ba78e2732e3d9dfdb Mon Sep 17 00:00:00 2001 From: Andrei Aaron Date: Tue, 29 Aug 2023 19:09:52 +0300 Subject: [PATCH] ci(end-to-end): Fix a few issues with the workflow (#380) - free up disk space before running tests - remove uneeded call to /v2/_catalog. - add a check to make sure the images are scanned for CVEs before tests start Signed-off-by: Andrei Aaron --- .github/workflows/end-to-end-test.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/end-to-end-test.yml b/.github/workflows/end-to-end-test.yml index af107043..d3c99984 100644 --- a/.github/workflows/end-to-end-test.yml +++ b/.github/workflows/end-to-end-test.yml @@ -23,6 +23,14 @@ jobs: runs-on: ubuntu-latest steps: + - name: Cleanup disk space + run: | + # To free up ~15 GB of disk space + sudo rm -rf /opt/ghc + sudo rm -rf /usr/local/share/boost + sudo rm -rf /usr/local/lib/android + sudo rm -rf /usr/share/dotnet + - name: Checkout zui repository uses: actions/checkout@v3 with: @@ -116,10 +124,10 @@ jobs: cd $GITHUB_WORKSPACE make playwright-browsers - - - name: Trigger catalog + - name: Trigger CVE scanning run: | - while true; do x=0; curl -f http://$REGISTRY_HOST:$REGISTRY_PORT/v2/_catalog || x=1; if [ $x -eq 0 ]; then break; fi; sleep 1; done + # trigger CVE scanning for all images before running the tests + curl -X POST -H "Content-Type: application/json" -m 600 --data '{ "query": "{ ImageListForCVE (id:\"CVE-2021-43616\") { Results { RepoName Tag } } }" }' http://$REGISTRY_HOST:$REGISTRY_PORT/v2/_zot/ext/search - name: Run integration tests run: |