From 7d997c792e400f0d2ee7b5e16b60458435aa50f5 Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Tue, 15 Oct 2024 09:41:15 +0200 Subject: [PATCH] multi job --- .github/workflows/build_forks.yml | 53 +++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_forks.yml b/.github/workflows/build_forks.yml index 1634a646..00b526f0 100644 --- a/.github/workflows/build_forks.yml +++ b/.github/workflows/build_forks.yml @@ -64,9 +64,6 @@ jobs: **/*.gz **/*.rpm - - name: Set up QEMU - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 - - name: Set up Docker Buildx uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 @@ -78,11 +75,43 @@ jobs: with: targets: community + - name: Export all baked images whose name include `alfresco` + run: | + docker save -o /tmp/${{ env.ARTIFACT_NAME }}.tar $(docker images --format "{{.Repository}}:{{.Tag}}" | grep alfresco) + + - name: Upload images as artifact + uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 + with: + name: ${{ env.ARTIFACT_NAME }} + path: /tmp/${{ env.ARTIFACT_NAME }}.tar + retention-days: 1 + compression-level: 0 + + compose-test: + name: compose-test + needs: build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + + - name: Download artifacts + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + path: /tmp + name: ${{ env.ARTIFACT_NAME }} + + - name: Load docker images from artifact + run: | + docker load -i /tmp/${{ env.ARTIFACT_NAME }}.tar + docker image ls -a + - name: Verify docker-compose id: verify_compose uses: Alfresco/alfresco-build-tools/.github/actions/dbp-charts/verify-compose@v7.1.1 timeout-minutes: 10 with: + compose_pull: false compose_file_path: test/community-docker-compose.yml - name: Save containers logs @@ -91,12 +120,30 @@ jobs: with: output-archive-name: community-logs + helm-test: + name: helm test + needs: build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + + - name: Download artifacts + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + path: /tmp + name: ${{ env.ARTIFACT_NAME }} + - name: Setup KinD cluster uses: Alfresco/alfresco-build-tools/.github/actions/setup-kind@v7.1.1 with: ingress-nginx-ref: controller-v1.8.2 metrics: "true" + - name: Load Docker images + run: | + kind load image-archive -n chart-testing /tmp/${{ env.ARTIFACT_NAME }}.tar + - uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 with: version: "3.15.2"