From f9f0d2ebd5734d42d680efbdba1149a333258f44 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Wed, 8 May 2024 22:38:28 +0200 Subject: [PATCH 01/16] feat(backend): repackage Jar for arm builds --- .github/workflows/backend.yml | 40 ++++++++++++++++++++++------------- backend/Dockerfile | 11 ++++++++++ backend/build.gradle | 8 +++++++ 3 files changed, 44 insertions(+), 15 deletions(-) create mode 100644 backend/Dockerfile diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index 0df546347c..1d182694bd 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -3,6 +3,16 @@ name: backend on: push: workflow_dispatch: + inputs: + build_arm: + type: boolean + description: "Build for ARM as well" + default: false + required: false + +env: + DOCKER_IMAGE_NAME: ghcr.io/loculus-project/backend + BUILD_ARM: ${{ github.ref == 'refs/heads/main' || github.event.inputs.build_arm }} concurrency: group: ci-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}-backend @@ -26,7 +36,7 @@ jobs: id: files-hash run: | DIR_HASH=$(echo -n ${{ hashFiles('backend/**', '.github/workflows/backend.yml') }}) - echo "DIR_HASH=$DIR_HASH" >> $GITHUB_ENV + echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM && '-arm'|| '' }}" >> $GITHUB_ENV - name: Setup Docker metadata id: dockerMetadata @@ -52,6 +62,9 @@ jobs: EXISTS=$(docker manifest inspect ${{ env.DOCKER_IMAGE_NAME }}:${{ env.DIR_HASH }} > /dev/null 2>&1 && echo "true" || echo "false") echo "CACHE_HIT=$EXISTS" >> $GITHUB_ENV + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Set up JDK if: env.CACHE_HIT == 'false' uses: actions/setup-java@v4 @@ -63,22 +76,19 @@ jobs: if: env.CACHE_HIT == 'false' uses: gradle/actions/setup-gradle@v3 - - name: Build Docker Image For Branch - if: env.CACHE_HIT == 'false' - run: ./gradlew bootBuildImage --imageName=${{ env.DOCKER_IMAGE_NAME }}:${{ env.DIR_HASH }} - working-directory: ./backend - env: - USER: ${{ github.actor }} - TOKEN: "${{ secrets.GITHUB_TOKEN }}" - - - name: Push Docker Image + - name: Build and push image if input files changed if: env.CACHE_HIT == 'false' - run: docker push ${{ env.DOCKER_IMAGE_NAME }}:${{ env.DIR_HASH }} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/build-push-action@v5 + with: + context: ./backend + push: true + tags: ${{ steps.dockerMetadata.outputs.tags }} + cache-from: type=gha,scope=backend-${{ github.ref }} + cache-to: type=gha,mode=max,scope=backend-${{ github.ref }} + platforms: ${{ env.BUILD_ARM && 'linux/amd64,linux/arm64' || 'linux/amd64' }} - - name: Tag and push existing images + - name: Retag and push existing image if cache hit + if: env.CACHE_HIT == 'true' run: | TAGS=(${{ steps.dockerMetadata.outputs.tags }}) for TAG in "${TAGS[@]}"; do diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 0000000000..38abedc62b --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,11 @@ +FROM eclipse-temurin:21-jre-alpine + +WORKDIR /app + +COPY build/libs/backend.jar app.jar + +# Expose the port your application uses +EXPOSE 8080 + +# Command to run your jar +ENTRYPOINT ["java", "-jar", "app.jar", "--spring.profiles.active=docker"] diff --git a/backend/build.gradle b/backend/build.gradle index c8a1124ade..bb24dcb3cd 100644 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -79,3 +79,11 @@ tasks.named('bootBuildImage') { // https://paketo.io/docs/howto/configuration/ environment["BPE_SPRING_PROFILES_ACTIVE"] = "docker" } + +tasks.named("jar") { + enabled = false // prevent to generate plain jar +} +tasks.named("bootJar") { + enabled = true + archiveVersion.set("") +} From d82a53307ef64d25f96677a0c02bfe2a8d2a8ee9 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Wed, 8 May 2024 22:40:54 +0200 Subject: [PATCH 02/16] Expose right port --- backend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 38abedc62b..e1ebaa37ca 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -5,7 +5,7 @@ WORKDIR /app COPY build/libs/backend.jar app.jar # Expose the port your application uses -EXPOSE 8080 +EXPOSE 8079 # Command to run your jar ENTRYPOINT ["java", "-jar", "app.jar", "--spring.profiles.active=docker"] From 05cf85aefc39a2ac2cbf5bc6bb39cb78688af5e3 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Wed, 8 May 2024 22:43:48 +0200 Subject: [PATCH 03/16] Build --- .github/workflows/backend.yml | 5 +++++ backend/Dockerfile | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index 1d182694bd..26a85c3dd3 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -76,6 +76,11 @@ jobs: if: env.CACHE_HIT == 'false' uses: gradle/actions/setup-gradle@v3 + - name: Build Backend + if: env.CACHE_HIT == 'false' + working-directory: ./backend + run: ./gradlew bootJar + - name: Build and push image if input files changed if: env.CACHE_HIT == 'false' uses: docker/build-push-action@v5 diff --git a/backend/Dockerfile b/backend/Dockerfile index e1ebaa37ca..b8615139ea 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -4,8 +4,6 @@ WORKDIR /app COPY build/libs/backend.jar app.jar -# Expose the port your application uses EXPOSE 8079 -# Command to run your jar ENTRYPOINT ["java", "-jar", "app.jar", "--spring.profiles.active=docker"] From b8ca05dc3a92629b412dcf2f3e49b877d9869956 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Wed, 8 May 2024 20:04:25 +0200 Subject: [PATCH 04/16] Copy .env.docker (cherry picked from commit 5c299fdd8f2ffb5259aba5bc6e9349710675148a) Use .env file during build (cherry picked from commit cd834b20116eed3b3e5ffe39a5b14b56fa031216) Build everything for arm as well chore(ci): use node version from `.nvmrc` Make a single launcher workflow to launch all arm builds trigger on push temporarily for testing f give broad permissions try again test tag branch with arm try again fionally one more one more time I hope try this The stupidest thing eve: how should I've known that github.inputs.build_arm needs to be used for workflow call and not github.event.inputs.build_arm Now nowwww Disable debug, finally! --- .github/workflows/backend.yml | 12 ++++- .github/workflows/build-arm.yaml | 46 +++++++++++++++++++ .../workflows/config-preprocessor-build.yml | 15 ++++-- .github/workflows/dummyPreprocessing.yml | 13 +++++- .github/workflows/ingest.yml | 13 +++++- .github/workflows/keycloakify-build.yml | 14 ++++-- .github/workflows/preprocessing-nextclade.yml | 13 +++++- .github/workflows/website.yml | 15 ++++-- docs/.nvmrc | 2 +- 9 files changed, 124 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/build-arm.yaml diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index 26a85c3dd3..c89bee73df 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -9,10 +9,18 @@ on: description: "Build for ARM as well" default: false required: false + workflow_call: + inputs: + build_arm: + type: string + description: "Build for ARM as well" + default: "false" + required: true env: DOCKER_IMAGE_NAME: ghcr.io/loculus-project/backend - BUILD_ARM: ${{ github.ref == 'refs/heads/main' || github.event.inputs.build_arm }} + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + BUILD_ARM: ${{ github.event.inputs.build_arm || inputs.build_arm || github.ref == 'refs/heads/main' }} concurrency: group: ci-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}-backend @@ -48,7 +56,7 @@ jobs: type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=ref,event=branch type=sha,prefix=commit- - + type=raw,value=${{ env.BRANCH_NAME }}-arm,enable=${{ env.BUILD_ARM }} - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: diff --git a/.github/workflows/build-arm.yaml b/.github/workflows/build-arm.yaml new file mode 100644 index 0000000000..f582732c59 --- /dev/null +++ b/.github/workflows/build-arm.yaml @@ -0,0 +1,46 @@ +# Trigger a build of all docker images including ARM images + +on: + push: + workflow_dispatch: + +permissions: + contents: read + packages: write + checks: read + +jobs: + trigger-backend: + uses: ./.github/workflows/backend.yml + with: + build_arm: true + + trigger-config-preprocessor: + uses: ./.github/workflows/config-preprocessor-build.yml + with: + build_arm: true + + trigger-dummy-preprocessing: + uses: ./.github/workflows/dummyPreprocessing.yml + with: + build_arm: true + + trigger-ingest: + uses: ./.github/workflows/ingest.yml + with: + build_arm: true + + trigger-keycloakify: + uses: ./.github/workflows/keycloakify-build.yml + with: + build_arm: true + + trigger-preprocessing-nextclade: + uses: ./.github/workflows/preprocessing-nextclade.yml + with: + build_arm: true + + trigger-website: + uses: ./.github/workflows/website.yml + with: + build_arm: true diff --git a/.github/workflows/config-preprocessor-build.yml b/.github/workflows/config-preprocessor-build.yml index 9f395785c0..4f81380d79 100644 --- a/.github/workflows/config-preprocessor-build.yml +++ b/.github/workflows/config-preprocessor-build.yml @@ -8,18 +8,26 @@ on: type: boolean description: "Build for ARM as well" default: false - required: false + required: true + workflow_call: + inputs: + build_arm: + type: string + description: "Build for ARM as well" + default: "false" + required: true env: DOCKER_IMAGE_NAME: ghcr.io/loculus-project/config-processor - BUILD_ARM: ${{ github.ref == 'refs/heads/main' || github.event.inputs.build_arm }} # When to build for arm as well + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + BUILD_ARM: ${{ github.event.inputs.build_arm || inputs.build_arm || github.ref == 'refs/heads/main' }} defaults: run: working-directory: ./kubernetes/config-processor concurrency: - group: ci-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}-config-processor + group: ci-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}-config-processor-${{github.event.inputs.build_arm}} cancel-in-progress: true jobs: @@ -50,6 +58,7 @@ jobs: type=ref,event=branch type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=sha,prefix=commit- + type=raw,value=${{ env.BRANCH_NAME }}-arm,enable=${{ env.BUILD_ARM }} - name: Build and push image uses: docker/build-push-action@v5 with: diff --git a/.github/workflows/dummyPreprocessing.yml b/.github/workflows/dummyPreprocessing.yml index 8898dc0183..f9a16d419c 100644 --- a/.github/workflows/dummyPreprocessing.yml +++ b/.github/workflows/dummyPreprocessing.yml @@ -9,13 +9,21 @@ on: description: "Build for ARM as well" default: false required: false + workflow_call: + inputs: + build_arm: + type: boolean + description: "Build for ARM as well" + default: false + required: false env: DOCKER_IMAGE_NAME: ghcr.io/loculus-project/preprocessing-dummy - BUILD_ARM: ${{ github.ref == 'refs/heads/main' || github.event.inputs.build_arm }} # When to build for arm as well + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + BUILD_ARM: ${{ github.event.inputs.build_arm || inputs.build_arm || github.ref == 'refs/heads/main' }} concurrency: - group: ci-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}-preprocessing-dummy + group: ci-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}-preprocessing-dumm-${{github.event.inputs.build_arm}}y cancel-in-progress: true jobs: @@ -45,6 +53,7 @@ jobs: type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=ref,event=branch type=sha,prefix=commit- + type=raw,value=${{ env.BRANCH_NAME }}-arm,enable=${{ env.BUILD_ARM }} - name: Login to GitHub Container Registry uses: docker/login-action@v3 diff --git a/.github/workflows/ingest.yml b/.github/workflows/ingest.yml index c209408530..3c7832b043 100644 --- a/.github/workflows/ingest.yml +++ b/.github/workflows/ingest.yml @@ -8,13 +8,21 @@ on: description: "Build for ARM as well" default: false required: false + workflow_call: + inputs: + build_arm: + type: boolean + description: "Build for ARM as well" + default: false + required: false env: DOCKER_IMAGE_NAME: ghcr.io/loculus-project/ingest - BUILD_ARM: ${{ github.ref == 'refs/heads/main' || github.event.inputs.build_arm }} + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + BUILD_ARM: ${{ github.event.inputs.build_arm || inputs.build_arm || github.ref == 'refs/heads/main' }} concurrency: - group: ci-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}-ingest + group: ci-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}-ingest-${{github.event.inputs.build_arm}} cancel-in-progress: true jobs: @@ -45,6 +53,7 @@ jobs: type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=ref,event=branch type=sha,prefix=commit- + type=raw,value=${{ env.BRANCH_NAME }}-arm,enable=${{ env.BUILD_ARM }} - name: Login to GitHub Container Registry uses: docker/login-action@v3 diff --git a/.github/workflows/keycloakify-build.yml b/.github/workflows/keycloakify-build.yml index 9bfb33de89..c49f8eb127 100644 --- a/.github/workflows/keycloakify-build.yml +++ b/.github/workflows/keycloakify-build.yml @@ -9,13 +9,20 @@ on: description: "Build for ARM as well" default: false required: false - + workflow_call: + inputs: + build_arm: + type: boolean + description: "Build for ARM as well" + default: false + required: false env: DOCKER_IMAGE_NAME: ghcr.io/loculus-project/keycloakify - BUILD_ARM: ${{ github.ref == 'refs/heads/main' || github.event.inputs.build_arm }} # When to build for arm as well + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + BUILD_ARM: ${{ github.event.inputs.build_arm || inputs.build_arm || github.ref == 'refs/heads/main' }} concurrency: - group: ci-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}-keycloak-build + group: ci-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}-keycloak-buil-${{github.event.inputs.build_arm}}d cancel-in-progress: true jobs: @@ -50,6 +57,7 @@ jobs: type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=ref,event=branch type=sha,prefix=commit- + type=raw,value=${{ env.BRANCH_NAME }}-arm,enable=${{ env.BUILD_ARM }} - name: Check if image exists id: check-image run: | diff --git a/.github/workflows/preprocessing-nextclade.yml b/.github/workflows/preprocessing-nextclade.yml index 5297ecaf69..922c5a5b2b 100644 --- a/.github/workflows/preprocessing-nextclade.yml +++ b/.github/workflows/preprocessing-nextclade.yml @@ -9,13 +9,21 @@ on: description: "Build for ARM as well" default: false required: false + workflow_call: + inputs: + build_arm: + type: boolean + description: "Build for ARM as well" + default: false + required: false env: DOCKER_IMAGE_NAME: ghcr.io/loculus-project/preprocessing-nextclade - BUILD_ARM: ${{ github.ref == 'refs/heads/main' || github.event.inputs.build_arm }} + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + BUILD_ARM: ${{ github.event.inputs.build_arm || inputs.build_arm || github.ref == 'refs/heads/main' }} concurrency: - group: ci-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}-preprocessing-nextclade + group: ci-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}-preprocessing-nextclade-${{github.event.inputs.build_arm}} cancel-in-progress: true jobs: @@ -46,6 +54,7 @@ jobs: type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=ref,event=branch type=sha,prefix=commit- + type=raw,value=${{ env.BRANCH_NAME }}-arm,enable=${{ env.BUILD_ARM }} - name: Login to GitHub Container Registry uses: docker/login-action@v3 diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index f612ff5952..0baf0c25b3 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -1,7 +1,6 @@ name: website on: - push: workflow_dispatch: inputs: build_arm: @@ -9,13 +8,20 @@ on: description: "Build for ARM as well" default: false required: false - + workflow_call: + inputs: + build_arm: + type: boolean + description: "Build for ARM as well" + default: false + required: false env: DOCKER_IMAGE_NAME: ghcr.io/loculus-project/website - BUILD_ARM: ${{ github.ref == 'refs/heads/main' || github.event.inputs.build_arm }} # When to build for arm as well + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + BUILD_ARM: ${{ github.event.inputs.build_arm || inputs.build_arm || github.ref == 'refs/heads/main' }} concurrency: - group: ci-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}-website + group: ci-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}-website-${{github.event.inputs.build_arm}} cancel-in-progress: true jobs: @@ -46,6 +52,7 @@ jobs: type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=ref,event=branch type=sha,prefix=commit- + type=raw,value=${{ env.BRANCH_NAME }}-arm,enable=${{ env.BUILD_ARM }} - name: Login to GitHub Container Registry uses: docker/login-action@v3 diff --git a/docs/.nvmrc b/docs/.nvmrc index 92f279e3e6..53d1c14db3 100644 --- a/docs/.nvmrc +++ b/docs/.nvmrc @@ -1 +1 @@ -v22 \ No newline at end of file +v22 From f747bea856d2a7c6f362240aff92d6e014bf7f47 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Sat, 11 May 2024 22:42:25 +0200 Subject: [PATCH 05/16] Undo running arm on each push --- .github/workflows/build-arm.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-arm.yaml b/.github/workflows/build-arm.yaml index f582732c59..25cafada2d 100644 --- a/.github/workflows/build-arm.yaml +++ b/.github/workflows/build-arm.yaml @@ -1,7 +1,6 @@ # Trigger a build of all docker images including ARM images on: - push: workflow_dispatch: permissions: From c9b78ccb36c15e59485759e4c31ae41df4e824cc Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Sat, 11 May 2024 22:51:30 +0200 Subject: [PATCH 06/16] test making non-arm dir hash --- .github/workflows/website.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 0baf0c25b3..88100fd7c8 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -40,7 +40,12 @@ jobs: id: files-hash run: | DIR_HASH=$(echo -n ${{ hashFiles('website/**', '.github/workflows/website.yml') }}) - echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM && '-arm'|| '' }}" >> $GITHUB_ENV + if [ ${{ env.BUILD_ARM }} ]; then + echo "NON_ARM_HASH=$DIR_HASH" >> $GITHUB_ENV + echo "DIR_HASH=$DIR_HASH-arm" >> $GITHUB_ENV + else + echo "DIR_HASH=$NON_ARM_HASH" >> $GITHUB_ENV + fi - name: Setup Docker metadata id: dockerMetadata @@ -53,6 +58,7 @@ jobs: type=ref,event=branch type=sha,prefix=commit- type=raw,value=${{ env.BRANCH_NAME }}-arm,enable=${{ env.BUILD_ARM }} + type=raw,value=${{ env.NON_ARM_HASH }},enable=${{ env.BUILD_ARM }} - name: Login to GitHub Container Registry uses: docker/login-action@v3 From 8e73e7a637795c33030da4404c358aaf7a7e2392 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Sat, 11 May 2024 22:54:39 +0200 Subject: [PATCH 07/16] fix: dispatch website --- .github/workflows/backend.yml | 2 +- .github/workflows/website.yml | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index c89bee73df..9c77342ce8 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -27,7 +27,7 @@ concurrency: cancel-in-progress: true jobs: - dockerImage: + backend-docker: name: Build Backend Docker Image # Don't change: Referenced by .github/workflows/update-argocd-metadata.yml runs-on: ubuntu-latest timeout-minutes: 15 diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 88100fd7c8..41e1587150 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -1,6 +1,10 @@ name: website on: + pull_request: + push: + branches: + - main workflow_dispatch: inputs: build_arm: @@ -25,7 +29,7 @@ concurrency: cancel-in-progress: true jobs: - dockerImage: + website-docker: name: Build Website Docker Image # Don't change: Referenced by .github/workflows/update-argocd-metadata.yml runs-on: ubuntu-latest timeout-minutes: 15 From e50b8813221748a11a0e146d9ebb62ffe4f7248e Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Sat, 11 May 2024 23:08:28 +0200 Subject: [PATCH 08/16] Fix for always running arm --- .github/workflows/backend.yml | 2 +- .github/workflows/config-preprocessor-build.yml | 2 +- .github/workflows/dummyPreprocessing.yml | 2 +- .github/workflows/ingest.yml | 2 +- .github/workflows/keycloakify-build.yml | 2 +- .github/workflows/preprocessing-nextclade.yml | 2 +- .github/workflows/website.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index 9c77342ce8..6651e41bff 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -98,7 +98,7 @@ jobs: tags: ${{ steps.dockerMetadata.outputs.tags }} cache-from: type=gha,scope=backend-${{ github.ref }} cache-to: type=gha,mode=max,scope=backend-${{ github.ref }} - platforms: ${{ env.BUILD_ARM && 'linux/amd64,linux/arm64' || 'linux/amd64' }} + platforms: ${{ env.BUILD_ARM == 'true' && 'linux/amd64,linux/arm64' || 'linux/amd64' }} - name: Retag and push existing image if cache hit if: env.CACHE_HIT == 'true' diff --git a/.github/workflows/config-preprocessor-build.yml b/.github/workflows/config-preprocessor-build.yml index 4f81380d79..48216ea396 100644 --- a/.github/workflows/config-preprocessor-build.yml +++ b/.github/workflows/config-preprocessor-build.yml @@ -67,4 +67,4 @@ jobs: tags: ${{ steps.dockerMetadata.outputs.tags }} cache-from: type=gha,scope=config-preprocessor-${{ github.ref }} cache-to: type=gha,mode=max,scope=config-preprocessor-${{ github.ref }} - platforms: ${{ env.BUILD_ARM && 'linux/amd64,linux/arm64' || 'linux/amd64' }} + platforms: ${{ env.BUILD_ARM == 'true' && 'linux/amd64,linux/arm64' || 'linux/amd64' }} diff --git a/.github/workflows/dummyPreprocessing.yml b/.github/workflows/dummyPreprocessing.yml index f9a16d419c..36b9edabf7 100644 --- a/.github/workflows/dummyPreprocessing.yml +++ b/.github/workflows/dummyPreprocessing.yml @@ -80,7 +80,7 @@ jobs: tags: ${{ steps.dockerMetadata.outputs.tags }} cache-from: type=gha,scope=preprocessing-dummy-${{ github.ref }} cache-to: type=gha,mode=max,scope=preprocessing-dummy-${{ github.ref }} - platforms: ${{ env.BUILD_ARM && 'linux/amd64,linux/arm64' || 'linux/amd64' }} + platforms: ${{ env.BUILD_ARM == 'true' && 'linux/amd64,linux/arm64' || 'linux/amd64' }} - name: Tag and push image if cache hit if: env.CACHE_HIT == 'true' diff --git a/.github/workflows/ingest.yml b/.github/workflows/ingest.yml index 3c7832b043..1745244b2e 100644 --- a/.github/workflows/ingest.yml +++ b/.github/workflows/ingest.yml @@ -80,7 +80,7 @@ jobs: tags: ${{ steps.dockerMetadata.outputs.tags }} cache-from: type=gha,scope=ingest-${{ github.ref }} cache-to: type=gha,mode=max,scope=ingest-${{ github.ref }} - platforms: ${{ env.BUILD_ARM && 'linux/amd64,linux/arm64' || 'linux/amd64' }} + platforms: ${{ env.BUILD_ARM == 'true' && 'linux/amd64,linux/arm64' || 'linux/amd64' }} - name: Retag and push existing image if cache hit if: env.CACHE_HIT == 'true' diff --git a/.github/workflows/keycloakify-build.yml b/.github/workflows/keycloakify-build.yml index c49f8eb127..b3ac617814 100644 --- a/.github/workflows/keycloakify-build.yml +++ b/.github/workflows/keycloakify-build.yml @@ -79,7 +79,7 @@ jobs: tags: ${{ steps.dockerMetadata.outputs.tags }} cache-from: type=gha,scope=keycloakify-${{ github.ref }} cache-to: type=gha,mode=max,scope=keycloakify-${{ github.ref }} - platforms: ${{ env.BUILD_ARM && 'linux/amd64,linux/arm64' || 'linux/amd64' }} + platforms: ${{ env.BUILD_ARM == 'true' && 'linux/amd64,linux/arm64' || 'linux/amd64' }} build-args: NODE_VERSION=${{ env.NODE_VERSION }} - name: Tag and push image if cache hit if: env.CACHE_HIT == 'true' diff --git a/.github/workflows/preprocessing-nextclade.yml b/.github/workflows/preprocessing-nextclade.yml index 922c5a5b2b..8d85d9a597 100644 --- a/.github/workflows/preprocessing-nextclade.yml +++ b/.github/workflows/preprocessing-nextclade.yml @@ -81,7 +81,7 @@ jobs: tags: ${{ steps.dockerMetadata.outputs.tags }} cache-from: type=gha,scope=nextclade-${{ github.ref }} cache-to: type=gha,mode=max,scope=nextclade-${{ github.ref }} - platforms: ${{ env.BUILD_ARM && 'linux/amd64,linux/arm64' || 'linux/amd64' }} + platforms: ${{ env.BUILD_ARM == 'true' && 'linux/amd64,linux/arm64' || 'linux/amd64' }} - name: Retag and push existing image if cache hit if: env.CACHE_HIT == 'true' diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 41e1587150..0a0a0216e0 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -95,7 +95,7 @@ jobs: tags: ${{ steps.dockerMetadata.outputs.tags }} cache-from: type=gha,scope=website-${{ github.ref }} cache-to: type=gha,mode=max,scope=website-${{ github.ref }} - platforms: ${{ env.BUILD_ARM && 'linux/amd64,linux/arm64' || 'linux/amd64' }} + platforms: ${{ env.BUILD_ARM == 'true' == 'true' && 'linux/amd64,linux/arm64' || 'linux/amd64' }} build-args: NODE_VERSION=${{ env.NODE_VERSION }} - name: Retag and push existing image if cache hit From 4c4954447403dc8bd9e14ee677d123673ff83729 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Sat, 11 May 2024 23:14:16 +0200 Subject: [PATCH 09/16] Try --- .github/workflows/website.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 0a0a0216e0..a72ea94f1b 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -44,7 +44,7 @@ jobs: id: files-hash run: | DIR_HASH=$(echo -n ${{ hashFiles('website/**', '.github/workflows/website.yml') }}) - if [ ${{ env.BUILD_ARM }} ]; then + if [ ${{ env.BUILD_ARM }} == true ]; then echo "NON_ARM_HASH=$DIR_HASH" >> $GITHUB_ENV echo "DIR_HASH=$DIR_HASH-arm" >> $GITHUB_ENV else From 8bf3c7b7f7556031311ae558ff649fc351d5580a Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Sat, 11 May 2024 23:22:03 +0200 Subject: [PATCH 10/16] Roll out non-arm hash --- .github/workflows/backend.yml | 1 - .github/workflows/website.yml | 8 +------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index 6651e41bff..ea137b0dfa 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -56,7 +56,6 @@ jobs: type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=ref,event=branch type=sha,prefix=commit- - type=raw,value=${{ env.BRANCH_NAME }}-arm,enable=${{ env.BUILD_ARM }} - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index a72ea94f1b..e75b9b3345 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -44,12 +44,7 @@ jobs: id: files-hash run: | DIR_HASH=$(echo -n ${{ hashFiles('website/**', '.github/workflows/website.yml') }}) - if [ ${{ env.BUILD_ARM }} == true ]; then - echo "NON_ARM_HASH=$DIR_HASH" >> $GITHUB_ENV - echo "DIR_HASH=$DIR_HASH-arm" >> $GITHUB_ENV - else - echo "DIR_HASH=$NON_ARM_HASH" >> $GITHUB_ENV - fi + echo "DIR_HASH=$NON_ARM_HASH" >> $GITHUB_ENV - name: Setup Docker metadata id: dockerMetadata @@ -62,7 +57,6 @@ jobs: type=ref,event=branch type=sha,prefix=commit- type=raw,value=${{ env.BRANCH_NAME }}-arm,enable=${{ env.BUILD_ARM }} - type=raw,value=${{ env.NON_ARM_HASH }},enable=${{ env.BUILD_ARM }} - name: Login to GitHub Container Registry uses: docker/login-action@v3 From 1696a3cd066c00aa6644a47effc6a4df8761b107 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Sat, 11 May 2024 23:31:13 +0200 Subject: [PATCH 11/16] consistent naming of actions --- .github/workflows/backend.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index ea137b0dfa..c46a374e3b 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -1,7 +1,10 @@ -name: backend +name: backend-image on: + pull_request: push: + branches: + - main workflow_dispatch: inputs: build_arm: @@ -27,7 +30,7 @@ concurrency: cancel-in-progress: true jobs: - backend-docker: + backend-image: name: Build Backend Docker Image # Don't change: Referenced by .github/workflows/update-argocd-metadata.yml runs-on: ubuntu-latest timeout-minutes: 15 From 892d57a437c375e5c6f6869d234069594f75e594 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Sat, 11 May 2024 23:31:28 +0200 Subject: [PATCH 12/16] consinstent naming of actions --- .github/workflows/config-preprocessor-build.yml | 7 +++++-- .github/workflows/docs-build.yml | 6 +++++- .github/workflows/dummyPreprocessing.yml | 7 +++++-- .github/workflows/e2e-k3d.yml | 5 ++++- .github/workflows/ingest.yml | 7 +++++-- .github/workflows/keycloakify-build.yml | 7 +++++-- .github/workflows/node_dev.yml | 6 +++++- .github/workflows/preprocessing-nextclade.yml | 7 +++++-- 8 files changed, 39 insertions(+), 13 deletions(-) diff --git a/.github/workflows/config-preprocessor-build.yml b/.github/workflows/config-preprocessor-build.yml index 48216ea396..3f0f6509b7 100644 --- a/.github/workflows/config-preprocessor-build.yml +++ b/.github/workflows/config-preprocessor-build.yml @@ -1,7 +1,10 @@ -name: config-processor-build +name: config-processor-image on: + pull_request: push: + branches: + - main workflow_dispatch: inputs: build_arm: @@ -31,7 +34,7 @@ concurrency: cancel-in-progress: true jobs: - dockerImage: + config-processor-image: name: Build config-processor Docker Image # Don't change: Referenced by .github/workflows/update-argocd-metadata.yml runs-on: ubuntu-latest timeout-minutes: 15 diff --git a/.github/workflows/docs-build.yml b/.github/workflows/docs-build.yml index fb3ec78651..37e935ef89 100644 --- a/.github/workflows/docs-build.yml +++ b/.github/workflows/docs-build.yml @@ -1,10 +1,14 @@ name: Docs Build Check on: - push: + pull_request: paths: - "docs/**" - .github/workflows/docs-build-check.yml + push: + branches: + - main + workflow_dispatch: concurrency: diff --git a/.github/workflows/dummyPreprocessing.yml b/.github/workflows/dummyPreprocessing.yml index 36b9edabf7..f48709f633 100644 --- a/.github/workflows/dummyPreprocessing.yml +++ b/.github/workflows/dummyPreprocessing.yml @@ -1,7 +1,10 @@ -name: preprocessing-dummy +name: preprocessing-dummy-image on: + pull_request: push: + branches: + - main workflow_dispatch: inputs: build_arm: @@ -27,7 +30,7 @@ concurrency: cancel-in-progress: true jobs: - build-or-use-cache: + preprocessing-dummy-image: name: Preprocessing dummy docker image build # Don't change: Referenced by .github/workflows/update-argocd-metadata.yml runs-on: ubuntu-latest timeout-minutes: 15 diff --git a/.github/workflows/e2e-k3d.yml b/.github/workflows/e2e-k3d.yml index 2994c594ee..01cf9ff353 100644 --- a/.github/workflows/e2e-k3d.yml +++ b/.github/workflows/e2e-k3d.yml @@ -2,7 +2,7 @@ name: E2E test (on kubernetes) on: workflow_dispatch: - push: + pull_request: paths: - "backend/**" - "keycloak/**" @@ -11,6 +11,9 @@ on: - "deploy.py" - ".github/scripts/**" - ".github/workflows/**" + push: + branches: + - main concurrency: group: ci-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}-e2e-k3d diff --git a/.github/workflows/ingest.yml b/.github/workflows/ingest.yml index 1745244b2e..211cdbf416 100644 --- a/.github/workflows/ingest.yml +++ b/.github/workflows/ingest.yml @@ -1,6 +1,9 @@ -name: ingest +name: ingest-image on: + pull_request: push: + branches: + - main workflow_dispatch: inputs: build_arm: @@ -26,7 +29,7 @@ concurrency: cancel-in-progress: true jobs: - dockerImage: + ingest-image: name: Build ingest Docker Image # Don't change: Referenced by .github/workflows/update-argocd-metadata.yml runs-on: ubuntu-latest timeout-minutes: 15 diff --git a/.github/workflows/keycloakify-build.yml b/.github/workflows/keycloakify-build.yml index b3ac617814..e8d9273f67 100644 --- a/.github/workflows/keycloakify-build.yml +++ b/.github/workflows/keycloakify-build.yml @@ -1,7 +1,10 @@ -name: keycloakify-build +name: keycloakify-image on: + pull_request: push: + branches: + - main workflow_dispatch: inputs: build_arm: @@ -26,7 +29,7 @@ concurrency: cancel-in-progress: true jobs: - dockerImage: + keycloakify-image: name: Build keycloakify Docker Image # Don't change: Referenced by .github/workflows/update-argocd-metadata.yml runs-on: ubuntu-latest timeout-minutes: 30 diff --git a/.github/workflows/node_dev.yml b/.github/workflows/node_dev.yml index ce57302e22..3be0c74bc2 100644 --- a/.github/workflows/node_dev.yml +++ b/.github/workflows/node_dev.yml @@ -1,12 +1,16 @@ name: Dev server test on: - push: + pull_request: paths: - "website/**" - "deploy.py" - generate_local_test_config.sh - .github/workflows/node_dev.yml + push: + branches: + - main + workflow_dispatch: concurrency: diff --git a/.github/workflows/preprocessing-nextclade.yml b/.github/workflows/preprocessing-nextclade.yml index 8d85d9a597..4ba0722def 100644 --- a/.github/workflows/preprocessing-nextclade.yml +++ b/.github/workflows/preprocessing-nextclade.yml @@ -1,7 +1,10 @@ -name: preprocessing-nextclade +name: preprocessing-nextclade-image on: + pull_request: push: + branches: + - main workflow_dispatch: inputs: build_arm: @@ -27,7 +30,7 @@ concurrency: cancel-in-progress: true jobs: - dockerImage: + preprocessing-nextclade-image: name: Build preprocessing-nextclade Docker Image # Don't change: Referenced by .github/workflows/update-argocd-metadata.yml runs-on: ubuntu-latest timeout-minutes: 15 From 716973fcc3aa2fb54c9a74d0d42762da7af3e87d Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Sat, 11 May 2024 23:38:38 +0200 Subject: [PATCH 13/16] Systematize workflow names --- .github/workflows/{backend.yml => backend-image.yml} | 3 ++- .github/workflows/{build-arm.yaml => build-arm-images.yaml} | 0 ...g-preprocessor-build.yml => config-preprocessor-image.yml} | 0 .github/workflows/{docs-build.yml => docs-test.yml} | 0 .../{dummyPreprocessing.yml => dummy-preprocessing-image.yml} | 2 +- .github/workflows/{ingest.yml => ingest-image.yml} | 2 +- .../{keycloakify-build.yml => keycloakify-image.yml} | 2 +- .github/workflows/preprocessing-nextclade.yml | 2 +- .github/workflows/{website.yml => website-image.yml} | 4 ++-- .../{node_dev.yml => website-playwright-dev-test.yml} | 4 ++-- 10 files changed, 10 insertions(+), 9 deletions(-) rename .github/workflows/{backend.yml => backend-image.yml} (96%) rename .github/workflows/{build-arm.yaml => build-arm-images.yaml} (100%) rename .github/workflows/{config-preprocessor-build.yml => config-preprocessor-image.yml} (100%) rename .github/workflows/{docs-build.yml => docs-test.yml} (100%) rename .github/workflows/{dummyPreprocessing.yml => dummy-preprocessing-image.yml} (98%) rename .github/workflows/{ingest.yml => ingest-image.yml} (98%) rename .github/workflows/{keycloakify-build.yml => keycloakify-image.yml} (98%) rename .github/workflows/{website.yml => website-image.yml} (96%) rename .github/workflows/{node_dev.yml => website-playwright-dev-test.yml} (95%) diff --git a/.github/workflows/backend.yml b/.github/workflows/backend-image.yml similarity index 96% rename from .github/workflows/backend.yml rename to .github/workflows/backend-image.yml index c46a374e3b..09edea51be 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend-image.yml @@ -46,7 +46,7 @@ jobs: - name: Generate files hash id: files-hash run: | - DIR_HASH=$(echo -n ${{ hashFiles('backend/**', '.github/workflows/backend.yml') }}) + DIR_HASH=$(echo -n ${{ hashFiles('backend/**', '.github/workflows/backend-image.yml') }}) echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM && '-arm'|| '' }}" >> $GITHUB_ENV - name: Setup Docker metadata @@ -59,6 +59,7 @@ jobs: type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=ref,event=branch type=sha,prefix=commit- + type=raw,value=${{ env.BRANCH_NAME }}-arm,enable=${{ env.BUILD_ARM }} - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: diff --git a/.github/workflows/build-arm.yaml b/.github/workflows/build-arm-images.yaml similarity index 100% rename from .github/workflows/build-arm.yaml rename to .github/workflows/build-arm-images.yaml diff --git a/.github/workflows/config-preprocessor-build.yml b/.github/workflows/config-preprocessor-image.yml similarity index 100% rename from .github/workflows/config-preprocessor-build.yml rename to .github/workflows/config-preprocessor-image.yml diff --git a/.github/workflows/docs-build.yml b/.github/workflows/docs-test.yml similarity index 100% rename from .github/workflows/docs-build.yml rename to .github/workflows/docs-test.yml diff --git a/.github/workflows/dummyPreprocessing.yml b/.github/workflows/dummy-preprocessing-image.yml similarity index 98% rename from .github/workflows/dummyPreprocessing.yml rename to .github/workflows/dummy-preprocessing-image.yml index f48709f633..ef5320a0e4 100644 --- a/.github/workflows/dummyPreprocessing.yml +++ b/.github/workflows/dummy-preprocessing-image.yml @@ -43,7 +43,7 @@ jobs: - name: Generate files hash id: files-hash run: | - DIR_HASH=$(echo -n ${{ hashFiles('preprocessing/dummy/**', '.github/workflows/dummyPreprocessing.yml') }}) + DIR_HASH=$(echo -n ${{ hashFiles('preprocessing/dummy/**', '.github/workflows/dummy-preprocessing-image.yml') }}) echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM && '-arm'|| '' }}" >> $GITHUB_ENV - name: Setup Docker metadata diff --git a/.github/workflows/ingest.yml b/.github/workflows/ingest-image.yml similarity index 98% rename from .github/workflows/ingest.yml rename to .github/workflows/ingest-image.yml index 211cdbf416..3e48317279 100644 --- a/.github/workflows/ingest.yml +++ b/.github/workflows/ingest-image.yml @@ -43,7 +43,7 @@ jobs: - name: Generate files hash id: files-hash run: | - DIR_HASH=$(echo -n ${{ hashFiles('ingest/**', '.github/workflows/ingest.yml') }}) + DIR_HASH=$(echo -n ${{ hashFiles('ingest/**', '.github/workflows/ingest-image.yml') }}) echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM && '-arm'|| '' }}" >> $GITHUB_ENV - name: Setup Docker metadata diff --git a/.github/workflows/keycloakify-build.yml b/.github/workflows/keycloakify-image.yml similarity index 98% rename from .github/workflows/keycloakify-build.yml rename to .github/workflows/keycloakify-image.yml index e8d9273f67..bae45ead8a 100644 --- a/.github/workflows/keycloakify-build.yml +++ b/.github/workflows/keycloakify-image.yml @@ -48,7 +48,7 @@ jobs: - name: Generate files hash id: files-hash run: | - DIR_HASH=$(echo -n ${{ hashFiles('./keycloak/keycloakify/**','.github/workflows/keycloakify-build.yml') }}) + DIR_HASH=$(echo -n ${{ hashFiles('./keycloak/keycloakify/**','.github/workflows/keycloakify-image.yml') }}) echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM && '-arm'|| '' }}" >> $GITHUB_ENV - name: Setup Docker metadata id: dockerMetadata diff --git a/.github/workflows/preprocessing-nextclade.yml b/.github/workflows/preprocessing-nextclade.yml index 4ba0722def..df81150b05 100644 --- a/.github/workflows/preprocessing-nextclade.yml +++ b/.github/workflows/preprocessing-nextclade.yml @@ -44,7 +44,7 @@ jobs: - name: Generate files hash id: files-hash run: | - DIR_HASH=$(echo -n ${{ hashFiles('preprocessing/nextclade/**', '.github/workflows/preprocessing-nextclade.yml') }}) + DIR_HASH=$(echo -n ${{ hashFiles('preprocessing/nextclade/**', '.github/workflows/preprocessing-nextclade-image.yml') }}) echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM && '-arm'|| '' }}" >> $GITHUB_ENV - name: Setup Docker metadata diff --git a/.github/workflows/website.yml b/.github/workflows/website-image.yml similarity index 96% rename from .github/workflows/website.yml rename to .github/workflows/website-image.yml index e75b9b3345..0d31b98a83 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website-image.yml @@ -43,8 +43,8 @@ jobs: - name: Generate files hash id: files-hash run: | - DIR_HASH=$(echo -n ${{ hashFiles('website/**', '.github/workflows/website.yml') }}) - echo "DIR_HASH=$NON_ARM_HASH" >> $GITHUB_ENV + DIR_HASH=$(echo -n ${{ hashFiles('website/**', '.github/workflows/website-image.yml') }}) + echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM && '-arm'|| '' }}" >> $GITHUB_ENV - name: Setup Docker metadata id: dockerMetadata diff --git a/.github/workflows/node_dev.yml b/.github/workflows/website-playwright-dev-test.yml similarity index 95% rename from .github/workflows/node_dev.yml rename to .github/workflows/website-playwright-dev-test.yml index 3be0c74bc2..59bd6bf275 100644 --- a/.github/workflows/node_dev.yml +++ b/.github/workflows/website-playwright-dev-test.yml @@ -25,8 +25,8 @@ jobs: matrix: os: - ubuntu-latest - - windows-latest - #disabled - macos-latest + # - windows-latest + # - macos-latest exclude: - os: ${{ github.ref != 'refs/heads/main' && 'macos-latest' }} From a3bdfc7f8aface775091e365e7b91917816b0ba3 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Sat, 11 May 2024 23:39:57 +0200 Subject: [PATCH 14/16] some more renaming --- ...my-preprocessing-image.yml => preprocessing-dummy-image.yml} | 2 +- ...ocessing-nextclade.yml => preprocessing-nextclade-image.yml} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{dummy-preprocessing-image.yml => preprocessing-dummy-image.yml} (98%) rename .github/workflows/{preprocessing-nextclade.yml => preprocessing-nextclade-image.yml} (100%) diff --git a/.github/workflows/dummy-preprocessing-image.yml b/.github/workflows/preprocessing-dummy-image.yml similarity index 98% rename from .github/workflows/dummy-preprocessing-image.yml rename to .github/workflows/preprocessing-dummy-image.yml index ef5320a0e4..6f135025f2 100644 --- a/.github/workflows/dummy-preprocessing-image.yml +++ b/.github/workflows/preprocessing-dummy-image.yml @@ -43,7 +43,7 @@ jobs: - name: Generate files hash id: files-hash run: | - DIR_HASH=$(echo -n ${{ hashFiles('preprocessing/dummy/**', '.github/workflows/dummy-preprocessing-image.yml') }}) + DIR_HASH=$(echo -n ${{ hashFiles('preprocessing/dummy/**', '.github/workflows/preprocessing-dummy-image.yml') }}) echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM && '-arm'|| '' }}" >> $GITHUB_ENV - name: Setup Docker metadata diff --git a/.github/workflows/preprocessing-nextclade.yml b/.github/workflows/preprocessing-nextclade-image.yml similarity index 100% rename from .github/workflows/preprocessing-nextclade.yml rename to .github/workflows/preprocessing-nextclade-image.yml From 324ded7c1481e365381c7b06a442f969d78da322 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Sat, 11 May 2024 23:51:15 +0200 Subject: [PATCH 15/16] Disable wait fors --- .github/workflows/e2e-k3d.yml | 69 ++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/.github/workflows/e2e-k3d.yml b/.github/workflows/e2e-k3d.yml index 01cf9ff353..98537b8179 100644 --- a/.github/workflows/e2e-k3d.yml +++ b/.github/workflows/e2e-k3d.yml @@ -96,40 +96,41 @@ jobs: run: cd website && npx playwright install-deps if: steps.playwright-cache.outputs.cache-hit == 'true' - # Waits are identical to the update-argocd-metadata.yml file - # Mirror changes to that file - - name: Wait for Config Processor Docker Image - uses: lewagon/wait-on-check-action@v1.3.4 - with: - ref: ${{ github.sha }} - check-name: Build config-processor Docker Image - repo-token: ${{ secrets.GITHUB_TOKEN }} - wait-interval: 2 - - - name: Wait for Backend Docker Image - uses: lewagon/wait-on-check-action@v1.3.4 - with: - ref: ${{ github.sha }} - check-name: Build Backend Docker Image - repo-token: ${{ secrets.GITHUB_TOKEN }} - wait-interval: 2 - - - name: Wait for Website Docker Image - uses: lewagon/wait-on-check-action@v1.3.4 - with: - ref: ${{ github.sha }} - check-name: Build Website Docker Image - repo-token: ${{ secrets.GITHUB_TOKEN }} - wait-interval: 2 - - - name: Wait for Keycloakify Docker Image - uses: lewagon/wait-on-check-action@v1.3.4 - with: - ref: ${{ github.sha }} - check-name: Build keycloakify Docker Image - repo-token: ${{ secrets.GITHUB_TOKEN }} - wait-interval: 2 - # End of wait block + # Action misbehaved + # # Waits are identical to the update-argocd-metadata.yml file + # # Mirror changes to that file + # - name: Wait for Config Processor Docker Image + # uses: lewagon/wait-on-check-action@v1.3.4 + # with: + # ref: ${{ github.sha }} + # check-name: Build config-processor Docker Image + # repo-token: ${{ secrets.GITHUB_TOKEN }} + # wait-interval: 2 + + # - name: Wait for Backend Docker Image + # uses: lewagon/wait-on-check-action@v1.3.4 + # with: + # ref: ${{ github.sha }} + # check-name: Build Backend Docker Image + # repo-token: ${{ secrets.GITHUB_TOKEN }} + # wait-interval: 2 + + # - name: Wait for Website Docker Image + # uses: lewagon/wait-on-check-action@v1.3.4 + # with: + # ref: ${{ github.sha }} + # check-name: Build Website Docker Image + # repo-token: ${{ secrets.GITHUB_TOKEN }} + # wait-interval: 2 + + # - name: Wait for Keycloakify Docker Image + # uses: lewagon/wait-on-check-action@v1.3.4 + # with: + # ref: ${{ github.sha }} + # check-name: Build keycloakify Docker Image + # repo-token: ${{ secrets.GITHUB_TOKEN }} + # wait-interval: 2 + # # End of wait block - name: Wait for the pods to be ready (timeout 480s) run: ./.github/scripts/wait_for_pods_to_be_ready.py From ddf634e42f1a1e1ce18e3dc6217b4b31aed8dc8d Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Sat, 11 May 2024 23:56:31 +0200 Subject: [PATCH 16/16] fix dir hash inclusion of arm --- .github/workflows/backend-image.yml | 2 +- .github/workflows/ingest-image.yml | 2 +- .github/workflows/keycloakify-image.yml | 2 +- .github/workflows/preprocessing-dummy-image.yml | 2 +- .github/workflows/preprocessing-nextclade-image.yml | 2 +- .github/workflows/website-image.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/backend-image.yml b/.github/workflows/backend-image.yml index 09edea51be..e4b2b87bb1 100644 --- a/.github/workflows/backend-image.yml +++ b/.github/workflows/backend-image.yml @@ -47,7 +47,7 @@ jobs: id: files-hash run: | DIR_HASH=$(echo -n ${{ hashFiles('backend/**', '.github/workflows/backend-image.yml') }}) - echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM && '-arm'|| '' }}" >> $GITHUB_ENV + echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM == 'true' && '-arm' || '' }}" >> $GITHUB_ENV - name: Setup Docker metadata id: dockerMetadata diff --git a/.github/workflows/ingest-image.yml b/.github/workflows/ingest-image.yml index 3e48317279..fdef07b9f4 100644 --- a/.github/workflows/ingest-image.yml +++ b/.github/workflows/ingest-image.yml @@ -44,7 +44,7 @@ jobs: id: files-hash run: | DIR_HASH=$(echo -n ${{ hashFiles('ingest/**', '.github/workflows/ingest-image.yml') }}) - echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM && '-arm'|| '' }}" >> $GITHUB_ENV + echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM == 'true' && '-arm' || '' }}" >> $GITHUB_ENV - name: Setup Docker metadata id: dockerMetadata diff --git a/.github/workflows/keycloakify-image.yml b/.github/workflows/keycloakify-image.yml index bae45ead8a..749f877324 100644 --- a/.github/workflows/keycloakify-image.yml +++ b/.github/workflows/keycloakify-image.yml @@ -49,7 +49,7 @@ jobs: id: files-hash run: | DIR_HASH=$(echo -n ${{ hashFiles('./keycloak/keycloakify/**','.github/workflows/keycloakify-image.yml') }}) - echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM && '-arm'|| '' }}" >> $GITHUB_ENV + echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM == 'true' && '-arm' || '' }}" >> $GITHUB_ENV - name: Setup Docker metadata id: dockerMetadata uses: docker/metadata-action@v5 diff --git a/.github/workflows/preprocessing-dummy-image.yml b/.github/workflows/preprocessing-dummy-image.yml index 6f135025f2..e9d308b8e2 100644 --- a/.github/workflows/preprocessing-dummy-image.yml +++ b/.github/workflows/preprocessing-dummy-image.yml @@ -44,7 +44,7 @@ jobs: id: files-hash run: | DIR_HASH=$(echo -n ${{ hashFiles('preprocessing/dummy/**', '.github/workflows/preprocessing-dummy-image.yml') }}) - echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM && '-arm'|| '' }}" >> $GITHUB_ENV + echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM == 'true' && '-arm' || '' }}" >> $GITHUB_ENV - name: Setup Docker metadata id: dockerMetadata diff --git a/.github/workflows/preprocessing-nextclade-image.yml b/.github/workflows/preprocessing-nextclade-image.yml index df81150b05..71afec2bc2 100644 --- a/.github/workflows/preprocessing-nextclade-image.yml +++ b/.github/workflows/preprocessing-nextclade-image.yml @@ -45,7 +45,7 @@ jobs: id: files-hash run: | DIR_HASH=$(echo -n ${{ hashFiles('preprocessing/nextclade/**', '.github/workflows/preprocessing-nextclade-image.yml') }}) - echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM && '-arm'|| '' }}" >> $GITHUB_ENV + echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM == 'true' && '-arm' || '' }}" >> $GITHUB_ENV - name: Setup Docker metadata id: dockerMetadata diff --git a/.github/workflows/website-image.yml b/.github/workflows/website-image.yml index 0d31b98a83..a0169494e5 100644 --- a/.github/workflows/website-image.yml +++ b/.github/workflows/website-image.yml @@ -44,7 +44,7 @@ jobs: id: files-hash run: | DIR_HASH=$(echo -n ${{ hashFiles('website/**', '.github/workflows/website-image.yml') }}) - echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM && '-arm'|| '' }}" >> $GITHUB_ENV + echo "DIR_HASH=$DIR_HASH${{ env.BUILD_ARM == 'true' && '-arm' || '' }}" >> $GITHUB_ENV - name: Setup Docker metadata id: dockerMetadata