From 8ccb8bb981abe41ea7172f65f4664a3beaaa9f70 Mon Sep 17 00:00:00 2001 From: Andreas Beuge Date: Tue, 28 Jan 2025 14:09:07 +0100 Subject: [PATCH 1/5] fix: pipeline cache setting for ecr builds --- .github/workflows/build-image.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml index 08bb869..6185095 100644 --- a/.github/workflows/build-image.yaml +++ b/.github/workflows/build-image.yaml @@ -172,8 +172,8 @@ jobs: APP_NAME=${{ github.event.deployment.payload.name }} ENVIRONMENT=${{ github.event.deployment.payload.env }} NPM_GITHUB_TOKEN=${{ secrets.npmGithubReadToken }} - cache-from: type=registry,ref=${{ inputs.registryHostname }}/${{ github.event.deployment.payload.name }} - cache-to: type=inline + cache-from: type=registry,ref=${{ inputs.registryHostname }}/${{ github.event.deployment.payload.name }}:cache + cache-to: type=registry,ref=${{ inputs.registryHostname }}/${{ github.event.deployment.payload.name }}:cache,mode=max context: ${{ github.event.deployment.payload.container.context }} load: true file: ${{ github.event.deployment.payload.container.file }} @@ -313,8 +313,8 @@ jobs: APP_NAME=${{ github.event.deployment.payload.name }} ENVIRONMENT=${{ github.event.deployment.payload.env }} NPM_GITHUB_TOKEN=${{ secrets.npmGithubReadToken }} - cache-from: type=registry,ref=${{ inputs.registryHostname }}/${{ github.event.deployment.payload.name }} - cache-to: type=inline + cache-from: type=registry,ref=${{ inputs.registryHostname }}/${{ github.event.deployment.payload.name }}:cache + cache-to: type=registry,ref=${{ inputs.registryHostname }}/${{ github.event.deployment.payload.name }}:cache,mode=max context: ${{ github.event.deployment.payload.container.context }} load: true file: ${{ github.event.deployment.payload.container.file }} From 813fbc3ef16ce607d295c2e0254636e303f052cd Mon Sep 17 00:00:00 2001 From: Andreas Beuge Date: Tue, 28 Jan 2025 14:13:40 +0100 Subject: [PATCH 2/5] fix: set commit sha for step --- .github/workflows/kubernetes.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kubernetes.yaml b/.github/workflows/kubernetes.yaml index b572fd2..53a217d 100644 --- a/.github/workflows/kubernetes.yaml +++ b/.github/workflows/kubernetes.yaml @@ -178,7 +178,7 @@ jobs: build: needs: [initialize] - uses: parcelLab/ci/.github/workflows/build-image.yaml@main + uses: parcelLab/ci/.github/workflows/build-image.yaml@8ccb8bb981abe41ea7172f65f4664a3beaaa9f70 with: artifactName: ${{ inputs.artifactName }} artifactPath: ${{ inputs.artifactPath }} From 33f6d1e4985443ae9aea8819a207fa6130659d4a Mon Sep 17 00:00:00 2001 From: Andreas Beuge Date: Tue, 28 Jan 2025 14:33:17 +0100 Subject: [PATCH 3/5] fix: test cache-to setting --- .github/workflows/build-image.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml index 6185095..489f616 100644 --- a/.github/workflows/build-image.yaml +++ b/.github/workflows/build-image.yaml @@ -173,7 +173,8 @@ jobs: ENVIRONMENT=${{ github.event.deployment.payload.env }} NPM_GITHUB_TOKEN=${{ secrets.npmGithubReadToken }} cache-from: type=registry,ref=${{ inputs.registryHostname }}/${{ github.event.deployment.payload.name }}:cache - cache-to: type=registry,ref=${{ inputs.registryHostname }}/${{ github.event.deployment.payload.name }}:cache,mode=max + cache-to: type=inline + # cache-to: type=registry,ref=${{ inputs.registryHostname }}/${{ github.event.deployment.payload.name }}:cache,mode=max context: ${{ github.event.deployment.payload.container.context }} load: true file: ${{ github.event.deployment.payload.container.file }} @@ -314,7 +315,8 @@ jobs: ENVIRONMENT=${{ github.event.deployment.payload.env }} NPM_GITHUB_TOKEN=${{ secrets.npmGithubReadToken }} cache-from: type=registry,ref=${{ inputs.registryHostname }}/${{ github.event.deployment.payload.name }}:cache - cache-to: type=registry,ref=${{ inputs.registryHostname }}/${{ github.event.deployment.payload.name }}:cache,mode=max + cache-to: type=inline + # cache-to: type=registry,ref=${{ inputs.registryHostname }}/${{ github.event.deployment.payload.name }}:cache,mode=max context: ${{ github.event.deployment.payload.container.context }} load: true file: ${{ github.event.deployment.payload.container.file }} From 1e1d369fd48198b2bd670cf1e8108c8d6d26c57a Mon Sep 17 00:00:00 2001 From: Andreas Beuge Date: Tue, 28 Jan 2025 14:33:59 +0100 Subject: [PATCH 4/5] fix: update sha ref --- .github/workflows/kubernetes.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kubernetes.yaml b/.github/workflows/kubernetes.yaml index 53a217d..925d6e4 100644 --- a/.github/workflows/kubernetes.yaml +++ b/.github/workflows/kubernetes.yaml @@ -178,7 +178,7 @@ jobs: build: needs: [initialize] - uses: parcelLab/ci/.github/workflows/build-image.yaml@8ccb8bb981abe41ea7172f65f4664a3beaaa9f70 + uses: parcelLab/ci/.github/workflows/build-image.yaml@33f6d1e4985443ae9aea8819a207fa6130659d4a with: artifactName: ${{ inputs.artifactName }} artifactPath: ${{ inputs.artifactPath }} From 49f42fbc0e23496c70bf588ffe96a5aca9925eb0 Mon Sep 17 00:00:00 2001 From: Andreas Beuge Date: Tue, 28 Jan 2025 15:24:32 +0100 Subject: [PATCH 5/5] fix: inf-2225 fix ci pipeline registry ecr cache --- .github/workflows/build-image.yaml | 2 -- .github/workflows/kubernetes.yaml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml index 489f616..2c808d9 100644 --- a/.github/workflows/build-image.yaml +++ b/.github/workflows/build-image.yaml @@ -174,7 +174,6 @@ jobs: NPM_GITHUB_TOKEN=${{ secrets.npmGithubReadToken }} cache-from: type=registry,ref=${{ inputs.registryHostname }}/${{ github.event.deployment.payload.name }}:cache cache-to: type=inline - # cache-to: type=registry,ref=${{ inputs.registryHostname }}/${{ github.event.deployment.payload.name }}:cache,mode=max context: ${{ github.event.deployment.payload.container.context }} load: true file: ${{ github.event.deployment.payload.container.file }} @@ -316,7 +315,6 @@ jobs: NPM_GITHUB_TOKEN=${{ secrets.npmGithubReadToken }} cache-from: type=registry,ref=${{ inputs.registryHostname }}/${{ github.event.deployment.payload.name }}:cache cache-to: type=inline - # cache-to: type=registry,ref=${{ inputs.registryHostname }}/${{ github.event.deployment.payload.name }}:cache,mode=max context: ${{ github.event.deployment.payload.container.context }} load: true file: ${{ github.event.deployment.payload.container.file }} diff --git a/.github/workflows/kubernetes.yaml b/.github/workflows/kubernetes.yaml index 925d6e4..b572fd2 100644 --- a/.github/workflows/kubernetes.yaml +++ b/.github/workflows/kubernetes.yaml @@ -178,7 +178,7 @@ jobs: build: needs: [initialize] - uses: parcelLab/ci/.github/workflows/build-image.yaml@33f6d1e4985443ae9aea8819a207fa6130659d4a + uses: parcelLab/ci/.github/workflows/build-image.yaml@main with: artifactName: ${{ inputs.artifactName }} artifactPath: ${{ inputs.artifactPath }}