From ddbaaaea0d5b36c77dc610e54f4e19cad91d11f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 11 Oct 2024 13:47:16 +0200 Subject: [PATCH 01/90] Add github action for eur2ccd release --- .github/workflows/release.yaml | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..8be63ec --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,43 @@ +name: Build and Push Database Exporter + +on: + push: + branches: + - ekw/gh-actions/release + +env: + UBUNTU_VERSION: '20.04' + GHC_VERSION: '9.6.4' + STATIC_LIBRARIES_IMAGE_TAG: 'rust-1.73.0_ghc-9.6.4' + VERSION: '7.0.5-0' + STACK_VERSION: '2.7.5' + FLATBUFFERS_VERSION: '22.12.06' + S3_BUCKET: "s3://eur2ccd.concordium.com" + PKG_FILE: "concordium-eur2ccd_${version}_amd64.deb" + OUT_FILE: "concordium-eur2ccd_${version}-${build}_amd64.deb" + OUT_PATH: "${S3_BUCKET}/${OUT_FILE}" + OUT_DIR: sh(script: 'mktemp -d', returnStdout: true).trim() + +jobs: + release-euro2ccd: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + ref: ${{ env.VERSION }} + submodules: recursive + + - name: Build + run: | + docker build -t ccd-service-builder --build-arg ubuntu_version=${base_image} --build-arg rust_image_tag=${rust_image_tag} -f scripts/debian-package/deb.Dockerfile . + set -euxo pipefail + id=$(docker create ccd-service-builder) + docker cp $id:/build/pkg-root/ eur2ccd-deb + docker rm $id + mv eur2ccd-deb/$PKG_FILE . + + #- name: Publish + # run: | + # aws s3 cp ${PKG_FILE} "${OUT_PATH}" + publish: From 6f06532b2e31fa15c3988074761b53cf527c341c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 14 Oct 2024 08:31:58 +0200 Subject: [PATCH 02/90] remove OUT_DIR --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8be63ec..ca5116f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -16,7 +16,7 @@ env: PKG_FILE: "concordium-eur2ccd_${version}_amd64.deb" OUT_FILE: "concordium-eur2ccd_${version}-${build}_amd64.deb" OUT_PATH: "${S3_BUCKET}/${OUT_FILE}" - OUT_DIR: sh(script: 'mktemp -d', returnStdout: true).trim() + #OUT_DIR: sh(script: 'mktemp -d', returnStdout: true).trim() jobs: release-euro2ccd: From 1b4db901b33d12abeb12203758b889830d2446b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 14 Oct 2024 08:38:40 +0200 Subject: [PATCH 03/90] Change ref to main --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ca5116f..96731e5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,7 +25,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 with: - ref: ${{ env.VERSION }} + ref: main submodules: recursive - name: Build From b84279601c976a77de8fd7b7295d9cbfb8c716b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 14 Oct 2024 08:41:48 +0200 Subject: [PATCH 04/90] Remove empty job --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 96731e5..4f6cff1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -40,4 +40,4 @@ jobs: #- name: Publish # run: | # aws s3 cp ${PKG_FILE} "${OUT_PATH}" - publish: + #publish: From 2cf2f2e8cc205358b5bd190f47335ccc755711e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 14 Oct 2024 08:52:20 +0200 Subject: [PATCH 05/90] change variable format --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4f6cff1..133c417 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -30,7 +30,7 @@ jobs: - name: Build run: | - docker build -t ccd-service-builder --build-arg ubuntu_version=${base_image} --build-arg rust_image_tag=${rust_image_tag} -f scripts/debian-package/deb.Dockerfile . + docker build -t ccd-service-builder --build-arg ubuntu_version=${{ env.UBUNTU_VERSION }} --build-arg rust_image_tag=${{ env.STATIC_LIBRARIES_TAG }} -f scripts/debian-package/deb.Dockerfile . set -euxo pipefail id=$(docker create ccd-service-builder) docker cp $id:/build/pkg-root/ eur2ccd-deb From 2348336836cbcbade70acf222965d17b022ff5d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 14 Oct 2024 08:53:25 +0200 Subject: [PATCH 06/90] Change var name --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 133c417..9971960 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -30,7 +30,7 @@ jobs: - name: Build run: | - docker build -t ccd-service-builder --build-arg ubuntu_version=${{ env.UBUNTU_VERSION }} --build-arg rust_image_tag=${{ env.STATIC_LIBRARIES_TAG }} -f scripts/debian-package/deb.Dockerfile . + docker build -t ccd-service-builder --build-arg ubuntu_version=${{ env.UBUNTU_VERSION }} --build-arg rust_image_tag=${{ env.STATIC_LIBRARIES_IMAGE_TAG }} -f scripts/debian-package/deb.Dockerfile . set -euxo pipefail id=$(docker create ccd-service-builder) docker cp $id:/build/pkg-root/ eur2ccd-deb From e92d83c83033a156bfeb98e51aaadbf93126f0fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 14 Oct 2024 08:56:21 +0200 Subject: [PATCH 07/90] Change rust name --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9971960..b5acefd 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,7 +8,7 @@ on: env: UBUNTU_VERSION: '20.04' GHC_VERSION: '9.6.4' - STATIC_LIBRARIES_IMAGE_TAG: 'rust-1.73.0_ghc-9.6.4' + STATIC_LIBRARIES_IMAGE_TAG: '1.73.0' VERSION: '7.0.5-0' STACK_VERSION: '2.7.5' FLATBUFFERS_VERSION: '22.12.06' From 8e5693a0e9c012ebb372e78ccc9df0aabf5b8b69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 14 Oct 2024 14:23:26 +0200 Subject: [PATCH 08/90] bump ubuntu version --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b5acefd..6f65af5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,7 +6,7 @@ on: - ekw/gh-actions/release env: - UBUNTU_VERSION: '20.04' + UBUNTU_VERSION: '22.04' GHC_VERSION: '9.6.4' STATIC_LIBRARIES_IMAGE_TAG: '1.73.0' VERSION: '7.0.5-0' From bda37eeba631b8b9746652ef4576241c5325b2a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 14 Oct 2024 14:40:51 +0200 Subject: [PATCH 09/90] Update variables to use double curly brackets --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6f65af5..509b1f3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,8 +13,8 @@ env: STACK_VERSION: '2.7.5' FLATBUFFERS_VERSION: '22.12.06' S3_BUCKET: "s3://eur2ccd.concordium.com" - PKG_FILE: "concordium-eur2ccd_${version}_amd64.deb" - OUT_FILE: "concordium-eur2ccd_${version}-${build}_amd64.deb" + PKG_FILE: "concordium-eur2ccd_${{version}}_amd64.deb" + OUT_FILE: "concordium-eur2ccd_${{version}}-${{build}}_amd64.deb" OUT_PATH: "${S3_BUCKET}/${OUT_FILE}" #OUT_DIR: sh(script: 'mktemp -d', returnStdout: true).trim() From 9609d4ca4821cfbc3b6e995ff9e8417756e93521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 14 Oct 2024 14:43:23 +0200 Subject: [PATCH 10/90] Add version varviable --- .github/workflows/release.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 509b1f3..f30533f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,9 +12,10 @@ env: VERSION: '7.0.5-0' STACK_VERSION: '2.7.5' FLATBUFFERS_VERSION: '22.12.06' + EUR2CCD_VERSION: '0.6.1' S3_BUCKET: "s3://eur2ccd.concordium.com" - PKG_FILE: "concordium-eur2ccd_${{version}}_amd64.deb" - OUT_FILE: "concordium-eur2ccd_${{version}}-${{build}}_amd64.deb" + PKG_FILE: "concordium-eur2ccd_${{ EUR2CCD_VERSION }}_amd64.deb" + #OUT_FILE: "concordium-eur2ccd_${{ EUR2CCD_VERSION} }-${{build}}_amd64.deb" OUT_PATH: "${S3_BUCKET}/${OUT_FILE}" #OUT_DIR: sh(script: 'mktemp -d', returnStdout: true).trim() From 0a94ee933cc40966c46a1f50e133f1d5775b3005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 14 Oct 2024 14:54:53 +0200 Subject: [PATCH 11/90] Use single quotes in variables --- .github/workflows/release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f30533f..e7f969a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,10 +13,10 @@ env: STACK_VERSION: '2.7.5' FLATBUFFERS_VERSION: '22.12.06' EUR2CCD_VERSION: '0.6.1' - S3_BUCKET: "s3://eur2ccd.concordium.com" - PKG_FILE: "concordium-eur2ccd_${{ EUR2CCD_VERSION }}_amd64.deb" + S3_BUCKET: 's3://eur2ccd.concordium.com' + PKG_FILE: 'concordium-eur2ccd_${{ EUR2CCD_VERSION }}_amd64.deb' #OUT_FILE: "concordium-eur2ccd_${{ EUR2CCD_VERSION} }-${{build}}_amd64.deb" - OUT_PATH: "${S3_BUCKET}/${OUT_FILE}" + #OUT_PATH: '${S3_BUCKET}/${OUT_FILE}'' #OUT_DIR: sh(script: 'mktemp -d', returnStdout: true).trim() jobs: From 9519b6fd437ff71d67ea5246bb056108372ca659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 15 Oct 2024 08:44:09 +0200 Subject: [PATCH 12/90] Add env to used variable --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e7f969a..1bd053b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,7 +14,7 @@ env: FLATBUFFERS_VERSION: '22.12.06' EUR2CCD_VERSION: '0.6.1' S3_BUCKET: 's3://eur2ccd.concordium.com' - PKG_FILE: 'concordium-eur2ccd_${{ EUR2CCD_VERSION }}_amd64.deb' + PKG_FILE: 'concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb' #OUT_FILE: "concordium-eur2ccd_${{ EUR2CCD_VERSION} }-${{build}}_amd64.deb" #OUT_PATH: '${S3_BUCKET}/${OUT_FILE}'' #OUT_DIR: sh(script: 'mktemp -d', returnStdout: true).trim() From 02b09ab92c56e55e18619db27437d97448147349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 15 Oct 2024 08:49:50 +0200 Subject: [PATCH 13/90] Remove env var --- .github/workflows/release.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1bd053b..6398bb1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,7 +14,6 @@ env: FLATBUFFERS_VERSION: '22.12.06' EUR2CCD_VERSION: '0.6.1' S3_BUCKET: 's3://eur2ccd.concordium.com' - PKG_FILE: 'concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb' #OUT_FILE: "concordium-eur2ccd_${{ EUR2CCD_VERSION} }-${{build}}_amd64.deb" #OUT_PATH: '${S3_BUCKET}/${OUT_FILE}'' #OUT_DIR: sh(script: 'mktemp -d', returnStdout: true).trim() @@ -36,7 +35,7 @@ jobs: id=$(docker create ccd-service-builder) docker cp $id:/build/pkg-root/ eur2ccd-deb docker rm $id - mv eur2ccd-deb/$PKG_FILE . + mv eur2ccd-deb/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb . #- name: Publish # run: | From 6b134fd062c344da76e896b71f6a59bc372e8ef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 15 Oct 2024 09:07:16 +0200 Subject: [PATCH 14/90] Add publish step --- .github/workflows/release.yaml | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6398bb1..a4229a0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,20 +3,13 @@ name: Build and Push Database Exporter on: push: branches: - - ekw/gh-actions/release + - main env: UBUNTU_VERSION: '22.04' - GHC_VERSION: '9.6.4' - STATIC_LIBRARIES_IMAGE_TAG: '1.73.0' - VERSION: '7.0.5-0' - STACK_VERSION: '2.7.5' - FLATBUFFERS_VERSION: '22.12.06' + RUST_IMAGE_TAG: '1.73.0' EUR2CCD_VERSION: '0.6.1' S3_BUCKET: 's3://eur2ccd.concordium.com' - #OUT_FILE: "concordium-eur2ccd_${{ EUR2CCD_VERSION} }-${{build}}_amd64.deb" - #OUT_PATH: '${S3_BUCKET}/${OUT_FILE}'' - #OUT_DIR: sh(script: 'mktemp -d', returnStdout: true).trim() jobs: release-euro2ccd: @@ -30,14 +23,13 @@ jobs: - name: Build run: | - docker build -t ccd-service-builder --build-arg ubuntu_version=${{ env.UBUNTU_VERSION }} --build-arg rust_image_tag=${{ env.STATIC_LIBRARIES_IMAGE_TAG }} -f scripts/debian-package/deb.Dockerfile . + docker build -t ccd-service-builder --build-arg ubuntu_version=${{ env.UBUNTU_VERSION }} --build-arg rust_image_tag=${{ env.RUST_IMAGE_TAG }} -f scripts/debian-package/deb.Dockerfile . set -euxo pipefail id=$(docker create ccd-service-builder) docker cp $id:/build/pkg-root/ eur2ccd-deb docker rm $id mv eur2ccd-deb/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb . - #- name: Publish - # run: | - # aws s3 cp ${PKG_FILE} "${OUT_PATH}" - #publish: + - name: Publish + run: | + aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb "${{ env.S3_Bucket }}/concordium-eur2ccd_${{ EUR2CCD_VERSION }}-${{ env.EUR2CCD_VERSION }}_amd64.deb" From 10a1e78b5696aa4f3061de0d1e1a4912e6d0b5c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 15 Oct 2024 09:19:01 +0200 Subject: [PATCH 15/90] Use release.yaml to control whether we make a release --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a4229a0..5cf3a74 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,8 +2,8 @@ name: Build and Push Database Exporter on: push: - branches: - - main + paths: + - .github/workflowf/release.yaml env: UBUNTU_VERSION: '22.04' From 23f1fe6a0e50d1ba0a0ea5668f8c8d71b4b0e7e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 15 Oct 2024 09:35:01 +0200 Subject: [PATCH 16/90] Use tags for release --- .github/workflows/release.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5cf3a74..f85ba2f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,8 +2,9 @@ name: Build and Push Database Exporter on: push: - paths: - - .github/workflowf/release.yaml + tags: '*.*.*-*' + workflow_dispatch: # trigger manually (for debugging) + env: UBUNTU_VERSION: '22.04' From 0d863886ec0a5d95e1501ad6a555da5c7830551a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 15 Oct 2024 09:41:42 +0200 Subject: [PATCH 17/90] Revert to branch push --- .github/workflows/release.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f85ba2f..6f46436 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,9 +2,8 @@ name: Build and Push Database Exporter on: push: - tags: '*.*.*-*' - workflow_dispatch: # trigger manually (for debugging) - + branch: + - ekw/gc-actions/release env: UBUNTU_VERSION: '22.04' From 4fe3e9c654a1870a4683ed3e3b27c8b09fd36858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 15 Oct 2024 09:48:40 +0200 Subject: [PATCH 18/90] Test push stage --- .github/workflows/release.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6f46436..89459a7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,7 +8,7 @@ on: env: UBUNTU_VERSION: '22.04' RUST_IMAGE_TAG: '1.73.0' - EUR2CCD_VERSION: '0.6.1' + EUR2CCD_VERSION: '0.5.2' S3_BUCKET: 's3://eur2ccd.concordium.com' jobs: @@ -21,14 +21,14 @@ jobs: ref: main submodules: recursive - - name: Build - run: | - docker build -t ccd-service-builder --build-arg ubuntu_version=${{ env.UBUNTU_VERSION }} --build-arg rust_image_tag=${{ env.RUST_IMAGE_TAG }} -f scripts/debian-package/deb.Dockerfile . - set -euxo pipefail - id=$(docker create ccd-service-builder) - docker cp $id:/build/pkg-root/ eur2ccd-deb - docker rm $id - mv eur2ccd-deb/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb . + #- name: Build + # run: | + # docker build -t ccd-service-builder --build-arg ubuntu_version=${{ env.UBUNTU_VERSION }} --build-arg rust_image_tag=${{ env.RUST_IMAGE_TAG }} -f scripts/debian-package/deb.Dockerfile . + # set -euxo pipefail + # id=$(docker create ccd-service-builder) + # docker cp $id:/build/pkg-root/ eur2ccd-deb + # docker rm $id + # mv eur2ccd-deb/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb . - name: Publish run: | From b0eef7bbf37fada9e23caa7d7b7f492ee198f0af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 15 Oct 2024 09:49:19 +0200 Subject: [PATCH 19/90] Test push stage --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 89459a7..4cc8df0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,7 +3,7 @@ name: Build and Push Database Exporter on: push: branch: - - ekw/gc-actions/release + - ekw/gh-actions/release env: UBUNTU_VERSION: '22.04' From 7c1f5940df4d48b8f315e9e6995990c239c92553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 15 Oct 2024 09:50:01 +0200 Subject: [PATCH 20/90] Test push stage --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4cc8df0..c5f739e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -32,4 +32,4 @@ jobs: - name: Publish run: | - aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb "${{ env.S3_Bucket }}/concordium-eur2ccd_${{ EUR2CCD_VERSION }}-${{ env.EUR2CCD_VERSION }}_amd64.deb" + aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb "${{ env.S3_Bucket }}/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}-${{ env.EUR2CCD_VERSION }}_amd64.deb" From becad0b9a632509cd29ebbde60fd9e0e3aec4269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 15 Oct 2024 09:58:46 +0200 Subject: [PATCH 21/90] Test publish stage --- .github/workflows/release.yaml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c5f739e..4346da2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,7 +8,8 @@ on: env: UBUNTU_VERSION: '22.04' RUST_IMAGE_TAG: '1.73.0' - EUR2CCD_VERSION: '0.5.2' + EUR2CCD_VERSION: '0.6.1' + BUILD_VERSION: '20' S3_BUCKET: 's3://eur2ccd.concordium.com' jobs: @@ -18,18 +19,18 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 with: - ref: main + ref: ${{ env.EUR2CCD_VERSION }} submodules: recursive - #- name: Build - # run: | - # docker build -t ccd-service-builder --build-arg ubuntu_version=${{ env.UBUNTU_VERSION }} --build-arg rust_image_tag=${{ env.RUST_IMAGE_TAG }} -f scripts/debian-package/deb.Dockerfile . - # set -euxo pipefail - # id=$(docker create ccd-service-builder) - # docker cp $id:/build/pkg-root/ eur2ccd-deb - # docker rm $id - # mv eur2ccd-deb/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb . + - name: Build + run: | + docker build -t ccd-service-builder --build-arg ubuntu_version=${{ env.UBUNTU_VERSION }} --build-arg rust_image_tag=${{ env.RUST_IMAGE_TAG }} -f scripts/debian-package/deb.Dockerfile . + set -euxo pipefail + id=$(docker create ccd-service-builder) + docker cp $id:/build/pkg-root/ eur2ccd-deb + docker rm $id + mv eur2ccd-deb/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb . - name: Publish run: | - aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb "${{ env.S3_Bucket }}/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}-${{ env.EUR2CCD_VERSION }}_amd64.deb" + aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb "${{ env.S3_Bucket }}/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}-${{ env.BUILD_VERSION }}_amd64.deb" From 2bc1293c8189237c474b9b03eb4b99a7209c8562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 15 Oct 2024 10:00:06 +0200 Subject: [PATCH 22/90] Test publish stage --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4346da2..54338b3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,7 +19,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 with: - ref: ${{ env.EUR2CCD_VERSION }} + ref: ${{ env.EUR2CCD_VERSION }}-0 submodules: recursive - name: Build From e898525fe1d078248130b0f3e879c97b6683216b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 15 Oct 2024 12:33:38 +0200 Subject: [PATCH 23/90] Use oidc for aws access --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 54338b3..ef195fb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -15,6 +15,7 @@ env: jobs: release-euro2ccd: runs-on: ubuntu-latest + environment: upload-s3 steps: - name: Checkout Repository uses: actions/checkout@v4 From bdf3ad3194d20ccbc4850842c23ca58d10a0fe75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 15 Oct 2024 12:46:03 +0200 Subject: [PATCH 24/90] Configure aws credentials --- .github/workflows/release.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ef195fb..26c63fb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -23,6 +23,13 @@ jobs: ref: ${{ env.EUR2CCD_VERSION }}-0 submodules: recursive + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: "eu-west-1" + role-to-assume: "arn:aws:iam::192549843005:role/github-eur2ccd" + role-session-name: ReleaseEur2ccdSession + - name: Build run: | docker build -t ccd-service-builder --build-arg ubuntu_version=${{ env.UBUNTU_VERSION }} --build-arg rust_image_tag=${{ env.RUST_IMAGE_TAG }} -f scripts/debian-package/deb.Dockerfile . From 27eccaf9766a7617729673b3b549397b439ab925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 15 Oct 2024 12:53:24 +0200 Subject: [PATCH 25/90] Add permissions to get jwt --- .github/workflows/release.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 26c63fb..2c38a37 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,6 +12,10 @@ env: BUILD_VERSION: '20' S3_BUCKET: 's3://eur2ccd.concordium.com' +permissions: + id-token: write + contents: read + jobs: release-euro2ccd: runs-on: ubuntu-latest From c390be78a31c13acda3ddc10216b0aca6f4e8d64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 15 Oct 2024 13:00:04 +0200 Subject: [PATCH 26/90] Format --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2c38a37..5d5a2e0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,7 +10,7 @@ env: RUST_IMAGE_TAG: '1.73.0' EUR2CCD_VERSION: '0.6.1' BUILD_VERSION: '20' - S3_BUCKET: 's3://eur2ccd.concordium.com' + S3_BUCKET: "s3://eur2ccd.concordium.com" permissions: id-token: write @@ -45,4 +45,4 @@ jobs: - name: Publish run: | - aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb "${{ env.S3_Bucket }}/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}-${{ env.BUILD_VERSION }}_amd64.deb" + aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb ${{ env.S3_Bucket }}/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}-${{ env.BUILD_VERSION }}_amd64.deb From 410594121ab1ce261afa1fc9c540ff0f191805b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 15 Oct 2024 13:07:05 +0200 Subject: [PATCH 27/90] Format --- .github/workflows/release.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5d5a2e0..3cb3d16 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,7 +10,7 @@ env: RUST_IMAGE_TAG: '1.73.0' EUR2CCD_VERSION: '0.6.1' BUILD_VERSION: '20' - S3_BUCKET: "s3://eur2ccd.concordium.com" + S3_BUCKET: s3://eur2ccd.concordium.com permissions: id-token: write @@ -34,14 +34,14 @@ jobs: role-to-assume: "arn:aws:iam::192549843005:role/github-eur2ccd" role-session-name: ReleaseEur2ccdSession - - name: Build - run: | - docker build -t ccd-service-builder --build-arg ubuntu_version=${{ env.UBUNTU_VERSION }} --build-arg rust_image_tag=${{ env.RUST_IMAGE_TAG }} -f scripts/debian-package/deb.Dockerfile . - set -euxo pipefail - id=$(docker create ccd-service-builder) - docker cp $id:/build/pkg-root/ eur2ccd-deb - docker rm $id - mv eur2ccd-deb/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb . + #- name: Build + # run: | + # docker build -t ccd-service-builder --build-arg ubuntu_version=${{ env.UBUNTU_VERSION }} --build-arg rust_image_tag=${{ env.RUST_IMAGE_TAG }} -f scripts/debian-package/deb.Dockerfile . + # set -euxo pipefail + # id=$(docker create ccd-service-builder) + # docker cp $id:/build/pkg-root/ eur2ccd-deb + # docker rm $id + # mv eur2ccd-deb/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb . - name: Publish run: | From 20e91a844400a85697f2723918622888c4f80bd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 15 Oct 2024 13:07:58 +0200 Subject: [PATCH 28/90] Format --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3cb3d16..1f2a51f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -45,4 +45,4 @@ jobs: - name: Publish run: | - aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb ${{ env.S3_Bucket }}/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}-${{ env.BUILD_VERSION }}_amd64.deb + aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}-${{ env.BUILD_VERSION }}_amd64.deb From e11bcb2b42997199a4b331816a10dbb87b949356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 15 Oct 2024 13:08:48 +0200 Subject: [PATCH 29/90] Format --- .github/workflows/release.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1f2a51f..28635ea 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -34,14 +34,14 @@ jobs: role-to-assume: "arn:aws:iam::192549843005:role/github-eur2ccd" role-session-name: ReleaseEur2ccdSession - #- name: Build - # run: | - # docker build -t ccd-service-builder --build-arg ubuntu_version=${{ env.UBUNTU_VERSION }} --build-arg rust_image_tag=${{ env.RUST_IMAGE_TAG }} -f scripts/debian-package/deb.Dockerfile . - # set -euxo pipefail - # id=$(docker create ccd-service-builder) - # docker cp $id:/build/pkg-root/ eur2ccd-deb - # docker rm $id - # mv eur2ccd-deb/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb . + - name: Build + run: | + docker build -t ccd-service-builder --build-arg ubuntu_version=${{ env.UBUNTU_VERSION }} --build-arg rust_image_tag=${{ env.RUST_IMAGE_TAG }} -f scripts/debian-package/deb.Dockerfile . + set -euxo pipefail + id=$(docker create ccd-service-builder) + docker cp $id:/build/pkg-root/ eur2ccd-deb + docker rm $id + mv eur2ccd-deb/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb . - name: Publish run: | From cd359e791c33373520234ee9234229a628f871cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 16 Oct 2024 08:47:53 +0200 Subject: [PATCH 30/90] Make check to see if eur2ccd service has been built --- .github/workflows/release.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 28635ea..02ffd34 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -34,7 +34,12 @@ jobs: role-to-assume: "arn:aws:iam::192549843005:role/github-eur2ccd" role-session-name: ReleaseEur2ccdSession + - name: Check built packages + run: | + echo S3_OBJ=$(aws s3 ls s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}-${{ env.BUILD_VERSION }}_amd64.deb) >> $GITHUB_ENV + - name: Build + if: ${{ env.S3_OBJ == '' }} run: | docker build -t ccd-service-builder --build-arg ubuntu_version=${{ env.UBUNTU_VERSION }} --build-arg rust_image_tag=${{ env.RUST_IMAGE_TAG }} -f scripts/debian-package/deb.Dockerfile . set -euxo pipefail @@ -44,5 +49,6 @@ jobs: mv eur2ccd-deb/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb . - name: Publish + if: ${{ env.S3_OBJ == '' }} run: | aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}-${{ env.BUILD_VERSION }}_amd64.deb From 09323f835315fbd54ad947857e9a4ec38638cdfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 16 Oct 2024 09:53:12 +0200 Subject: [PATCH 31/90] Look at tag --- .github/workflows/release.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 02ffd34..acf2ac2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,14 +2,14 @@ name: Build and Push Database Exporter on: push: - branch: - - ekw/gh-actions/release + branches: + - "ekw/gh-actions/release" env: UBUNTU_VERSION: '22.04' RUST_IMAGE_TAG: '1.73.0' - EUR2CCD_VERSION: '0.6.1' - BUILD_VERSION: '20' + EUR2CCD_VERSION: ${GITHUB_REF#refs/tags/*/} + BUILD_VERSION: '0' S3_BUCKET: s3://eur2ccd.concordium.com permissions: @@ -24,7 +24,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 with: - ref: ${{ env.EUR2CCD_VERSION }}-0 + ref: ${{ env.EUR2CCD_VERSION }} submodules: recursive - name: Configure AWS Credentials @@ -36,7 +36,7 @@ jobs: - name: Check built packages run: | - echo S3_OBJ=$(aws s3 ls s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}-${{ env.BUILD_VERSION }}_amd64.deb) >> $GITHUB_ENV + echo S3_OBJ=$(aws s3 ls s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb) >> $GITHUB_ENV - name: Build if: ${{ env.S3_OBJ == '' }} @@ -46,9 +46,9 @@ jobs: id=$(docker create ccd-service-builder) docker cp $id:/build/pkg-root/ eur2ccd-deb docker rm $id - mv eur2ccd-deb/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb . + mv eur2ccd-deb/concordium-eur2ccd_${{ env.EUR2CCD_VERSION##-* }}_amd64.deb . - name: Publish if: ${{ env.S3_OBJ == '' }} run: | - aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}-${{ env.BUILD_VERSION }}_amd64.deb + aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION##-* }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb From 18c0c53e6f9b47696cdefac1d8586e02b37dd9f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 16 Oct 2024 09:57:25 +0200 Subject: [PATCH 32/90] Change way to look at tag --- .github/workflows/release.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index acf2ac2..8031cd9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,7 +8,7 @@ on: env: UBUNTU_VERSION: '22.04' RUST_IMAGE_TAG: '1.73.0' - EUR2CCD_VERSION: ${GITHUB_REF#refs/tags/*/} + EUR2CCD_VERSION: ${GITHUB_REF#refs/tags/*-} BUILD_VERSION: '0' S3_BUCKET: s3://eur2ccd.concordium.com @@ -24,7 +24,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 with: - ref: ${{ env.EUR2CCD_VERSION }} + ref: ${{ env.EUR2CCD_VERSION }}-${{ env.BUILD_VERSION }} submodules: recursive - name: Configure AWS Credentials @@ -36,7 +36,7 @@ jobs: - name: Check built packages run: | - echo S3_OBJ=$(aws s3 ls s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb) >> $GITHUB_ENV + echo S3_OBJ=$(aws s3 ls s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}-${{ env.BUILD_VERSION }}_amd64.deb) >> $GITHUB_ENV - name: Build if: ${{ env.S3_OBJ == '' }} @@ -46,9 +46,9 @@ jobs: id=$(docker create ccd-service-builder) docker cp $id:/build/pkg-root/ eur2ccd-deb docker rm $id - mv eur2ccd-deb/concordium-eur2ccd_${{ env.EUR2CCD_VERSION##-* }}_amd64.deb . + mv eur2ccd-deb/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb . - name: Publish if: ${{ env.S3_OBJ == '' }} run: | - aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION##-* }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb + aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}-${{ env.BUILD_VERSION }}_amd64.deb From 30688a82a6594c34e4ca03d98738d1fc58ac3d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 16 Oct 2024 09:59:38 +0200 Subject: [PATCH 33/90] Change way to look at tag --- .github/workflows/release.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8031cd9..435dac4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,7 +8,7 @@ on: env: UBUNTU_VERSION: '22.04' RUST_IMAGE_TAG: '1.73.0' - EUR2CCD_VERSION: ${GITHUB_REF#refs/tags/*-} + EUR2CCD_VERSION: ${{GITHUB_REF#refs/tags/*-}} BUILD_VERSION: '0' S3_BUCKET: s3://eur2ccd.concordium.com @@ -24,7 +24,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 with: - ref: ${{ env.EUR2CCD_VERSION }}-${{ env.BUILD_VERSION }} + ref: ${{ GITHUB_REF#refs/tags/*- }}-${{ env.BUILD_VERSION }} submodules: recursive - name: Configure AWS Credentials @@ -36,7 +36,7 @@ jobs: - name: Check built packages run: | - echo S3_OBJ=$(aws s3 ls s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}-${{ env.BUILD_VERSION }}_amd64.deb) >> $GITHUB_ENV + echo S3_OBJ=$(aws s3 ls s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ GITHUB_REF#refs/tags/*- }}-${{ env.BUILD_VERSION }}_amd64.deb) >> $GITHUB_ENV - name: Build if: ${{ env.S3_OBJ == '' }} @@ -46,9 +46,9 @@ jobs: id=$(docker create ccd-service-builder) docker cp $id:/build/pkg-root/ eur2ccd-deb docker rm $id - mv eur2ccd-deb/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb . + mv eur2ccd-deb/concordium-eur2ccd_${{ GITHUB_REF#refs/tags/*-N }}_amd64.deb . - name: Publish if: ${{ env.S3_OBJ == '' }} run: | - aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}-${{ env.BUILD_VERSION }}_amd64.deb + aws s3 cp concordium-eur2ccd_${{ GITHUB_REF#refs/tags/*- }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ GITHUB_REF#refs/tags/*- }}-${{ env.BUILD_VERSION }}_amd64.deb From b025b5d1c5bf0263cc39052ee63d53952332e56b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 16 Oct 2024 14:57:37 +0200 Subject: [PATCH 34/90] Revert for testing --- .github/workflows/release.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 435dac4..3c0a5ef 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,13 +3,13 @@ name: Build and Push Database Exporter on: push: branches: - - "ekw/gh-actions/release" + - ekw/gh-actions/release env: UBUNTU_VERSION: '22.04' RUST_IMAGE_TAG: '1.73.0' - EUR2CCD_VERSION: ${{GITHUB_REF#refs/tags/*-}} - BUILD_VERSION: '0' + EUR2CCD_VERSION: '0.6.1' + BUILD_VERSION: 'test' S3_BUCKET: s3://eur2ccd.concordium.com permissions: @@ -24,7 +24,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 with: - ref: ${{ GITHUB_REF#refs/tags/*- }}-${{ env.BUILD_VERSION }} + ref: ${{ env.EUR2CCD_VERSION }}-0 submodules: recursive - name: Configure AWS Credentials @@ -36,7 +36,7 @@ jobs: - name: Check built packages run: | - echo S3_OBJ=$(aws s3 ls s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ GITHUB_REF#refs/tags/*- }}-${{ env.BUILD_VERSION }}_amd64.deb) >> $GITHUB_ENV + echo S3_OBJ=$(aws s3 ls s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}-${{ env.BUILD_VERSION }}_amd64.deb) >> $GITHUB_ENV - name: Build if: ${{ env.S3_OBJ == '' }} @@ -46,9 +46,9 @@ jobs: id=$(docker create ccd-service-builder) docker cp $id:/build/pkg-root/ eur2ccd-deb docker rm $id - mv eur2ccd-deb/concordium-eur2ccd_${{ GITHUB_REF#refs/tags/*-N }}_amd64.deb . + mv eur2ccd-deb/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb . - name: Publish if: ${{ env.S3_OBJ == '' }} run: | - aws s3 cp concordium-eur2ccd_${{ GITHUB_REF#refs/tags/*- }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ GITHUB_REF#refs/tags/*- }}-${{ env.BUILD_VERSION }}_amd64.deb + aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}-${{ env.BUILD_VERSION }}_amd64.deb From 88494bf187f715609bda22b92b1f3fba5c24bde9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 16 Oct 2024 14:59:37 +0200 Subject: [PATCH 35/90] Change environment --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3c0a5ef..eed02ba 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,7 +19,7 @@ permissions: jobs: release-euro2ccd: runs-on: ubuntu-latest - environment: upload-s3 + environment: release steps: - name: Checkout Repository uses: actions/checkout@v4 From f18f74383848febcf7579c0565539f5f660ee562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 16 Oct 2024 15:01:43 +0200 Subject: [PATCH 36/90] Typo in role arn --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index eed02ba..8dabc6c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -31,7 +31,7 @@ jobs: uses: aws-actions/configure-aws-credentials@v4 with: aws-region: "eu-west-1" - role-to-assume: "arn:aws:iam::192549843005:role/github-eur2ccd" + role-to-assume: "arn:aws:iam::192549843005:role/github_eur2ccd" role-session-name: ReleaseEur2ccdSession - name: Check built packages From a3a7332418fb0ec95060eccce8c0afc18ab6c309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 08:17:18 +0200 Subject: [PATCH 37/90] Use tags --- .github/workflows/release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8dabc6c..566db7a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,8 +2,8 @@ name: Build and Push Database Exporter on: push: - branches: - - ekw/gh-actions/release + tags: + - "*.*.*-*" env: UBUNTU_VERSION: '22.04' @@ -24,7 +24,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 with: - ref: ${{ env.EUR2CCD_VERSION }}-0 + ref: ${{ env.EUR2CCD_VERSION }}-${{ env.build_VERSION }} submodules: recursive - name: Configure AWS Credentials From 58f8bef745e833962c335d2bc3132ed815a838b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 08:32:56 +0200 Subject: [PATCH 38/90] Use tags --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 566db7a..9c21e26 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -24,7 +24,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 with: - ref: ${{ env.EUR2CCD_VERSION }}-${{ env.build_VERSION }} + ref: ${{ GITHUB_REF#refs/tags/* }} submodules: recursive - name: Configure AWS Credentials From ab035a9c00e437deb23e19ba8bf13ad056016d41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 09:01:37 +0200 Subject: [PATCH 39/90] Use tags --- .github/workflows/release.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9c21e26..f92994c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,7 +9,6 @@ env: UBUNTU_VERSION: '22.04' RUST_IMAGE_TAG: '1.73.0' EUR2CCD_VERSION: '0.6.1' - BUILD_VERSION: 'test' S3_BUCKET: s3://eur2ccd.concordium.com permissions: @@ -21,10 +20,14 @@ jobs: runs-on: ubuntu-latest environment: release steps: + - name: Get the tag + id: get_version + run: echo TAG=${{GITHUB_REF#refs/tags/*}} >> $GITHUB_ENV + - name: Checkout Repository uses: actions/checkout@v4 with: - ref: ${{ GITHUB_REF#refs/tags/* }} + ref: ${{ env.TAG }} submodules: recursive - name: Configure AWS Credentials @@ -36,7 +39,7 @@ jobs: - name: Check built packages run: | - echo S3_OBJ=$(aws s3 ls s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}-${{ env.BUILD_VERSION }}_amd64.deb) >> $GITHUB_ENV + echo S3_OBJ=$(aws s3 ls s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.TAG }}_amd64.deb) >> $GITHUB_ENV - name: Build if: ${{ env.S3_OBJ == '' }} @@ -51,4 +54,4 @@ jobs: - name: Publish if: ${{ env.S3_OBJ == '' }} run: | - aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}-${{ env.BUILD_VERSION }}_amd64.deb + aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.TAG }}_amd64.deb From 10e88b4101cf61c56b595223dec24a894b625b08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 10:20:17 +0200 Subject: [PATCH 40/90] test --- .github/workflows/release.yaml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f92994c..90ac9bf 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,13 +2,14 @@ name: Build and Push Database Exporter on: push: - tags: - - "*.*.*-*" + branches: + - "ekw/gh-actions/release" env: UBUNTU_VERSION: '22.04' RUST_IMAGE_TAG: '1.73.0' EUR2CCD_VERSION: '0.6.1' + BUILD_VERSION: '0' S3_BUCKET: s3://eur2ccd.concordium.com permissions: @@ -20,15 +21,17 @@ jobs: runs-on: ubuntu-latest environment: release steps: - - name: Get the tag - id: get_version - run: echo TAG=${{GITHUB_REF#refs/tags/*}} >> $GITHUB_ENV - - name: Checkout Repository uses: actions/checkout@v4 with: - ref: ${{ env.TAG }} + ref: "0.6.1-0" submodules: recursive + + - name: Get the tag + id: get_version + run: echo TAG=${{GITHUB_REF#refs/tags/*}} >> $GITHUB_ENV + + - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 From d7462e43da98d468e3d39ebb4a5ca6dd3ecc2ba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 10:20:56 +0200 Subject: [PATCH 41/90] test --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 90ac9bf..f8419d6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,7 +26,7 @@ jobs: with: ref: "0.6.1-0" submodules: recursive - + - name: Get the tag id: get_version run: echo TAG=${{GITHUB_REF#refs/tags/*}} >> $GITHUB_ENV @@ -57,4 +57,4 @@ jobs: - name: Publish if: ${{ env.S3_OBJ == '' }} run: | - aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.TAG }}_amd64.deb + aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.TAG }}-test_amd64.deb From 0f0daa2094f6f7d60e67a6043e8b49d18f66ac6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 10:25:18 +0200 Subject: [PATCH 42/90] test --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f8419d6..e5af8da 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,7 +29,7 @@ jobs: - name: Get the tag id: get_version - run: echo TAG=${{GITHUB_REF#refs/tags/*}} >> $GITHUB_ENV + run: echo TAG=${{github.ref_name}} >> $GITHUB_ENV From 9bc8464fe1f44a73362b124c81f4201378d4adff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 10:33:04 +0200 Subject: [PATCH 43/90] test --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e5af8da..b164c30 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,7 +29,7 @@ jobs: - name: Get the tag id: get_version - run: echo TAG=${{github.ref_name}} >> $GITHUB_ENV + run: echo TAG=${{github.ref}} >> $GITHUB_ENV From c492302b0be5259542a060151409dda2671e97bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 10:46:55 +0200 Subject: [PATCH 44/90] test --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b164c30..faf6b64 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,7 +29,7 @@ jobs: - name: Get the tag id: get_version - run: echo TAG=${{github.ref}} >> $GITHUB_ENV + run: echo TAG=${{github.ref_name##*-}} >> $GITHUB_ENV From d2e3e718cfbba6b46917e72d2f20d0842754fb04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 10:49:15 +0200 Subject: [PATCH 45/90] test --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index faf6b64..d9f6fd0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,7 +29,7 @@ jobs: - name: Get the tag id: get_version - run: echo TAG=${{github.ref_name##*-}} >> $GITHUB_ENV + run: echo TAG=${{github.ref_name*-##}} >> $GITHUB_ENV From 0abd856b724b0b612e2c9909015fadf3a60d007a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 10:49:59 +0200 Subject: [PATCH 46/90] test --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d9f6fd0..1f99803 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,7 +29,7 @@ jobs: - name: Get the tag id: get_version - run: echo TAG=${{github.ref_name*-##}} >> $GITHUB_ENV + run: echo TAG=${{github.ref_name##ekw/}} >> $GITHUB_ENV From db34fd2bcfa335743d69771161b85cb76387ff74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 10:51:26 +0200 Subject: [PATCH 47/90] test --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1f99803..5222dd2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,7 +29,7 @@ jobs: - name: Get the tag id: get_version - run: echo TAG=${{github.ref_name##ekw/}} >> $GITHUB_ENV + run: echo ""::set-output name=fragment::${github.ref_name##ekw/}" From 3b35ac52123cbea121240edbf3fcbe01f1af212c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 10:52:17 +0200 Subject: [PATCH 48/90] test --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5222dd2..2b81673 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,7 +29,7 @@ jobs: - name: Get the tag id: get_version - run: echo ""::set-output name=fragment::${github.ref_name##ekw/}" + run: echo "::set-output name=fragment::${github.ref_name##*-}" From dd9337dd4731176e379308de693d93f71da4b1e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 11:00:57 +0200 Subject: [PATCH 49/90] test --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2b81673..1351f9a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,7 +29,7 @@ jobs: - name: Get the tag id: get_version - run: echo "::set-output name=fragment::${github.ref_name##*-}" + run: echo "::set-output name=tag::${github.ref_name#*/}" @@ -57,4 +57,4 @@ jobs: - name: Publish if: ${{ env.S3_OBJ == '' }} run: | - aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.TAG }}-test_amd64.deb + aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ steps.get_version.outputs.tag }}-test_amd64.deb From e86fde4136058e3b28f74fdfeb2301e0c927bc57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 11:02:18 +0200 Subject: [PATCH 50/90] test --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1351f9a..d58735a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,7 +29,7 @@ jobs: - name: Get the tag id: get_version - run: echo "::set-output name=tag::${github.ref_name#*/}" + run: echo "::set-output name=tag::${github.ref_name/#*/}" From 062eab667664c2739193610ad8578260942c6fb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 11:15:38 +0200 Subject: [PATCH 51/90] test --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d58735a..9ff459f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,7 +29,7 @@ jobs: - name: Get the tag id: get_version - run: echo "::set-output name=tag::${github.ref_name/#*/}" + run: echo "::set-output name=tag::${github.ref_name#*\-}" From d231d9c660c729c40728adb4f2d773d9589a9906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 11:20:22 +0200 Subject: [PATCH 52/90] test --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9ff459f..840b965 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,7 +29,7 @@ jobs: - name: Get the tag id: get_version - run: echo "::set-output name=tag::${github.ref_name#*\-}" + run: echo "::set-output name=tag::${github.ref_name/*-/\& }" From ebf47907a69cbfb9037b1d2ccf9f090bb01f9daa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 11:21:19 +0200 Subject: [PATCH 53/90] test --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 840b965..b257745 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,7 +29,7 @@ jobs: - name: Get the tag id: get_version - run: echo "::set-output name=tag::${github.ref_name/*-/\& }" + run: echo "::set-output name=tag::${github.ref_name/*\-/\& }" From 677bf16a27d404958e772cb3650d4385a2edb28f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 11:22:09 +0200 Subject: [PATCH 54/90] test --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b257745..3b9baa7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,7 +29,7 @@ jobs: - name: Get the tag id: get_version - run: echo "::set-output name=tag::${github.ref_name/*\-/\& }" + run: echo "::set-output name=tag::${github.ref_name##ekw/}" From 6b73b7947d90596292da9a929099003e516977e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 11:24:25 +0200 Subject: [PATCH 55/90] test --- .github/workflows/release.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3b9baa7..a0313a0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,7 +29,9 @@ jobs: - name: Get the tag id: get_version - run: echo "::set-output name=tag::${github.ref_name##ekw/}" + env: + BRANCH: ${{ github.ref_name }} + run: echo "::set-output name=tag::${BRANCH#ekw/}" From 9abaf75a853bca198bd6a8bcc766bb33dca22fe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 11:34:56 +0200 Subject: [PATCH 56/90] test --- .github/workflows/release.yaml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a0313a0..8d221c6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,20 +21,18 @@ jobs: runs-on: ubuntu-latest environment: release steps: + - name: Get the tag + id: get_version + env: + TAG: ${{ github.ref_name }} + run: echo "::set-output name=tag::${TAG#-*}" + - name: Checkout Repository uses: actions/checkout@v4 with: ref: "0.6.1-0" submodules: recursive - - name: Get the tag - id: get_version - env: - BRANCH: ${{ github.ref_name }} - run: echo "::set-output name=tag::${BRANCH#ekw/}" - - - - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: @@ -44,7 +42,7 @@ jobs: - name: Check built packages run: | - echo S3_OBJ=$(aws s3 ls s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.TAG }}_amd64.deb) >> $GITHUB_ENV + echo S3_OBJ=$(aws s3 ls s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ github.ref_name }}_amd64.deb) >> $GITHUB_ENV - name: Build if: ${{ env.S3_OBJ == '' }} @@ -59,4 +57,4 @@ jobs: - name: Publish if: ${{ env.S3_OBJ == '' }} run: | - aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ steps.get_version.outputs.tag }}-test_amd64.deb + aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ github.ref_name }}-test_amd64.deb From 76a3f565c2502609ec9b51ab620d431cc23acea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 11:38:21 +0200 Subject: [PATCH 57/90] test --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8d221c6..d0c1c66 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,7 +25,7 @@ jobs: id: get_version env: TAG: ${{ github.ref_name }} - run: echo "::set-output name=tag::${TAG#-*}" + run: echo "name=tag::${TAG#-*}" >> $GITHUB_ENV - name: Checkout Repository uses: actions/checkout@v4 @@ -57,4 +57,4 @@ jobs: - name: Publish if: ${{ env.S3_OBJ == '' }} run: | - aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ github.ref_name }}-test_amd64.deb + aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ steps.get_version.outputs.tag }}-test_amd64.deb From 149d9269f4ca57f4b028d655bd171b43377c172d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 11:47:38 +0200 Subject: [PATCH 58/90] test --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d0c1c66..50cac46 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -57,4 +57,4 @@ jobs: - name: Publish if: ${{ env.S3_OBJ == '' }} run: | - aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ steps.get_version.outputs.tag }}-test_amd64.deb + aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.tag }}-test_amd64.deb From a4f707dd04b8b532b97cb4912542fdcc55a9a0ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 11:57:47 +0200 Subject: [PATCH 59/90] Use double hashtags for greedy delete --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 50cac46..b458a49 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,7 +25,7 @@ jobs: id: get_version env: TAG: ${{ github.ref_name }} - run: echo "name=tag::${TAG#-*}" >> $GITHUB_ENV + run: echo "name=tag::${TAG##-*}" >> $GITHUB_ENV - name: Checkout Repository uses: actions/checkout@v4 From ba842b23db8d40a0d7da9ff2875a73d0e30ece5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 13:00:06 +0200 Subject: [PATCH 60/90] Use double hashtags for greedy delete --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b458a49..f28c238 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,7 +25,7 @@ jobs: id: get_version env: TAG: ${{ github.ref_name }} - run: echo "name=tag::${TAG##-*}" >> $GITHUB_ENV + run: echo "tag=${TAG##-*}" >> $GITHUB_ENV - name: Checkout Repository uses: actions/checkout@v4 From c3ea1260459a11cef3ce3c335f03f6cc064ce5db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 13:06:16 +0200 Subject: [PATCH 61/90] Use double hashtags for greedy delete --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f28c238..b63b584 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,7 +25,7 @@ jobs: id: get_version env: TAG: ${{ github.ref_name }} - run: echo "tag=${TAG##-*}" >> $GITHUB_ENV + run: echo "tag=${TAG#\-*}" >> $GITHUB_ENV - name: Checkout Repository uses: actions/checkout@v4 From 3c7a87356853e8500f26424f79c07f0abcf8b3fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 14:26:19 +0200 Subject: [PATCH 62/90] Use double hashtags for greedy delete --- .github/workflows/release.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b63b584..358792b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -22,10 +22,9 @@ jobs: environment: release steps: - name: Get the tag - id: get_version env: TAG: ${{ github.ref_name }} - run: echo "tag=${TAG#\-*}" >> $GITHUB_ENV + run: echo "tag=${TAG:-}" >> $GITHUB_ENV - name: Checkout Repository uses: actions/checkout@v4 From 596f2fd1b7b22d203f67de1c3662170222087b83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 14:38:48 +0200 Subject: [PATCH 63/90] Use double percentage for greedy delete --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 358792b..a5df6e2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -24,7 +24,7 @@ jobs: - name: Get the tag env: TAG: ${{ github.ref_name }} - run: echo "tag=${TAG:-}" >> $GITHUB_ENV + run: echo "tag=${TAG%%-*}" >> $GITHUB_ENV - name: Checkout Repository uses: actions/checkout@v4 From fb85546d65149881f5643fd16857c3c0c37f1414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 14:48:39 +0200 Subject: [PATCH 64/90] Use tags for releasing --- .github/workflows/release.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a5df6e2..a010538 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,14 +2,12 @@ name: Build and Push Database Exporter on: push: - branches: - - "ekw/gh-actions/release" + tags: + - "*.*.*-*" env: UBUNTU_VERSION: '22.04' RUST_IMAGE_TAG: '1.73.0' - EUR2CCD_VERSION: '0.6.1' - BUILD_VERSION: '0' S3_BUCKET: s3://eur2ccd.concordium.com permissions: @@ -21,10 +19,10 @@ jobs: runs-on: ubuntu-latest environment: release steps: - - name: Get the tag + - name: Get the eur2ccd version env: TAG: ${{ github.ref_name }} - run: echo "tag=${TAG%%-*}" >> $GITHUB_ENV + run: echo "EUR2CCD_VERSION=${TAG%%-*}" >> $GITHUB_ENV - name: Checkout Repository uses: actions/checkout@v4 @@ -56,4 +54,4 @@ jobs: - name: Publish if: ${{ env.S3_OBJ == '' }} run: | - aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ env.tag }}-test_amd64.deb + aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ github.ref_name }}-test_amd64.deb From cc59524a4d0f544926efdf1fb07e7549f836d65b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 14:49:07 +0200 Subject: [PATCH 65/90] Use tags for releasing --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a010538..16801dc 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -27,7 +27,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 with: - ref: "0.6.1-0" + ref: ${{ github.ref_name }} submodules: recursive - name: Configure AWS Credentials From d5caa98695fe20359ffc1c8a7632cbda38488315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 17 Oct 2024 14:50:05 +0200 Subject: [PATCH 66/90] Remove 'test' from artifact name --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 16801dc..56adc1b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -54,4 +54,4 @@ jobs: - name: Publish if: ${{ env.S3_OBJ == '' }} run: | - aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ github.ref_name }}-test_amd64.deb + aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ github.ref_name }}_amd64.deb From 6522759ccbcce9790e9d730e18910bda6f69582d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 21 Oct 2024 09:02:10 +0200 Subject: [PATCH 67/90] Try with failing step if binary is already in s3 --- .github/workflows/release.yaml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 56adc1b..e2d35f0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,6 +9,7 @@ env: UBUNTU_VERSION: '22.04' RUST_IMAGE_TAG: '1.73.0' S3_BUCKET: s3://eur2ccd.concordium.com + OUTFILE: "s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ github.ref_name }}_amd64.deb" permissions: id-token: write @@ -39,19 +40,22 @@ jobs: - name: Check built packages run: | - echo S3_OBJ=$(aws s3 ls s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ github.ref_name }}_amd64.deb) >> $GITHUB_ENV + totalFoundObjects=$(aws s3 ls "$OUTFILE" --summarize | grep "Total Objects: " | sed "s/[^0-9]*//g") + if [ "$totalFoundObjects" -ne "0" ]; then + echo "error: $OUTFILE already exists" + false + fi +# echo S3_OBJ=$(aws s3 ls s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ github.ref_name }}_amd64.deb) >> $GITHUB_ENV - name: Build - if: ${{ env.S3_OBJ == '' }} +# if: ${{ env.S3_OBJ == '' }} run: | - docker build -t ccd-service-builder --build-arg ubuntu_version=${{ env.UBUNTU_VERSION }} --build-arg rust_image_tag=${{ env.RUST_IMAGE_TAG }} -f scripts/debian-package/deb.Dockerfile . set -euxo pipefail + docker build -t ccd-service-builder --build-arg ubuntu_version=${{ env.UBUNTU_VERSION }} --build-arg rust_image_tag=${{ env.RUST_IMAGE_TAG }} -f scripts/debian-package/deb.Dockerfile . id=$(docker create ccd-service-builder) - docker cp $id:/build/pkg-root/ eur2ccd-deb - docker rm $id - mv eur2ccd-deb/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb . + docker cp $id:/build/pkg-root/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb . - name: Publish - if: ${{ env.S3_OBJ == '' }} +# if: ${{ env.S3_OBJ == '' }} run: | - aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ github.ref_name }}_amd64.deb + aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb ${{ OUTFILE }} From 0f352f4690fe82287a4a1f5d71067d489811834b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 21 Oct 2024 09:06:40 +0200 Subject: [PATCH 68/90] Try with failing step if binary is already in s3 --- .github/workflows/release.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e2d35f0..6315e2b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,8 +2,10 @@ name: Build and Push Database Exporter on: push: - tags: - - "*.*.*-*" + branches: + - ekw/gh-actions/release +# tags: +# - "*.*.*-*" env: UBUNTU_VERSION: '22.04' @@ -23,7 +25,7 @@ jobs: - name: Get the eur2ccd version env: TAG: ${{ github.ref_name }} - run: echo "EUR2CCD_VERSION=${TAG%%-*}" >> $GITHUB_ENV + run: echo EUR2CCD_VERSION=0.6.1#echo "EUR2CCD_VERSION=${TAG%%-*}" >> $GITHUB_ENV - name: Checkout Repository uses: actions/checkout@v4 From 130fd2e5b76d99e910cb7486c31d22f30fa751a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 21 Oct 2024 09:08:28 +0200 Subject: [PATCH 69/90] Try with failing step if binary is already in s3 --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6315e2b..625fa7f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -42,9 +42,9 @@ jobs: - name: Check built packages run: | - totalFoundObjects=$(aws s3 ls "$OUTFILE" --summarize | grep "Total Objects: " | sed "s/[^0-9]*//g") + totalFoundObjects=$(aws s3 ls "${{env.OUTFILE}}" --summarize | grep "Total Objects: " | sed "s/[^0-9]*//g") if [ "$totalFoundObjects" -ne "0" ]; then - echo "error: $OUTFILE already exists" + echo "error: ${{env.OUTFILE}} already exists" false fi # echo S3_OBJ=$(aws s3 ls s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ github.ref_name }}_amd64.deb) >> $GITHUB_ENV From a77687b6d9eb34d2366a175219dffc49371c8c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 21 Oct 2024 09:09:00 +0200 Subject: [PATCH 70/90] Try with failing step if binary is already in s3 --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 625fa7f..93dd40b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -60,4 +60,4 @@ jobs: - name: Publish # if: ${{ env.S3_OBJ == '' }} run: | - aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb ${{ OUTFILE }} + aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb ${{ env.OUTFILE }} From 9fc359a1bb1d9ed1ec1973139f13ddc7f8cf4fc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 21 Oct 2024 09:16:34 +0200 Subject: [PATCH 71/90] Try with failing step if binary is already in s3 --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 93dd40b..d2478a7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,7 +25,7 @@ jobs: - name: Get the eur2ccd version env: TAG: ${{ github.ref_name }} - run: echo EUR2CCD_VERSION=0.6.1#echo "EUR2CCD_VERSION=${TAG%%-*}" >> $GITHUB_ENV + run: echo EUR2CCD_VERSION=0.6.1 #echo "EUR2CCD_VERSION=${TAG%%-*}" >> $GITHUB_ENV - name: Checkout Repository uses: actions/checkout@v4 From 7d271a68f0c3b120239ef1778c77c1c490342145 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 21 Oct 2024 09:27:06 +0200 Subject: [PATCH 72/90] use github env --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d2478a7..1d8262a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,7 +25,7 @@ jobs: - name: Get the eur2ccd version env: TAG: ${{ github.ref_name }} - run: echo EUR2CCD_VERSION=0.6.1 #echo "EUR2CCD_VERSION=${TAG%%-*}" >> $GITHUB_ENV + run: echo EUR2CCD_VERSION=0.6.1 >> 1GITHUB_ENV #echo "EUR2CCD_VERSION=${TAG%%-*}" >> $GITHUB_ENV - name: Checkout Repository uses: actions/checkout@v4 From 3e904f4d78cbbcdb8e5f38c03b7bf75a8e6f8432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 21 Oct 2024 09:33:09 +0200 Subject: [PATCH 73/90] use github env --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1d8262a..a1c1cc8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,7 +25,7 @@ jobs: - name: Get the eur2ccd version env: TAG: ${{ github.ref_name }} - run: echo EUR2CCD_VERSION=0.6.1 >> 1GITHUB_ENV #echo "EUR2CCD_VERSION=${TAG%%-*}" >> $GITHUB_ENV + run: echo EUR2CCD_VERSION=0.6.1 >> $GITHUB_ENV #echo "EUR2CCD_VERSION=${TAG%%-*}" >> $GITHUB_ENV - name: Checkout Repository uses: actions/checkout@v4 From 04fbf73f9a48ca5ac3c563f2ef35b0443492c804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 21 Oct 2024 09:47:42 +0200 Subject: [PATCH 74/90] Test failing step --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a1c1cc8..3f3ef0e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,7 +11,7 @@ env: UBUNTU_VERSION: '22.04' RUST_IMAGE_TAG: '1.73.0' S3_BUCKET: s3://eur2ccd.concordium.com - OUTFILE: "s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ github.ref_name }}_amd64.deb" + OUTFILE: "s3://eur2ccd.concordium.com/concordium-eur2ccd_0.6.1-0_amd64.deb" permissions: id-token: write @@ -60,4 +60,4 @@ jobs: - name: Publish # if: ${{ env.S3_OBJ == '' }} run: | - aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb ${{ env.OUTFILE }} +# aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb ${{ env.OUTFILE }} From 6034640b0d8188312c4cd822632fd2d6c7279895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 21 Oct 2024 11:49:45 +0200 Subject: [PATCH 75/90] move IAM role to env vriable --- .github/workflows/release.yaml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3f3ef0e..ebc7e38 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,16 +2,15 @@ name: Build and Push Database Exporter on: push: - branches: - - ekw/gh-actions/release -# tags: -# - "*.*.*-*" + tags: + - "*.*.*-*" env: UBUNTU_VERSION: '22.04' RUST_IMAGE_TAG: '1.73.0' S3_BUCKET: s3://eur2ccd.concordium.com - OUTFILE: "s3://eur2ccd.concordium.com/concordium-eur2ccd_0.6.1-0_amd64.deb" + OUTFILE: "s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ github.ref_name }}_amd64.deb" + IAM_ROLE: "arn:aws:iam::192549843005:role/github_eur2ccd" permissions: id-token: write @@ -25,7 +24,7 @@ jobs: - name: Get the eur2ccd version env: TAG: ${{ github.ref_name }} - run: echo EUR2CCD_VERSION=0.6.1 >> $GITHUB_ENV #echo "EUR2CCD_VERSION=${TAG%%-*}" >> $GITHUB_ENV + run: echo "EUR2CCD_VERSION=${TAG%%-*}" >> $GITHUB_ENV - name: Checkout Repository uses: actions/checkout@v4 @@ -33,11 +32,11 @@ jobs: ref: ${{ github.ref_name }} submodules: recursive - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 with: aws-region: "eu-west-1" - role-to-assume: "arn:aws:iam::192549843005:role/github_eur2ccd" + role-to-assume: ${{ env.IAM_ROLE }} role-session-name: ReleaseEur2ccdSession - name: Check built packages @@ -47,10 +46,8 @@ jobs: echo "error: ${{env.OUTFILE}} already exists" false fi -# echo S3_OBJ=$(aws s3 ls s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ github.ref_name }}_amd64.deb) >> $GITHUB_ENV - name: Build -# if: ${{ env.S3_OBJ == '' }} run: | set -euxo pipefail docker build -t ccd-service-builder --build-arg ubuntu_version=${{ env.UBUNTU_VERSION }} --build-arg rust_image_tag=${{ env.RUST_IMAGE_TAG }} -f scripts/debian-package/deb.Dockerfile . @@ -58,6 +55,5 @@ jobs: docker cp $id:/build/pkg-root/concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb . - name: Publish -# if: ${{ env.S3_OBJ == '' }} run: | -# aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb ${{ env.OUTFILE }} + aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb ${{ env.OUTFILE }} From 114030bdb2bf6d2380465ae2b60141fd046e20a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 21 Oct 2024 13:23:45 +0200 Subject: [PATCH 76/90] Check version with cargo --- .github/workflows/release.yaml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ebc7e38..e94630b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -32,19 +32,29 @@ jobs: ref: ${{ github.ref_name }} submodules: recursive - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 with: aws-region: "eu-west-1" role-to-assume: ${{ env.IAM_ROLE }} role-session-name: ReleaseEur2ccdSession + + - name: Get version from cargo.toml + run: | + VERSION=$(yq .package.version Cargo.toml) + echo "::notice FULL_IMAGE_TAG=${FULL_IMAGE_TAG}" + # Make sure the image does not exist. Abort if we can retrieve any metadata. + if [ ! "${{ env.EUR2CCD_VERSION }}" = "$VERSION" ]; then + echo "::error ${{ github.ref_name }} does not match ${{ env.SERVICE_NAME }}/${VERSION}." + exit 1 + fi - - name: Check built packages + - name: Check if version exist in s3 run: | totalFoundObjects=$(aws s3 ls "${{env.OUTFILE}}" --summarize | grep "Total Objects: " | sed "s/[^0-9]*//g") if [ "$totalFoundObjects" -ne "0" ]; then echo "error: ${{env.OUTFILE}} already exists" - false + exit 1 fi - name: Build From dfec5a6c7a9f6362f085cb46b10d0057899a7e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 21 Oct 2024 13:59:17 +0200 Subject: [PATCH 77/90] Test new if statement --- .github/workflows/release.yaml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e94630b..e8798dd 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,15 +2,17 @@ name: Build and Push Database Exporter on: push: - tags: - - "*.*.*-*" + branches: + - ekw/gh-actions/release +# tags: +# - "*.*.*-*" env: UBUNTU_VERSION: '22.04' RUST_IMAGE_TAG: '1.73.0' S3_BUCKET: s3://eur2ccd.concordium.com - OUTFILE: "s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ github.ref_name }}_amd64.deb" - IAM_ROLE: "arn:aws:iam::192549843005:role/github_eur2ccd" + OUTFILE: "s3://eur2ccd.concordium.com/concordium-eur2ccd_0.6.1-0" #${{ github.ref_name }}_amd64.deb" + IAM_ROLE: "arn:aws:iam::192549843005:role/github_eur2ccd" permissions: id-token: write @@ -24,7 +26,7 @@ jobs: - name: Get the eur2ccd version env: TAG: ${{ github.ref_name }} - run: echo "EUR2CCD_VERSION=${TAG%%-*}" >> $GITHUB_ENV + run: eco EUR2CCD_VERSION="0.6.1-0" >> GITHUB_ENV #echo "EUR2CCD_VERSION=${TAG%%-*}" >> $GITHUB_ENV - name: Checkout Repository uses: actions/checkout@v4 @@ -52,8 +54,9 @@ jobs: - name: Check if version exist in s3 run: | totalFoundObjects=$(aws s3 ls "${{env.OUTFILE}}" --summarize | grep "Total Objects: " | sed "s/[^0-9]*//g") - if [ "$totalFoundObjects" -ne "0" ]; then - echo "error: ${{env.OUTFILE}} already exists" + ec=$? + if [ $ec -nq "1" ]; then + echo "error: ${{env.OUTFILE}} already exists" or you do not have access. exit 1 fi @@ -66,4 +69,4 @@ jobs: - name: Publish run: | - aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb ${{ env.OUTFILE }} +# aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb ${{ env.OUTFILE }} From 3715c1911dbabc32d309c589876ffbee6563d098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 21 Oct 2024 14:00:02 +0200 Subject: [PATCH 78/90] Typo --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e8798dd..b85646c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,7 +26,7 @@ jobs: - name: Get the eur2ccd version env: TAG: ${{ github.ref_name }} - run: eco EUR2CCD_VERSION="0.6.1-0" >> GITHUB_ENV #echo "EUR2CCD_VERSION=${TAG%%-*}" >> $GITHUB_ENV + run: echo EUR2CCD_VERSION="0.6.1-0" >> GITHUB_ENV #echo "EUR2CCD_VERSION=${TAG%%-*}" >> $GITHUB_ENV - name: Checkout Repository uses: actions/checkout@v4 From 09e5f0fe2f3888622e10b09336cf2fe2e4bca59e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 21 Oct 2024 14:03:34 +0200 Subject: [PATCH 79/90] Remove exit 1 from test --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b85646c..4dc0b27 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -48,7 +48,7 @@ jobs: # Make sure the image does not exist. Abort if we can retrieve any metadata. if [ ! "${{ env.EUR2CCD_VERSION }}" = "$VERSION" ]; then echo "::error ${{ github.ref_name }} does not match ${{ env.SERVICE_NAME }}/${VERSION}." - exit 1 +# exit 1 fi - name: Check if version exist in s3 From 596d99cab380b89efd4c7e1551adc0db274ae402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 21 Oct 2024 14:04:43 +0200 Subject: [PATCH 80/90] Remove exit 1 from test --- .github/workflows/release.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4dc0b27..5e0f4b4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -48,7 +48,6 @@ jobs: # Make sure the image does not exist. Abort if we can retrieve any metadata. if [ ! "${{ env.EUR2CCD_VERSION }}" = "$VERSION" ]; then echo "::error ${{ github.ref_name }} does not match ${{ env.SERVICE_NAME }}/${VERSION}." -# exit 1 fi - name: Check if version exist in s3 From 0111b4c3347ed2c1d546796e472b8666bf433398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 21 Oct 2024 14:16:09 +0200 Subject: [PATCH 81/90] typo --- .github/workflows/release.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5e0f4b4..3f30c28 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,7 +26,7 @@ jobs: - name: Get the eur2ccd version env: TAG: ${{ github.ref_name }} - run: echo EUR2CCD_VERSION="0.6.1-0" >> GITHUB_ENV #echo "EUR2CCD_VERSION=${TAG%%-*}" >> $GITHUB_ENV + run: echo EUR2CCD_VERSION="0.6.1" >> $GITHUB_ENV #echo "EUR2CCD_VERSION=${TAG%%-*}" >> $GITHUB_ENV - name: Checkout Repository uses: actions/checkout@v4 @@ -52,9 +52,10 @@ jobs: - name: Check if version exist in s3 run: | + set +e totalFoundObjects=$(aws s3 ls "${{env.OUTFILE}}" --summarize | grep "Total Objects: " | sed "s/[^0-9]*//g") ec=$? - if [ $ec -nq "1" ]; then + if [ $ec -ne "1" ]; then echo "error: ${{env.OUTFILE}} already exists" or you do not have access. exit 1 fi From 4cc69f8e21bcf4b05ce19708261ab39fcf35727d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 21 Oct 2024 14:19:12 +0200 Subject: [PATCH 82/90] Update object name --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3f30c28..749e195 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,7 +11,7 @@ env: UBUNTU_VERSION: '22.04' RUST_IMAGE_TAG: '1.73.0' S3_BUCKET: s3://eur2ccd.concordium.com - OUTFILE: "s3://eur2ccd.concordium.com/concordium-eur2ccd_0.6.1-0" #${{ github.ref_name }}_amd64.deb" + OUTFILE: "s3://eur2ccd.concordium.com/concordium-eur2ccd_0.6.1-0_amd64.deb" #${{ github.ref_name }}_amd64.deb" IAM_ROLE: "arn:aws:iam::192549843005:role/github_eur2ccd" permissions: From 6a1b265fb0527d6bab506066c273faf00adff43e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 21 Oct 2024 14:21:12 +0200 Subject: [PATCH 83/90] Update object name --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 749e195..4497cfe 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,7 +11,7 @@ env: UBUNTU_VERSION: '22.04' RUST_IMAGE_TAG: '1.73.0' S3_BUCKET: s3://eur2ccd.concordium.com - OUTFILE: "s3://eur2ccd.concordium.com/concordium-eur2ccd_0.6.1-0_amd64.deb" #${{ github.ref_name }}_amd64.deb" + OUTFILE: "s3://eur2ccd.concordium.com/concordium-eur2ccd_0.6.1-test_amd64.deb" #${{ github.ref_name }}_amd64.deb" IAM_ROLE: "arn:aws:iam::192549843005:role/github_eur2ccd" permissions: From 4c1e5db862c00395a16abb2a8fae0453e9cee20b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 21 Oct 2024 14:23:06 +0200 Subject: [PATCH 84/90] Update object name --- .github/workflows/release.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4497cfe..0327087 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -56,7 +56,8 @@ jobs: totalFoundObjects=$(aws s3 ls "${{env.OUTFILE}}" --summarize | grep "Total Objects: " | sed "s/[^0-9]*//g") ec=$? if [ $ec -ne "1" ]; then - echo "error: ${{env.OUTFILE}} already exists" or you do not have access. + echo "error: ${{env.OUTFILE}} already exists" + echo $ec exit 1 fi From 970038fdb2ad207d1e0c576429c27b93056bd626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 21 Oct 2024 14:24:33 +0200 Subject: [PATCH 85/90] Update object name --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0327087..8417580 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -53,7 +53,7 @@ jobs: - name: Check if version exist in s3 run: | set +e - totalFoundObjects=$(aws s3 ls "${{env.OUTFILE}}" --summarize | grep "Total Objects: " | sed "s/[^0-9]*//g") + totalFoundObjects=$(aws s3 ls "${{env.OUTFILE}}") ec=$? if [ $ec -ne "1" ]; then echo "error: ${{env.OUTFILE}} already exists" From 68755412a52a7485322f69113fa19f8140d7b3f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 21 Oct 2024 14:25:27 +0200 Subject: [PATCH 86/90] Update object name --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8417580..e453ad7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,7 +11,7 @@ env: UBUNTU_VERSION: '22.04' RUST_IMAGE_TAG: '1.73.0' S3_BUCKET: s3://eur2ccd.concordium.com - OUTFILE: "s3://eur2ccd.concordium.com/concordium-eur2ccd_0.6.1-test_amd64.deb" #${{ github.ref_name }}_amd64.deb" + OUTFILE: "s3://eur2ccd.concordium.com/concordium-eur2ccd_0.6.1-0_amd64.deb" #${{ github.ref_name }}_amd64.deb" IAM_ROLE: "arn:aws:iam::192549843005:role/github_eur2ccd" permissions: From b0b26fdab476a8edd699b962ee7506ff68e86b9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 21 Oct 2024 14:29:21 +0200 Subject: [PATCH 87/90] Use tags again --- .github/workflows/release.yaml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e453ad7..cda5fd2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,16 +2,14 @@ name: Build and Push Database Exporter on: push: - branches: - - ekw/gh-actions/release -# tags: -# - "*.*.*-*" + tags: + - "*.*.*-*" env: UBUNTU_VERSION: '22.04' RUST_IMAGE_TAG: '1.73.0' S3_BUCKET: s3://eur2ccd.concordium.com - OUTFILE: "s3://eur2ccd.concordium.com/concordium-eur2ccd_0.6.1-0_amd64.deb" #${{ github.ref_name }}_amd64.deb" + OUTFILE: "s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ github.ref_name }}_amd64.deb" IAM_ROLE: "arn:aws:iam::192549843005:role/github_eur2ccd" permissions: @@ -26,7 +24,7 @@ jobs: - name: Get the eur2ccd version env: TAG: ${{ github.ref_name }} - run: echo EUR2CCD_VERSION="0.6.1" >> $GITHUB_ENV #echo "EUR2CCD_VERSION=${TAG%%-*}" >> $GITHUB_ENV + run: echo "EUR2CCD_VERSION=${TAG%%-*}" >> $GITHUB_ENV - name: Checkout Repository uses: actions/checkout@v4 @@ -48,6 +46,7 @@ jobs: # Make sure the image does not exist. Abort if we can retrieve any metadata. if [ ! "${{ env.EUR2CCD_VERSION }}" = "$VERSION" ]; then echo "::error ${{ github.ref_name }} does not match ${{ env.SERVICE_NAME }}/${VERSION}." + exit 1 fi - name: Check if version exist in s3 @@ -56,8 +55,7 @@ jobs: totalFoundObjects=$(aws s3 ls "${{env.OUTFILE}}") ec=$? if [ $ec -ne "1" ]; then - echo "error: ${{env.OUTFILE}} already exists" - echo $ec + echo "error: ${{env.OUTFILE}} already exists or you do not have access" exit 1 fi @@ -70,4 +68,4 @@ jobs: - name: Publish run: | -# aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb ${{ env.OUTFILE }} + aws s3 cp concordium-eur2ccd_${{ env.EUR2CCD_VERSION }}_amd64.deb ${{ env.OUTFILE }} From 2059ee5c9d3216375c902a8361a1ba6a52fc519a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 22 Oct 2024 11:35:06 +0200 Subject: [PATCH 88/90] print out found objects and remove unused env var --- .github/workflows/release.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index cda5fd2..a4c850e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,7 +8,6 @@ on: env: UBUNTU_VERSION: '22.04' RUST_IMAGE_TAG: '1.73.0' - S3_BUCKET: s3://eur2ccd.concordium.com OUTFILE: "s3://eur2ccd.concordium.com/concordium-eur2ccd_${{ github.ref_name }}_amd64.deb" IAM_ROLE: "arn:aws:iam::192549843005:role/github_eur2ccd" @@ -54,8 +53,11 @@ jobs: set +e totalFoundObjects=$(aws s3 ls "${{env.OUTFILE}}") ec=$? - if [ $ec -ne "1" ]; then - echo "error: ${{env.OUTFILE}} already exists or you do not have access" + if [ $ec -eq "0" ]; then + echo $totalFoundObjects + exit 1 + elif [ $ec -eq "255"]; then + echo "error: You do not have aws access" exit 1 fi From 195de07c9fb7c6325bf6c2b11f6712844d04a2f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 22 Oct 2024 11:36:33 +0200 Subject: [PATCH 89/90] print out found objects --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a4c850e..cf72c40 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -54,6 +54,7 @@ jobs: totalFoundObjects=$(aws s3 ls "${{env.OUTFILE}}") ec=$? if [ $ec -eq "0" ]; then + echo "Following matching objects found:" echo $totalFoundObjects exit 1 elif [ $ec -eq "255"]; then From 2fa9678cc19c181237198c9a5906bb90ec110de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 22 Oct 2024 11:46:31 +0200 Subject: [PATCH 90/90] Send out ouput when exit code not equal 1 --- .github/workflows/release.yaml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index cf72c40..ae7074d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -51,15 +51,13 @@ jobs: - name: Check if version exist in s3 run: | set +e - totalFoundObjects=$(aws s3 ls "${{env.OUTFILE}}") + output=$(aws s3 ls "${{env.OUTFILE}}") ec=$? if [ $ec -eq "0" ]; then - echo "Following matching objects found:" - echo $totalFoundObjects - exit 1 - elif [ $ec -eq "255"]; then - echo "error: You do not have aws access" + echo "Objects found ${{env.OUTFILE}}" exit 1 + elif [ $ec -ne "1"]; then + echo $output fi - name: Build