From a2bafb295309392630ab376eb91e167bd0832c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 12 Nov 2024 11:07:59 +0100 Subject: [PATCH 001/210] Add release workflow --- .github/workflows/release.yaml | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 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 000000000..2eb8393f6 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,42 @@ +name: Concordium desktop wallet release + +on: + workflow_dispatch: + inputs: + service: + type: choice + description: Choose which workflow should be ran + options: + - desktop-wallet-windows + - release-desktop-wallet-linux + + push: + branches: + - ekw/SRE-1001/release-desktop-wallet + tags: + - desktop-wallet-*/* + +env: + BASE_IMAGE_VERSION: "rust-1.82_ghc-9.6.6-1" + STATIC_NODE_BINARY_IMAGE_NAME: 'static-node-binaries' + AWS_ROLE_TO_ASSUME: 'arn:aws:iam::192549843005:role/github_concordium-dektop-wallet' + S3_BUCKET: "s3://desktopwallet.concordium.com/" + ECR_REPO: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci" + +permissions: + id-token: write + contents: read + +jobs: + release-desktop-wallet-linux: + runs-on: ubuntu + container: + image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" + with: + region: "eu-west-1" + role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} + + steps: + - name: echo + run: | + node --version \ No newline at end of file From 2a4b087b5e46c0409ccccbab7a58762c627c85a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 12 Nov 2024 11:10:03 +0100 Subject: [PATCH 002/210] Test with new placement of with --- .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 2eb8393f6..08d20135f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -30,11 +30,11 @@ permissions: jobs: release-desktop-wallet-linux: runs-on: ubuntu - container: - image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" with: region: "eu-west-1" role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} + container: + image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" steps: - name: echo From 49a4b70e3c726eb74a1aea21f569c37d11aef599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 12 Nov 2024 11:12:08 +0100 Subject: [PATCH 003/210] Try using credentials --- .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 08d20135f..b94791f0c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -30,11 +30,11 @@ permissions: jobs: release-desktop-wallet-linux: runs-on: ubuntu - with: - region: "eu-west-1" - role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} container: image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" + credentials: + region: "eu-west-1" + role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} steps: - name: echo From 9c2ba9bd321f6128095b99a73d1c377e9c119006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 12 Nov 2024 11:25:29 +0100 Subject: [PATCH 004/210] Try using needs --- .github/workflows/release.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b94791f0c..6c28ca098 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -28,13 +28,22 @@ permissions: contents: read jobs: + login-aws: + environment: release + steps: + - name: login + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: "eu-west-1" + role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} + role-session-name: Releasedesktop-walletSession + release-desktop-wallet-linux: + environment: release + needs: login-aws runs-on: ubuntu container: image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" - credentials: - region: "eu-west-1" - role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} steps: - name: echo From a76b822d27250bdb4de2f58ea0bc4a5bc16ecde0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 12 Nov 2024 11:26:14 +0100 Subject: [PATCH 005/210] Try using needs --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6c28ca098..fed4a1cd7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,6 +29,7 @@ permissions: jobs: login-aws: + runs-on: ubuntu environment: release steps: - name: login From b0851fce586a9339085bdf98370b66c6eccc7b18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 12 Nov 2024 11:54:23 +0100 Subject: [PATCH 006/210] Update runs-on --- .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 fed4a1cd7..7ce9d6ca3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,7 +29,7 @@ permissions: jobs: login-aws: - runs-on: ubuntu + runs-on: ubuntu-latest environment: release steps: - name: login @@ -42,7 +42,7 @@ jobs: release-desktop-wallet-linux: environment: release needs: login-aws - runs-on: ubuntu + runs-on: ubuntu-latest container: image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" From 991990934ed628d7fa7ffe1a4429d3799bbade1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 12 Nov 2024 11:57:03 +0100 Subject: [PATCH 007/210] 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 7ce9d6ca3..95864f390 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,7 +19,7 @@ on: env: BASE_IMAGE_VERSION: "rust-1.82_ghc-9.6.6-1" STATIC_NODE_BINARY_IMAGE_NAME: 'static-node-binaries' - AWS_ROLE_TO_ASSUME: 'arn:aws:iam::192549843005:role/github_concordium-dektop-wallet' + AWS_ROLE_TO_ASSUME: "arn:aws:iam::192549843005:role/github_concordium-desktop-wallet" S3_BUCKET: "s3://desktopwallet.concordium.com/" ECR_REPO: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci" @@ -37,7 +37,7 @@ jobs: with: aws-region: "eu-west-1" role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} - role-session-name: Releasedesktop-walletSession + role-session-name: ReleaseDesktopWalletSession release-desktop-wallet-linux: environment: release From 9444e941cdc77814e79a05addc4ff06b6fe31987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 10:18:19 +0100 Subject: [PATCH 008/210] Test new login method --- .github/workflows/release.yaml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 95864f390..f296151ec 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -30,14 +30,28 @@ permissions: jobs: login-aws: runs-on: ubuntu-latest + outputs: + pass: ${{steps.export-creds.outputs.aut_creds}} environment: release steps: - - name: login + - name: aws creds uses: aws-actions/configure-aws-credentials@v4 with: aws-region: "eu-west-1" role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} role-session-name: ReleaseDesktopWalletSession + + - name: login to ecr + uses: aws-actions/amazon-ecr-login@62f4f872db3836360b72999f4b87f1ff13310f3a + with: + registry: "192549843005.dkr.ecr.eu-west-1.amazonaws.com" + + - name: Export creds + id: export-creds + run: | + auth_creds=$(cat ${{ env.CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE }} | base64 -w 0) + echo "auth_creds=$auth_creds" >> ${GITHUB_OUTPUT} + release-desktop-wallet-linux: environment: release @@ -45,6 +59,9 @@ jobs: runs-on: ubuntu-latest container: image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" + credentials: + username: "oauth2accesstoken" + password: ${{needs.login-aws.aoutputs.pass}} steps: - name: echo From a8dcbe8615d93bb54c95355fff1eca7e9c9626fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 10:36:19 +0100 Subject: [PATCH 009/210] Test new login method --- .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 f296151ec..104feaa18 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -61,7 +61,7 @@ jobs: image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" credentials: username: "oauth2accesstoken" - password: ${{needs.login-aws.aoutputs.pass}} + password: ${{needs.login-aws.outputs.pass}} steps: - name: echo From 6c5eb5d59478edf8b983c8a13b3ffacce86d5273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 10:50:19 +0100 Subject: [PATCH 010/210] Test new login method --- .github/workflows/release.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 104feaa18..16e635535 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -31,15 +31,18 @@ jobs: login-aws: runs-on: ubuntu-latest outputs: - pass: ${{steps.export-creds.outputs.aut_creds}} + access_key: ${{steps.export-creds.outputs.access_key}} + secret_key: ${{steps.export-creds.outputs.secret_key}} environment: release steps: - name: aws creds uses: aws-actions/configure-aws-credentials@v4 + id: creds with: aws-region: "eu-west-1" role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} role-session-name: ReleaseDesktopWalletSession + output-credentials: true - name: login to ecr uses: aws-actions/amazon-ecr-login@62f4f872db3836360b72999f4b87f1ff13310f3a @@ -49,8 +52,7 @@ jobs: - name: Export creds id: export-creds run: | - auth_creds=$(cat ${{ env.CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE }} | base64 -w 0) - echo "auth_creds=$auth_creds" >> ${GITHUB_OUTPUT} + echo "access_key=${{steps.creds.outputs.aws-access-key-id}} secret_key=${{steps.creds.outputs.aws-secret-access-key}}" >> ${GITHUB_OUTPUT} release-desktop-wallet-linux: @@ -60,8 +62,8 @@ jobs: container: image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" credentials: - username: "oauth2accesstoken" - password: ${{needs.login-aws.outputs.pass}} + username: ${{needs.login-aws.outputs.access_key}} + password: ${{needs.login-aws.outputs.secret_key}} steps: - name: echo From 77620d9048c54600f43cae8006b26c83d21cba80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 10:52:11 +0100 Subject: [PATCH 011/210] Test new login method --- .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 16e635535..5b7a53567 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -52,7 +52,7 @@ jobs: - name: Export creds id: export-creds run: | - echo "access_key=${{steps.creds.outputs.aws-access-key-id}} secret_key=${{steps.creds.outputs.aws-secret-access-key}}" >> ${GITHUB_OUTPUT} + echo "access_key=${{env.AWS_ACCESS_KEY}} secret_key=${{steps.creds.outputs.aws-secret-access-key}}" >> ${GITHUB_OUTPUT} release-desktop-wallet-linux: From c998e029ef7c3a87de03d18b57e45831b501e41e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 10:52:57 +0100 Subject: [PATCH 012/210] Test new login method --- .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 5b7a53567..2fa134fe4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -52,7 +52,7 @@ jobs: - name: Export creds id: export-creds run: | - echo "access_key=${{env.AWS_ACCESS_KEY}} secret_key=${{steps.creds.outputs.aws-secret-access-key}}" >> ${GITHUB_OUTPUT} + echo "access_key=${{env.AWS_ACCESS_KEY}} secret_key=${{steps.creds.outputs.aws-secret-access-key}}" release-desktop-wallet-linux: From f5ca7fd2b25d965bfc74178890c08bab3dd7b9d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 10:55:40 +0100 Subject: [PATCH 013/210] Test new login method --- .github/workflows/release.yaml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2fa134fe4..4a71433dc 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -30,9 +30,6 @@ permissions: jobs: login-aws: runs-on: ubuntu-latest - outputs: - access_key: ${{steps.export-creds.outputs.access_key}} - secret_key: ${{steps.export-creds.outputs.secret_key}} environment: release steps: - name: aws creds @@ -52,7 +49,7 @@ jobs: - name: Export creds id: export-creds run: | - echo "access_key=${{env.AWS_ACCESS_KEY}} secret_key=${{steps.creds.outputs.aws-secret-access-key}}" + echo "access_key=${{steps.creds.outputs.aws-access-key-id}} secret_key=${{steps.creds.outputs.aws-secret-access-key}}" >> $GITHUB_ENV release-desktop-wallet-linux: @@ -62,8 +59,8 @@ jobs: container: image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" credentials: - username: ${{needs.login-aws.outputs.access_key}} - password: ${{needs.login-aws.outputs.secret_key}} + username: ${{needs.login-aws.env.access_key}} + password: ${{needs.login-aws.enc.secret_key}} steps: - name: echo From 3fe9f5c6d9bdd4f5afd0539b4d555a401af97f90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 11:04:12 +0100 Subject: [PATCH 014/210] Test new login method --- .github/workflows/release.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4a71433dc..d15cee1a8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -30,6 +30,9 @@ permissions: jobs: login-aws: runs-on: ubuntu-latest + outputs: + access_key: ${{steps.export-creds.outputs.access_key}} + secret_key: ${{steps.export-creds.outputs.secret_key}} environment: release steps: - name: aws creds @@ -49,7 +52,8 @@ jobs: - name: Export creds id: export-creds run: | - echo "access_key=${{steps.creds.outputs.aws-access-key-id}} secret_key=${{steps.creds.outputs.aws-secret-access-key}}" >> $GITHUB_ENV + echo "access_key=${{steps.creds.outputs.aws-access-key-id}}" >> $GITHUB_OUTPUT + echo "secret_key=${{steps.creds.outputs.aws-secret-access-key}}" >> $GITHUB_OUTPUT release-desktop-wallet-linux: @@ -59,8 +63,8 @@ jobs: container: image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" credentials: - username: ${{needs.login-aws.env.access_key}} - password: ${{needs.login-aws.enc.secret_key}} + username: ${{needs.login-aws.outputs.access_key}} + password: ${{needs.login-aws.outputs.secret_key}} steps: - name: echo From 0e474f546f9db6bcbfd8bd3029c6cefee7c9ecdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 11:16:26 +0100 Subject: [PATCH 015/210] Test new login method --- .github/workflows/release.yaml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d15cee1a8..c758e396b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -31,8 +31,8 @@ jobs: login-aws: runs-on: ubuntu-latest outputs: - access_key: ${{steps.export-creds.outputs.access_key}} - secret_key: ${{steps.export-creds.outputs.secret_key}} + access_key: ${{ steps.export-creds.outputs.access_key }} + secret_key: ${{ steps.export-creds.outputs.secret_key }} environment: release steps: - name: aws creds @@ -43,16 +43,11 @@ jobs: role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} role-session-name: ReleaseDesktopWalletSession output-credentials: true - - - name: login to ecr - uses: aws-actions/amazon-ecr-login@62f4f872db3836360b72999f4b87f1ff13310f3a - with: - registry: "192549843005.dkr.ecr.eu-west-1.amazonaws.com" - name: Export creds id: export-creds run: | - echo "access_key=${{steps.creds.outputs.aws-access-key-id}}" >> $GITHUB_OUTPUT + echo "access_key=$(echo ${{steps.creds.outputs.aws-access-key-id}} | base64 -w0 | base64 -w0 )" >> $GITHUB_OUTPUT echo "secret_key=${{steps.creds.outputs.aws-secret-access-key}}" >> $GITHUB_OUTPUT From 97ebdb2c2deebf30731091926aca671835421fca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 11:19:13 +0100 Subject: [PATCH 016/210] Test new login method --- .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 c758e396b..f45e20f8a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -48,7 +48,7 @@ jobs: id: export-creds run: | echo "access_key=$(echo ${{steps.creds.outputs.aws-access-key-id}} | base64 -w0 | base64 -w0 )" >> $GITHUB_OUTPUT - echo "secret_key=${{steps.creds.outputs.aws-secret-access-key}}" >> $GITHUB_OUTPUT + echo "secret_key=$(echo ${{steps.creds.outputs.aws-secret-access-key}} | base64 -w0 | base64 -w0 )" >> $GITHUB_OUTPUT release-desktop-wallet-linux: From cfaf62e4f187fb34e2914cc46968edf7cf90ebc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 12:56:07 +0100 Subject: [PATCH 017/210] Test new login method --- .github/workflows/release.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f45e20f8a..1e446fc25 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -33,6 +33,8 @@ jobs: outputs: access_key: ${{ steps.export-creds.outputs.access_key }} secret_key: ${{ steps.export-creds.outputs.secret_key }} + docker_username: ${{ steps.login-ecr.outputs.docker_username_ACCOUNT_ID_dkr_ecr_eu_west_1_amazonaws_com }} + docker_password: ${{ steps.login-ecr.outputs.docker_password_ACCOUNT_ID_dkr_ecr_eu_west_1_amazonaws_com }} environment: release steps: - name: aws creds @@ -44,6 +46,12 @@ jobs: role-session-name: ReleaseDesktopWalletSession output-credentials: true + - name: Login to Amazon ECR + id: login-ecr + uses: aws-actions/amazon-ecr-login@v2 + with: + mask-password: false + - name: Export creds id: export-creds run: | @@ -58,8 +66,8 @@ jobs: container: image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" credentials: - username: ${{needs.login-aws.outputs.access_key}} - password: ${{needs.login-aws.outputs.secret_key}} + username: ${{needs.login-aws.outputs.docker_username}} + password: ${{needs.login-aws.outputs.docker_password}} steps: - name: echo From 6155ab7d71c5ac97bb4ecffb90fe6c38f6dc5dbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 13:13:42 +0100 Subject: [PATCH 018/210] Test new login method --- .github/workflows/release.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1e446fc25..1906f2b81 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -63,13 +63,16 @@ jobs: environment: release needs: login-aws runs-on: ubuntu-latest - container: - image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" - credentials: - username: ${{needs.login-aws.outputs.docker_username}} - password: ${{needs.login-aws.outputs.docker_password}} + #container: + # image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" + # credentials: + # username: ${{needs.login-aws.outputs.docker_username}} + # password: ${{needs.login-aws.outputs.docker_password}} steps: - name: echo run: | - node --version \ No newline at end of file + echo ${{needs.login-aws.outputs.docker_username}} + echo ${{needs.login-aws.outputs.docker_password}} + echo ${{needs.login-aws.outputs.access_key}} + echo ${{needs.login-aws.outputs.secret_key}} \ No newline at end of file From 41d3600d66d45e05c23ce1f5877526c494876ad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 13:17:17 +0100 Subject: [PATCH 019/210] Test new login method --- .github/workflows/release.yaml | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1906f2b81..f45e20f8a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -33,8 +33,6 @@ jobs: outputs: access_key: ${{ steps.export-creds.outputs.access_key }} secret_key: ${{ steps.export-creds.outputs.secret_key }} - docker_username: ${{ steps.login-ecr.outputs.docker_username_ACCOUNT_ID_dkr_ecr_eu_west_1_amazonaws_com }} - docker_password: ${{ steps.login-ecr.outputs.docker_password_ACCOUNT_ID_dkr_ecr_eu_west_1_amazonaws_com }} environment: release steps: - name: aws creds @@ -46,12 +44,6 @@ jobs: role-session-name: ReleaseDesktopWalletSession output-credentials: true - - name: Login to Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@v2 - with: - mask-password: false - - name: Export creds id: export-creds run: | @@ -63,16 +55,13 @@ jobs: environment: release needs: login-aws runs-on: ubuntu-latest - #container: - # image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" - # credentials: - # username: ${{needs.login-aws.outputs.docker_username}} - # password: ${{needs.login-aws.outputs.docker_password}} + container: + image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" + credentials: + username: ${{needs.login-aws.outputs.access_key}} + password: ${{needs.login-aws.outputs.secret_key}} steps: - name: echo run: | - echo ${{needs.login-aws.outputs.docker_username}} - echo ${{needs.login-aws.outputs.docker_password}} - echo ${{needs.login-aws.outputs.access_key}} - echo ${{needs.login-aws.outputs.secret_key}} \ No newline at end of file + node --version \ No newline at end of file From e63b7ad391fd1547794b95a7b9512aa6c86195cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 13:55:54 +0100 Subject: [PATCH 020/210] Test new login method --- .github/workflows/release.yaml | 44 +++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f45e20f8a..dd33844ac 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -31,8 +31,10 @@ jobs: login-aws: runs-on: ubuntu-latest outputs: - access_key: ${{ steps.export-creds.outputs.access_key }} - secret_key: ${{ steps.export-creds.outputs.secret_key }} + access_key: ${{ steps.login-ecr.outputs.docker_username_192549843005_dkr_ecr_eu_west_1_amazonaws_com }} + secret_key: ${{ steps.login-ecr.outputs.docker_password_192549843005_dkr_ecr_eu_west_1_amazonaws_com }} + #access_key: ${{ steps.export-creds.outputs.access_key }} + #secret_key: ${{ steps.export-creds.outputs.secret_key }} environment: release steps: - name: aws creds @@ -42,26 +44,36 @@ jobs: aws-region: "eu-west-1" role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} role-session-name: ReleaseDesktopWalletSession - output-credentials: true + mask-aws-account-id: false - - name: Export creds - id: export-creds - run: | - echo "access_key=$(echo ${{steps.creds.outputs.aws-access-key-id}} | base64 -w0 | base64 -w0 )" >> $GITHUB_OUTPUT - echo "secret_key=$(echo ${{steps.creds.outputs.aws-secret-access-key}} | base64 -w0 | base64 -w0 )" >> $GITHUB_OUTPUT + steps: + - name: Login to Amazon ECR + id: login-ecr + uses: aws-actions/amazon-ecr-login@v2 + with: + mask-password: false + + #- name: Export creds + # id: export-creds + # run: | + # echo "access_key=$(echo ${{steps.creds.outputs.aws-access-key-id}} | base64 -w0 | base64 -w0 )" >> $GITHUB_OUTPUT + # echo "secret_key=$(echo ${{steps.creds.outputs.aws-secret-access-key}} | base64 -w0 | base64 -w0 )" >> $GITHUB_OUTPUT release-desktop-wallet-linux: environment: release needs: login-aws runs-on: ubuntu-latest - container: - image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" - credentials: - username: ${{needs.login-aws.outputs.access_key}} - password: ${{needs.login-aws.outputs.secret_key}} + services: + internal-service: + image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" + credentials: + username: ${{needs.login-aws.outputs.access_key}} + password: ${{needs.login-aws.outputs.secret_key}} steps: - - name: echo - run: | - node --version \ No newline at end of file + - name: Login to Amazon ECR + id: login-ecr + uses: aws-actions/amazon-ecr-login@v2 + with: + mask-password: false \ No newline at end of file From ea4cc3f7095a70a47e4cfb320556c5d8f2634d73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 13:57:21 +0100 Subject: [PATCH 021/210] Test new login method --- .github/workflows/release.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index dd33844ac..955453838 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -46,7 +46,6 @@ jobs: role-session-name: ReleaseDesktopWalletSession mask-aws-account-id: false - steps: - name: Login to Amazon ECR id: login-ecr uses: aws-actions/amazon-ecr-login@v2 @@ -70,7 +69,6 @@ jobs: credentials: username: ${{needs.login-aws.outputs.access_key}} password: ${{needs.login-aws.outputs.secret_key}} - steps: - name: Login to Amazon ECR id: login-ecr From a42b9ffbbb772644311245bd2bc6e72339613b93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 13:58:26 +0100 Subject: [PATCH 022/210] Test new login method --- .github/workflows/release.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 955453838..f312ccb2d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -70,8 +70,6 @@ jobs: username: ${{needs.login-aws.outputs.access_key}} password: ${{needs.login-aws.outputs.secret_key}} steps: - - name: Login to Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@v2 - with: - mask-password: false \ No newline at end of file + - name: echo + run: | + node --version \ No newline at end of file From 2c14a27d9e3ce30c608a5ae9082e94725a68ed8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 14:00:59 +0100 Subject: [PATCH 023/210] Try without mask --- .github/workflows/release.yaml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f312ccb2d..7d9446e6d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -33,8 +33,6 @@ jobs: outputs: access_key: ${{ steps.login-ecr.outputs.docker_username_192549843005_dkr_ecr_eu_west_1_amazonaws_com }} secret_key: ${{ steps.login-ecr.outputs.docker_password_192549843005_dkr_ecr_eu_west_1_amazonaws_com }} - #access_key: ${{ steps.export-creds.outputs.access_key }} - #secret_key: ${{ steps.export-creds.outputs.secret_key }} environment: release steps: - name: aws creds @@ -50,14 +48,7 @@ jobs: id: login-ecr uses: aws-actions/amazon-ecr-login@v2 with: - mask-password: false - - #- name: Export creds - # id: export-creds - # run: | - # echo "access_key=$(echo ${{steps.creds.outputs.aws-access-key-id}} | base64 -w0 | base64 -w0 )" >> $GITHUB_OUTPUT - # echo "secret_key=$(echo ${{steps.creds.outputs.aws-secret-access-key}} | base64 -w0 | base64 -w0 )" >> $GITHUB_OUTPUT - + #mask-password: false release-desktop-wallet-linux: environment: release From 861d349849715c589c5eda211ad0433d1dcd5d4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 14:01:51 +0100 Subject: [PATCH 024/210] Try without mask --- .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 7d9446e6d..aeaba6ae7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -48,7 +48,7 @@ jobs: id: login-ecr uses: aws-actions/amazon-ecr-login@v2 with: - #mask-password: false + mask-password: true release-desktop-wallet-linux: environment: release From a9754ae86c4162fb2d3315f8e63481c83a0205ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 14:08:48 +0100 Subject: [PATCH 025/210] Try building --- .github/workflows/release.yaml | 40 +++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index aeaba6ae7..636238a70 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -48,7 +48,7 @@ jobs: id: login-ecr uses: aws-actions/amazon-ecr-login@v2 with: - mask-password: true + mask-password: false release-desktop-wallet-linux: environment: release @@ -61,6 +61,40 @@ jobs: username: ${{needs.login-aws.outputs.access_key}} password: ${{needs.login-aws.outputs.secret_key}} steps: - - name: echo + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Install dependencies and build + run: | + yarn + yarn package + + - name: publish run: | - node --version \ No newline at end of file + # Extract version number + VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) + + # Prepare filenames + if [[ $TARGET_NET = "mainnet" ]]; then + FILENAME_DEB="concordium-desktop-wallet-${VERSION}.deb" + FILENAME_RPM="concordium-desktop-wallet-${VERSION}.rpm" + FILENAME_APPIMAGE="concordium-desktop-wallet-${VERSION}.AppImage" + else + FILENAME_DEB="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.deb" + FILENAME_RPM="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.rpm" + FILENAME_APPIMAGE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.AppImage" + fi + + FILENAME_LATEST_LINUX="latest-linux.yml" + + OUT_FILENAME_DEB="${VERSION}/${TARGET_NET}/${FILENAME_DEB}" + OUT_FILENAME_RPM="${VERSION}/${TARGET_NET}/${FILENAME_RPM}" + OUT_FILENAME_APPIMAGE="${VERSION}/${TARGET_NET}/${FILENAME_APPIMAGE}" + OUT_LATEST_LINUX="${VERSION}/${TARGET_NET}/latest-linux.yml" + + # Push to s3 + aws s3 cp "release/${FILENAME_DEB}" "${{S3_BUCKET}}/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${FILENAME_RPM}" "${{S3_BUCKET}}/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${FILENAME_APPIMAGE}" "${{S3_BUCKET}}/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers \ No newline at end of file From dc17e7c8f16ed9e4b96a5cda8dd27110139be182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 14:09:23 +0100 Subject: [PATCH 026/210] Try building --- .github/workflows/release.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 636238a70..1e2291b05 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -94,7 +94,7 @@ jobs: OUT_LATEST_LINUX="${VERSION}/${TARGET_NET}/latest-linux.yml" # Push to s3 - aws s3 cp "release/${FILENAME_DEB}" "${{S3_BUCKET}}/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${FILENAME_RPM}" "${{S3_BUCKET}}/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${FILENAME_APPIMAGE}" "${{S3_BUCKET}}/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers \ No newline at end of file + aws s3 cp "release/${FILENAME_DEB}" "${{env.S3_BUCKET}}/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${FILENAME_RPM}" "${{env.S3_BUCKET}}/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers \ No newline at end of file From 60655db21ab02975100e9777e053b15d134f29f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 15:17:25 +0100 Subject: [PATCH 027/210] Show versions --- .github/workflows/release.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1e2291b05..911ff4a7c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -67,6 +67,12 @@ jobs: submodules: recursive - name: Install dependencies and build run: | + node --version + npm --version + yarn --version + python --version + rustup show + wasm-pack --version yarn yarn package From c5a0bc52f0c3543be3b0a4d948cfdc6dbce90d21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 15:21:36 +0100 Subject: [PATCH 028/210] Add ports --- .github/workflows/release.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 911ff4a7c..b95f28c49 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -60,6 +60,8 @@ jobs: credentials: username: ${{needs.login-aws.outputs.access_key}} password: ${{needs.login-aws.outputs.secret_key}} + ports: + - 80:80 steps: - name: Checkout repository uses: actions/checkout@v4 From 329700479793ad9b1a7b3e64dff39e76f42d6cf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 15:24:16 +0100 Subject: [PATCH 029/210] only show versions --- .github/workflows/release.yaml | 68 +++++++++++++++++----------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b95f28c49..dee768ab2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -63,10 +63,10 @@ jobs: ports: - 80:80 steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - submodules: recursive +# - name: Checkout repository +# uses: actions/checkout@v4 +# with: +# submodules: recursive - name: Install dependencies and build run: | node --version @@ -75,34 +75,34 @@ jobs: python --version rustup show wasm-pack --version - yarn - yarn package - - - name: publish - run: | - # Extract version number - VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) - - # Prepare filenames - if [[ $TARGET_NET = "mainnet" ]]; then - FILENAME_DEB="concordium-desktop-wallet-${VERSION}.deb" - FILENAME_RPM="concordium-desktop-wallet-${VERSION}.rpm" - FILENAME_APPIMAGE="concordium-desktop-wallet-${VERSION}.AppImage" - else - FILENAME_DEB="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.deb" - FILENAME_RPM="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.rpm" - FILENAME_APPIMAGE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.AppImage" - fi - - FILENAME_LATEST_LINUX="latest-linux.yml" +# yarn +# yarn package - OUT_FILENAME_DEB="${VERSION}/${TARGET_NET}/${FILENAME_DEB}" - OUT_FILENAME_RPM="${VERSION}/${TARGET_NET}/${FILENAME_RPM}" - OUT_FILENAME_APPIMAGE="${VERSION}/${TARGET_NET}/${FILENAME_APPIMAGE}" - OUT_LATEST_LINUX="${VERSION}/${TARGET_NET}/latest-linux.yml" - - # Push to s3 - aws s3 cp "release/${FILENAME_DEB}" "${{env.S3_BUCKET}}/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${FILENAME_RPM}" "${{env.S3_BUCKET}}/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers \ No newline at end of file +# - name: publish +# run: | +# # Extract version number +# VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) +# +# # Prepare filenames +# if [[ $TARGET_NET = "mainnet" ]]; then +# FILENAME_DEB="concordium-desktop-wallet-${VERSION}.deb" +# FILENAME_RPM="concordium-desktop-wallet-${VERSION}.rpm" +# FILENAME_APPIMAGE="concordium-desktop-wallet-${VERSION}.AppImage" +# else +# FILENAME_DEB="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.deb" +# FILENAME_RPM="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.rpm" +# FILENAME_APPIMAGE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.AppImage" +# fi +# +# FILENAME_LATEST_LINUX="latest-linux.yml" +# +# OUT_FILENAME_DEB="${VERSION}/${TARGET_NET}/${FILENAME_DEB}" +# OUT_FILENAME_RPM="${VERSION}/${TARGET_NET}/${FILENAME_RPM}" +# OUT_FILENAME_APPIMAGE="${VERSION}/${TARGET_NET}/${FILENAME_APPIMAGE}" +# OUT_LATEST_LINUX="${VERSION}/${TARGET_NET}/latest-linux.yml" +# +# # Push to s3 +# aws s3 cp "release/${FILENAME_DEB}" "${{env.S3_BUCKET}}/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers +# aws s3 cp "release/${FILENAME_RPM}" "${{env.S3_BUCKET}}/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers +# aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers +# aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers \ No newline at end of file From 568e567d3840783a8e18ffe29b4c431ae2a93e46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 15:30:10 +0100 Subject: [PATCH 030/210] Use container instead of services --- .github/workflows/release.yaml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index dee768ab2..a8a2635b0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -54,14 +54,19 @@ jobs: environment: release needs: login-aws runs-on: ubuntu-latest - services: - internal-service: - image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" - credentials: - username: ${{needs.login-aws.outputs.access_key}} - password: ${{needs.login-aws.outputs.secret_key}} - ports: - - 80:80 + container: + image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" + credentials: + username: ${{needs.login-aws.outputs.access_key}} + password: ${{needs.login-aws.outputs.secret_key}} + #services: + # internal-service: + # image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" + # credentials: + # username: ${{needs.login-aws.outputs.access_key}} + # password: ${{needs.login-aws.outputs.secret_key}} + # ports: + # - 80:80 steps: # - name: Checkout repository # uses: actions/checkout@v4 From 5c4cd697d320c86c0264c4d1e34bb26515949ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 15:32:44 +0100 Subject: [PATCH 031/210] Add steps back in --- .github/workflows/release.yaml | 68 +++++++++++++++++----------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a8a2635b0..3ddf46bca 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -68,10 +68,10 @@ jobs: # ports: # - 80:80 steps: -# - name: Checkout repository -# uses: actions/checkout@v4 -# with: -# submodules: recursive + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive - name: Install dependencies and build run: | node --version @@ -80,34 +80,34 @@ jobs: python --version rustup show wasm-pack --version -# yarn -# yarn package + yarn + yarn package + + - name: publish + run: | + # Extract version number + VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) + + # Prepare filenames + if [[ $TARGET_NET = "mainnet" ]]; then + FILENAME_DEB="concordium-desktop-wallet-${VERSION}.deb" + FILENAME_RPM="concordium-desktop-wallet-${VERSION}.rpm" + FILENAME_APPIMAGE="concordium-desktop-wallet-${VERSION}.AppImage" + else + FILENAME_DEB="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.deb" + FILENAME_RPM="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.rpm" + FILENAME_APPIMAGE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.AppImage" + fi + + FILENAME_LATEST_LINUX="latest-linux.yml" -# - name: publish -# run: | -# # Extract version number -# VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) -# -# # Prepare filenames -# if [[ $TARGET_NET = "mainnet" ]]; then -# FILENAME_DEB="concordium-desktop-wallet-${VERSION}.deb" -# FILENAME_RPM="concordium-desktop-wallet-${VERSION}.rpm" -# FILENAME_APPIMAGE="concordium-desktop-wallet-${VERSION}.AppImage" -# else -# FILENAME_DEB="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.deb" -# FILENAME_RPM="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.rpm" -# FILENAME_APPIMAGE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.AppImage" -# fi -# -# FILENAME_LATEST_LINUX="latest-linux.yml" -# -# OUT_FILENAME_DEB="${VERSION}/${TARGET_NET}/${FILENAME_DEB}" -# OUT_FILENAME_RPM="${VERSION}/${TARGET_NET}/${FILENAME_RPM}" -# OUT_FILENAME_APPIMAGE="${VERSION}/${TARGET_NET}/${FILENAME_APPIMAGE}" -# OUT_LATEST_LINUX="${VERSION}/${TARGET_NET}/latest-linux.yml" -# -# # Push to s3 -# aws s3 cp "release/${FILENAME_DEB}" "${{env.S3_BUCKET}}/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers -# aws s3 cp "release/${FILENAME_RPM}" "${{env.S3_BUCKET}}/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers -# aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers -# aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers \ No newline at end of file + OUT_FILENAME_DEB="${VERSION}/${TARGET_NET}/${FILENAME_DEB}" + OUT_FILENAME_RPM="${VERSION}/${TARGET_NET}/${FILENAME_RPM}" + OUT_FILENAME_APPIMAGE="${VERSION}/${TARGET_NET}/${FILENAME_APPIMAGE}" + OUT_LATEST_LINUX="${VERSION}/${TARGET_NET}/latest-linux.yml" + + # Push to s3 + aws s3 cp "release/${FILENAME_DEB}" "${{env.S3_BUCKET}}/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${FILENAME_RPM}" "${{env.S3_BUCKET}}/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers \ No newline at end of file From ac0926913ee6634bd348d492bedebb061059b5e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 15:48:03 +0100 Subject: [PATCH 032/210] Use version 1.7.4 --- .github/workflows/release.yaml | 57 +++++++++++++++++----------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3ddf46bca..2e1659ca5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -72,6 +72,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + ref: 'v1.7.4' - name: Install dependencies and build run: | node --version @@ -83,31 +84,31 @@ jobs: yarn yarn package - - name: publish - run: | - # Extract version number - VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) - - # Prepare filenames - if [[ $TARGET_NET = "mainnet" ]]; then - FILENAME_DEB="concordium-desktop-wallet-${VERSION}.deb" - FILENAME_RPM="concordium-desktop-wallet-${VERSION}.rpm" - FILENAME_APPIMAGE="concordium-desktop-wallet-${VERSION}.AppImage" - else - FILENAME_DEB="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.deb" - FILENAME_RPM="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.rpm" - FILENAME_APPIMAGE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.AppImage" - fi - - FILENAME_LATEST_LINUX="latest-linux.yml" - - OUT_FILENAME_DEB="${VERSION}/${TARGET_NET}/${FILENAME_DEB}" - OUT_FILENAME_RPM="${VERSION}/${TARGET_NET}/${FILENAME_RPM}" - OUT_FILENAME_APPIMAGE="${VERSION}/${TARGET_NET}/${FILENAME_APPIMAGE}" - OUT_LATEST_LINUX="${VERSION}/${TARGET_NET}/latest-linux.yml" - - # Push to s3 - aws s3 cp "release/${FILENAME_DEB}" "${{env.S3_BUCKET}}/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${FILENAME_RPM}" "${{env.S3_BUCKET}}/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers \ No newline at end of file +# - name: publish +# run: | +# # Extract version number +# VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) +# +# # Prepare filenames +# if [[ $TARGET_NET = "mainnet" ]]; then +# FILENAME_DEB="concordium-desktop-wallet-${VERSION}.deb" +# FILENAME_RPM="concordium-desktop-wallet-${VERSION}.rpm" +# FILENAME_APPIMAGE="concordium-desktop-wallet-${VERSION}.AppImage" +# else +# FILENAME_DEB="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.deb" +# FILENAME_RPM="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.rpm" +# FILENAME_APPIMAGE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.AppImage" +# fi +# +# FILENAME_LATEST_LINUX="latest-linux.yml" +# +# OUT_FILENAME_DEB="${VERSION}/${TARGET_NET}/${FILENAME_DEB}" +# OUT_FILENAME_RPM="${VERSION}/${TARGET_NET}/${FILENAME_RPM}" +# OUT_FILENAME_APPIMAGE="${VERSION}/${TARGET_NET}/${FILENAME_APPIMAGE}" +# OUT_LATEST_LINUX="${VERSION}/${TARGET_NET}/latest-linux.yml" +# +# # Push to s3 +# aws s3 cp "release/${FILENAME_DEB}" "${{env.S3_BUCKET}}/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers +# aws s3 cp "release/${FILENAME_RPM}" "${{env.S3_BUCKET}}/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers +# aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers +# aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers \ No newline at end of file From e72fd959dd98811af35237c947b6398a0c1959a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 13 Nov 2024 15:58:09 +0100 Subject: [PATCH 033/210] Set starget net --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2e1659ca5..08711c64b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -75,6 +75,7 @@ jobs: ref: 'v1.7.4' - name: Install dependencies and build run: | + TARGET_NET="stagenet" node --version npm --version yarn --version From e775c713834a40a483c2fa390bd5b640a77c1666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 14 Nov 2024 08:09:27 +0100 Subject: [PATCH 034/210] Show cargo version --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 08711c64b..7b9c7cfbe 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -82,6 +82,7 @@ jobs: python --version rustup show wasm-pack --version + cargo --version yarn yarn package From 8f12e6a7cfc6cfbec21f5683da977fd2867cef0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 14 Nov 2024 08:16:21 +0100 Subject: [PATCH 035/210] Install rust and cargo --- .github/workflows/release.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7b9c7cfbe..2a881dfaa 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -73,6 +73,9 @@ jobs: with: submodules: recursive ref: 'v1.7.4' + - name: install cargo + run: | + rustup toolchain install 1.68.2-x86_64-unknown-linux-gnu - name: Install dependencies and build run: | TARGET_NET="stagenet" From bca9e9a86b3b821b723ce66611d92db0d246e266 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 18 Nov 2024 09:56:48 +0100 Subject: [PATCH 036/210] Add default rust --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2a881dfaa..0c3be43ed 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -76,6 +76,7 @@ jobs: - name: install cargo run: | rustup toolchain install 1.68.2-x86_64-unknown-linux-gnu + rustup default 1.68.2 - name: Install dependencies and build run: | TARGET_NET="stagenet" From a9d86dfafddc3982f6d7faecaedeb9b68bc94680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 25 Nov 2024 08:41:16 +0100 Subject: [PATCH 037/210] Run container as root --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0c3be43ed..9104e6320 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -59,6 +59,7 @@ jobs: credentials: username: ${{needs.login-aws.outputs.access_key}} password: ${{needs.login-aws.outputs.secret_key}} + options: - root #services: # internal-service: # image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" From eaef883fa09b64a94810c32056b59b14b831d808 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 25 Nov 2024 08:42:05 +0100 Subject: [PATCH 038/210] Run container as root --- .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 9104e6320..034401f01 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -59,7 +59,7 @@ jobs: credentials: username: ${{needs.login-aws.outputs.access_key}} password: ${{needs.login-aws.outputs.secret_key}} - options: - root + options: -u root #services: # internal-service: # image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" From 5be474787331ecb379253c020df00f2d56a8044e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 25 Nov 2024 10:38:53 +0100 Subject: [PATCH 039/210] Export path --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 034401f01..74d2d5985 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -78,6 +78,7 @@ jobs: run: | rustup toolchain install 1.68.2-x86_64-unknown-linux-gnu rustup default 1.68.2 + export PATH=$PATH:$HOME/.cargo:§HOME/.cargo:bin - name: Install dependencies and build run: | TARGET_NET="stagenet" From 1f4baccfc924ffc84cc76c30d99d32e6a38a1200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 25 Nov 2024 11:41:34 +0100 Subject: [PATCH 040/210] Export path --- .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 74d2d5985..0bac6a16d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -76,9 +76,9 @@ jobs: ref: 'v1.7.4' - name: install cargo run: | + export PATH=$PATH:$HOME/.cargo:§HOME/.cargo:bin rustup toolchain install 1.68.2-x86_64-unknown-linux-gnu rustup default 1.68.2 - export PATH=$PATH:$HOME/.cargo:§HOME/.cargo:bin - name: Install dependencies and build run: | TARGET_NET="stagenet" From 431cd515f1ca27d1872e29003cddf8d0f9f03e97 Mon Sep 17 00:00:00 2001 From: Lasse Alm Date: Mon, 25 Nov 2024 12:51:51 +0100 Subject: [PATCH 041/210] use rust version 1.68.2 --- .github/workflows/release.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0bac6a16d..9e4903253 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -74,11 +74,10 @@ jobs: with: submodules: recursive ref: 'v1.7.4' - - name: install cargo - run: | - export PATH=$PATH:$HOME/.cargo:§HOME/.cargo:bin - rustup toolchain install 1.68.2-x86_64-unknown-linux-gnu - rustup default 1.68.2 + - name: Install Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: 1.68.2 - name: Install dependencies and build run: | TARGET_NET="stagenet" @@ -96,7 +95,7 @@ jobs: # run: | # # Extract version number # VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) -# +# # # Prepare filenames # if [[ $TARGET_NET = "mainnet" ]]; then # FILENAME_DEB="concordium-desktop-wallet-${VERSION}.deb" @@ -114,9 +113,9 @@ jobs: # OUT_FILENAME_RPM="${VERSION}/${TARGET_NET}/${FILENAME_RPM}" # OUT_FILENAME_APPIMAGE="${VERSION}/${TARGET_NET}/${FILENAME_APPIMAGE}" # OUT_LATEST_LINUX="${VERSION}/${TARGET_NET}/latest-linux.yml" -# +# # # Push to s3 # aws s3 cp "release/${FILENAME_DEB}" "${{env.S3_BUCKET}}/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers # aws s3 cp "release/${FILENAME_RPM}" "${{env.S3_BUCKET}}/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers # aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers -# aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers \ No newline at end of file +# aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers From df93ae43ccbd199a32fc6cc38181dc2a675c9cf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 26 Nov 2024 14:39:33 +0100 Subject: [PATCH 042/210] Build docker image --- .github/workflows/release.yaml | 66 +++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9e4903253..95253bdac 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -28,46 +28,56 @@ permissions: contents: read jobs: - login-aws: + Build-pipeline-image: runs-on: ubuntu-latest - outputs: - access_key: ${{ steps.login-ecr.outputs.docker_username_192549843005_dkr_ecr_eu_west_1_amazonaws_com }} - secret_key: ${{ steps.login-ecr.outputs.docker_password_192549843005_dkr_ecr_eu_west_1_amazonaws_com }} environment: release steps: - - name: aws creds - uses: aws-actions/configure-aws-credentials@v4 - id: creds + - name: build ci image + uses: docker/build-push-action@v6 with: - aws-region: "eu-west-1" - role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} - role-session-name: ReleaseDesktopWalletSession - mask-aws-account-id: false + push: false + tags: desktop-wallet-ci:latest + context: '.' + file: '' + cache-to: type=gha,mode=max + cache-from: type=gha + build-args: | + BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} + NODE_VERSION=${{ env.NODE_VERSION }} - - name: Login to Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@v2 - with: - mask-password: false + + #login-aws: + # runs-on: ubuntu-latest + # outputs: + # access_key: ${{ steps.login-ecr.outputs.docker_username_192549843005_dkr_ecr_eu_west_1_amazonaws_com }} + # secret_key: ${{ steps.login-ecr.outputs.docker_password_192549843005_dkr_ecr_eu_west_1_amazonaws_com }} + # environment: release + # steps: + # - name: aws creds + # uses: aws-actions/configure-aws-credentials@v4 + # id: creds + # with: + # aws-region: "eu-west-1" + # role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} + # role-session-name: ReleaseDesktopWalletSession + # mask-aws-account-id: false +# + # - name: Login to Amazon ECR + # id: login-ecr + # uses: aws-actions/amazon-ecr-login@v2 + # with: + # mask-password: false release-desktop-wallet-linux: environment: release needs: login-aws runs-on: ubuntu-latest container: - image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" - credentials: - username: ${{needs.login-aws.outputs.access_key}} - password: ${{needs.login-aws.outputs.secret_key}} + image: "desktop-wallet-ci:latest" + #credentials: + # username: ${{needs.login-aws.outputs.access_key}} + # password: ${{needs.login-aws.outputs.secret_key}} options: -u root - #services: - # internal-service: - # image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" - # credentials: - # username: ${{needs.login-aws.outputs.access_key}} - # password: ${{needs.login-aws.outputs.secret_key}} - # ports: - # - 80:80 steps: - name: Checkout repository uses: actions/checkout@v4 From f5b17717e77a639177a50ebafbfb6e3c99deeea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 26 Nov 2024 14:40:13 +0100 Subject: [PATCH 043/210] Build docker image --- .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 95253bdac..cdb767d7d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -70,7 +70,7 @@ jobs: release-desktop-wallet-linux: environment: release - needs: login-aws +# needs: login-aws runs-on: ubuntu-latest container: image: "desktop-wallet-ci:latest" From 2bbd1f1c820bb5369a106dea28b7718ddc142780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 26 Nov 2024 14:43:54 +0100 Subject: [PATCH 044/210] Build docker image --- .github/workflows/release.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index cdb767d7d..637563439 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,6 +18,7 @@ on: env: BASE_IMAGE_VERSION: "rust-1.82_ghc-9.6.6-1" + NODE_VERSION: "7.0.5" STATIC_NODE_BINARY_IMAGE_NAME: 'static-node-binaries' AWS_ROLE_TO_ASSUME: "arn:aws:iam::192549843005:role/github_concordium-desktop-wallet" S3_BUCKET: "s3://desktopwallet.concordium.com/" @@ -39,8 +40,8 @@ jobs: tags: desktop-wallet-ci:latest context: '.' file: '' - cache-to: type=gha,mode=max - cache-from: type=gha +# cache-to: type=gha,mode=max +# cache-from: type=gha build-args: | BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} @@ -70,7 +71,7 @@ jobs: release-desktop-wallet-linux: environment: release -# needs: login-aws + needs: runs-on: ubuntu-latest container: image: "desktop-wallet-ci:latest" From 7629853ba7c4604d950777b3e70f18f5a64e7fcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 26 Nov 2024 14:44:29 +0100 Subject: [PATCH 045/210] Build docker image --- .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 637563439..528812762 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -71,7 +71,7 @@ jobs: release-desktop-wallet-linux: environment: release - needs: + needs: Build-pipeline-image runs-on: ubuntu-latest container: image: "desktop-wallet-ci:latest" From 420b21c9b823ba2fe311f9f7d923a67c78228b2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 26 Nov 2024 14:55:13 +0100 Subject: [PATCH 046/210] Add dockerfile --- .github/workflows/release.yaml | 2 +- scripts/desktop-wallet-ci.Dockerfile | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 scripts/desktop-wallet-ci.Dockerfile diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 528812762..75238300d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,7 +18,7 @@ on: env: BASE_IMAGE_VERSION: "rust-1.82_ghc-9.6.6-1" - NODE_VERSION: "7.0.5" + NODE_VERSION: "16.20.2" STATIC_NODE_BINARY_IMAGE_NAME: 'static-node-binaries' AWS_ROLE_TO_ASSUME: "arn:aws:iam::192549843005:role/github_concordium-desktop-wallet" S3_BUCKET: "s3://desktopwallet.concordium.com/" diff --git a/scripts/desktop-wallet-ci.Dockerfile b/scripts/desktop-wallet-ci.Dockerfile new file mode 100644 index 000000000..0d5971beb --- /dev/null +++ b/scripts/desktop-wallet-ci.Dockerfile @@ -0,0 +1,25 @@ +# Installed dependencies: +# - libudev-dev +# - libusb-1.0-0-dev +# - wasm-pack +# - yarn +# - node:${NODE_VERSION} + +ARG BASE_VERSION +FROM concordium/base:${BASE_VERSION} + +RUN apt-get update && apt-get install -y \ + libudev-dev \ + libusb-1.0-0-dev \ + rpm + +RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh + +# Default value is set in Jenkinsfile +ARG NODE_VERSION +RUN . $NVM_DIR/nvm.sh \ + && nvm install ${NODE_VERSION} \ + && npm install --global yarn \ + && nvm use ${NODE_VERSION} + +ENV PATH=$NVM_DIR/versions/node/v${NODE_VERSION}/bin:${PATH} From 5e5cdd1e0296dd7d11dc6ea1cb7f820836e13e1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 26 Nov 2024 14:56:35 +0100 Subject: [PATCH 047/210] Reference dockerfile --- .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 75238300d..262cb8eb6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -39,7 +39,7 @@ jobs: push: false tags: desktop-wallet-ci:latest context: '.' - file: '' + file: './scripts/desktop-wallet-ci.Dockerfile' # cache-to: type=gha,mode=max # cache-from: type=gha build-args: | From 167eb1cce02ca16f57272141a0251ade765384f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 26 Nov 2024 14:58:31 +0100 Subject: [PATCH 048/210] Reference dockerfile --- .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 262cb8eb6..bb9afaec0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -39,7 +39,7 @@ jobs: push: false tags: desktop-wallet-ci:latest context: '.' - file: './scripts/desktop-wallet-ci.Dockerfile' + file: 'scripts/desktop-wallet-ci.Dockerfile' # cache-to: type=gha,mode=max # cache-from: type=gha build-args: | From aa67f10551746a8e8774cba5b5ec69df3d5c1416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 26 Nov 2024 15:01:03 +0100 Subject: [PATCH 049/210] Reference dockerfile --- .github/workflows/release.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index bb9afaec0..7880410df 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -33,6 +33,13 @@ jobs: runs-on: ubuntu-latest environment: release steps: + + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + ref: 'v1.7.4' + - name: build ci image uses: docker/build-push-action@v6 with: From 6812d28abdd8c2be7b483fac687898ec64d6c189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 27 Nov 2024 08:40:34 +0100 Subject: [PATCH 050/210] Reference dockerfile --- .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 7880410df..463a739f3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -38,7 +38,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - ref: 'v1.7.4' + ref: ${{ github.ref_name }} - name: build ci image uses: docker/build-push-action@v6 From 2a76fd7756e2494a68f8c59f4beddf808253017b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 27 Nov 2024 08:46:53 +0100 Subject: [PATCH 051/210] Reference dockerfile --- .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 463a739f3..67f21559d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -44,7 +44,7 @@ jobs: uses: docker/build-push-action@v6 with: push: false - tags: desktop-wallet-ci:latest + tags: desktop-wallet-ci context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' # cache-to: type=gha,mode=max @@ -81,7 +81,7 @@ jobs: needs: Build-pipeline-image runs-on: ubuntu-latest container: - image: "desktop-wallet-ci:latest" + image: desktop-wallet-ci #credentials: # username: ${{needs.login-aws.outputs.access_key}} # password: ${{needs.login-aws.outputs.secret_key}} From 86292bc484fb4d809bc03c633c4145a6797005d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 27 Nov 2024 08:50:46 +0100 Subject: [PATCH 052/210] Use localhost as repository --- .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 67f21559d..6296b84ac 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -44,7 +44,7 @@ jobs: uses: docker/build-push-action@v6 with: push: false - tags: desktop-wallet-ci + tags: localhost:desktop-wallet-ci:latest context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' # cache-to: type=gha,mode=max @@ -81,7 +81,7 @@ jobs: needs: Build-pipeline-image runs-on: ubuntu-latest container: - image: desktop-wallet-ci + image: localhost:desktop-wallet-ci:latest #credentials: # username: ${{needs.login-aws.outputs.access_key}} # password: ${{needs.login-aws.outputs.secret_key}} From 4889c737338e9e50ae4df7bb82e31fcbc00abbca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 27 Nov 2024 08:52:42 +0100 Subject: [PATCH 053/210] Use localhost as repository --- .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 6296b84ac..c12a1fcda 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -44,7 +44,7 @@ jobs: uses: docker/build-push-action@v6 with: push: false - tags: localhost:desktop-wallet-ci:latest + tags: localhost/desktop-wallet-ci:latest context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' # cache-to: type=gha,mode=max @@ -81,7 +81,7 @@ jobs: needs: Build-pipeline-image runs-on: ubuntu-latest container: - image: localhost:desktop-wallet-ci:latest + image: localhost/desktop-wallet-ci:latest #credentials: # username: ${{needs.login-aws.outputs.access_key}} # password: ${{needs.login-aws.outputs.secret_key}} From bee34018c6665a1c37957cf7d5b878ef01c71a7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 27 Nov 2024 08:54:49 +0100 Subject: [PATCH 054/210] Use localhost as repository --- .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 c12a1fcda..14b3a38f5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -44,7 +44,7 @@ jobs: uses: docker/build-push-action@v6 with: push: false - tags: localhost/desktop-wallet-ci:latest + tags: localhost:5000/desktop-wallet-ci:latest context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' # cache-to: type=gha,mode=max @@ -81,7 +81,7 @@ jobs: needs: Build-pipeline-image runs-on: ubuntu-latest container: - image: localhost/desktop-wallet-ci:latest + image: localhost:5000/desktop-wallet-ci:latest #credentials: # username: ${{needs.login-aws.outputs.access_key}} # password: ${{needs.login-aws.outputs.secret_key}} From 399fdb437adc59491ac395cc69600d0d53b96269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 27 Nov 2024 09:26:28 +0100 Subject: [PATCH 055/210] Build image --- .github/workflows/release.yaml | 54 +++++++++++++++++----------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 14b3a38f5..3d0a40af2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,6 +29,28 @@ permissions: contents: read jobs: + login-aws: + runs-on: ubuntu-latest + outputs: + access_key: ${{ steps.login-ecr.outputs.docker_username_192549843005_dkr_ecr_eu_west_1_amazonaws_com }} + secret_key: ${{ steps.login-ecr.outputs.docker_password_192549843005_dkr_ecr_eu_west_1_amazonaws_com }} + environment: release + steps: + - name: aws creds + uses: aws-actions/configure-aws-credentials@v4 + id: creds + with: + aws-region: "eu-west-1" + role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} + role-session-name: ReleaseDesktopWalletSession + mask-aws-account-id: false + + - name: Login to Amazon ECR + id: login-ecr + uses: aws-actions/amazon-ecr-login@v2 + with: + mask-password: false + Build-pipeline-image: runs-on: ubuntu-latest environment: release @@ -43,45 +65,23 @@ jobs: - name: build ci image uses: docker/build-push-action@v6 with: - push: false - tags: localhost:5000/desktop-wallet-ci:latest + push: true + tags: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:test" context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' # cache-to: type=gha,mode=max # cache-from: type=gha + outputs: type=docker,dest=/tmp/myimage.tar build-args: | BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} - - #login-aws: - # runs-on: ubuntu-latest - # outputs: - # access_key: ${{ steps.login-ecr.outputs.docker_username_192549843005_dkr_ecr_eu_west_1_amazonaws_com }} - # secret_key: ${{ steps.login-ecr.outputs.docker_password_192549843005_dkr_ecr_eu_west_1_amazonaws_com }} - # environment: release - # steps: - # - name: aws creds - # uses: aws-actions/configure-aws-credentials@v4 - # id: creds - # with: - # aws-region: "eu-west-1" - # role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} - # role-session-name: ReleaseDesktopWalletSession - # mask-aws-account-id: false -# - # - name: Login to Amazon ECR - # id: login-ecr - # uses: aws-actions/amazon-ecr-login@v2 - # with: - # mask-password: false - release-desktop-wallet-linux: environment: release needs: Build-pipeline-image runs-on: ubuntu-latest container: - image: localhost:5000/desktop-wallet-ci:latest + image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:test" #credentials: # username: ${{needs.login-aws.outputs.access_key}} # password: ${{needs.login-aws.outputs.secret_key}} @@ -91,7 +91,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - ref: 'v1.7.4' + ref: ${{ github.ref_name }} - name: Install Rust uses: actions-rust-lang/setup-rust-toolchain@v1 with: From 34f0d8bd6aaa166c33ca97fc15efe61e616521cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 27 Nov 2024 09:29:00 +0100 Subject: [PATCH 056/210] Merge jobs --- .github/workflows/release.yaml | 44 ++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3d0a40af2..d6590133c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -50,12 +50,7 @@ jobs: uses: aws-actions/amazon-ecr-login@v2 with: mask-password: false - - Build-pipeline-image: - runs-on: ubuntu-latest - environment: release - steps: - + - name: Checkout repository uses: actions/checkout@v4 with: @@ -69,22 +64,47 @@ jobs: tags: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:test" context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' -# cache-to: type=gha,mode=max -# cache-from: type=gha + # cache-to: type=gha,mode=max + # cache-from: type=gha outputs: type=docker,dest=/tmp/myimage.tar build-args: | BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} +# Build-pipeline-image: +# runs-on: ubuntu-latest +# environment: release +# steps: +# +# - name: Checkout repository +# uses: actions/checkout@v4 +# with: +# submodules: recursive +# ref: ${{ github.ref_name }} +# +# - name: build ci image +# uses: docker/build-push-action@v6 +# with: +# push: true +# tags: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:test" +# context: '.' +# file: 'scripts/desktop-wallet-ci.Dockerfile' +## cache-to: type=gha,mode=max +## cache-from: type=gha +# outputs: type=docker,dest=/tmp/myimage.tar +# build-args: | +# BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} +# NODE_VERSION=${{ env.NODE_VERSION }} + release-desktop-wallet-linux: environment: release - needs: Build-pipeline-image + needs: login-aws runs-on: ubuntu-latest container: image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:test" - #credentials: - # username: ${{needs.login-aws.outputs.access_key}} - # password: ${{needs.login-aws.outputs.secret_key}} + credentials: + username: ${{needs.login-aws.outputs.access_key}} + password: ${{needs.login-aws.outputs.secret_key}} options: -u root steps: - name: Checkout repository From 9a45dad48b3dd794587f9189b3417bdd760ca8f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 27 Nov 2024 09:30:41 +0100 Subject: [PATCH 057/210] Remove outputs --- .github/workflows/release.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d6590133c..e0e84b63c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -66,7 +66,6 @@ jobs: file: 'scripts/desktop-wallet-ci.Dockerfile' # cache-to: type=gha,mode=max # cache-from: type=gha - outputs: type=docker,dest=/tmp/myimage.tar build-args: | BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} From 034fe661fd15adf014356b07d793fca1c6618c64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 27 Nov 2024 09:37:33 +0100 Subject: [PATCH 058/210] Try another base image --- .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 e0e84b63c..5321506fd 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,7 +17,7 @@ on: - desktop-wallet-*/* env: - BASE_IMAGE_VERSION: "rust-1.82_ghc-9.6.6-1" + BASE_IMAGE_VERSION: "rust-1.74.1_ghc-9.6.4" NODE_VERSION: "16.20.2" STATIC_NODE_BINARY_IMAGE_NAME: 'static-node-binaries' AWS_ROLE_TO_ASSUME: "arn:aws:iam::192549843005:role/github_concordium-desktop-wallet" @@ -115,6 +115,7 @@ jobs: uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: 1.68.2 + - name: Install dependencies and build run: | TARGET_NET="stagenet" From e7855772a82b6627403ce55c89791e2e9cedca1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 27 Nov 2024 09:59:31 +0100 Subject: [PATCH 059/210] Use version 1.7.4 of desktop wallet --- .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 5321506fd..b75cd5ff2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -110,7 +110,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - ref: ${{ github.ref_name }} + ref: 'v1.7.4' - name: Install Rust uses: actions-rust-lang/setup-rust-toolchain@v1 with: From 11a6bc9d8261bb6c2096dde6571b9d37c42c8590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 27 Nov 2024 10:20:37 +0100 Subject: [PATCH 060/210] use latest ci image --- .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 b75cd5ff2..c5e9f46db 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -100,7 +100,7 @@ jobs: needs: login-aws runs-on: ubuntu-latest container: - image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:test" + image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" credentials: username: ${{needs.login-aws.outputs.access_key}} password: ${{needs.login-aws.outputs.secret_key}} From 73f610f489f9e41702860f75ba0ea4a0fa13ccb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 27 Nov 2024 11:09:46 +0100 Subject: [PATCH 061/210] Try without explicitly installing rust --- .github/workflows/release.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c5e9f46db..3786bdc62 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -111,21 +111,20 @@ jobs: with: submodules: recursive ref: 'v1.7.4' - - name: Install Rust - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - toolchain: 1.68.2 + #- name: Install Rust + # uses: actions-rust-lang/setup-rust-toolchain@v1 + # with: + # toolchain: 1.68.2 - name: Install dependencies and build run: | - TARGET_NET="stagenet" node --version npm --version yarn --version python --version rustup show wasm-pack --version - cargo --version + yarn yarn package From 17753d37fadc1dcb4ded1d9bbf8d0b0d098c5ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 27 Nov 2024 11:22:32 +0100 Subject: [PATCH 062/210] default toolchain --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3786bdc62..c0ef10d02 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -118,6 +118,7 @@ jobs: - name: Install dependencies and build run: | + rustup default stable node --version npm --version yarn --version From 85ae4404d29b80b201998203fd64038ccd2d5c6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 27 Nov 2024 11:38:45 +0100 Subject: [PATCH 063/210] Use new ci image --- .github/workflows/release.yaml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c0ef10d02..450a64121 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -64,8 +64,8 @@ jobs: tags: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:test" context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' - # cache-to: type=gha,mode=max - # cache-from: type=gha + cache-to: type=gha,mode=max + cache-from: type=gha build-args: | BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} @@ -100,7 +100,7 @@ jobs: needs: login-aws runs-on: ubuntu-latest container: - image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:latest" + image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:test" credentials: username: ${{needs.login-aws.outputs.access_key}} password: ${{needs.login-aws.outputs.secret_key}} @@ -110,11 +110,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - ref: 'v1.7.4' - #- name: Install Rust - # uses: actions-rust-lang/setup-rust-toolchain@v1 - # with: - # toolchain: 1.68.2 + ref: ${{ github.ref_name }} - name: Install dependencies and build run: | From 91c71fb181b9d7bedcce438e3619ca52c895aeb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 27 Nov 2024 11:43:28 +0100 Subject: [PATCH 064/210] Remove cache --- .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 450a64121..a4fb21b58 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -64,8 +64,8 @@ jobs: tags: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:test" context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' - cache-to: type=gha,mode=max - cache-from: type=gha + #cache-to: type=gha,mode=max + #cache-from: type=gha build-args: | BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} From dfa10751811684bc00475fbc2d3375efded46f57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 27 Nov 2024 15:05:32 +0100 Subject: [PATCH 065/210] Get filenames --- .github/workflows/release.yaml | 97 ++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 47 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a4fb21b58..dde13644a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -64,37 +64,10 @@ jobs: tags: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:test" context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' - #cache-to: type=gha,mode=max - #cache-from: type=gha build-args: | BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} -# Build-pipeline-image: -# runs-on: ubuntu-latest -# environment: release -# steps: -# -# - name: Checkout repository -# uses: actions/checkout@v4 -# with: -# submodules: recursive -# ref: ${{ github.ref_name }} -# -# - name: build ci image -# uses: docker/build-push-action@v6 -# with: -# push: true -# tags: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:test" -# context: '.' -# file: 'scripts/desktop-wallet-ci.Dockerfile' -## cache-to: type=gha,mode=max -## cache-from: type=gha -# outputs: type=docker,dest=/tmp/myimage.tar -# build-args: | -# BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} -# NODE_VERSION=${{ env.NODE_VERSION }} - release-desktop-wallet-linux: environment: release needs: login-aws @@ -125,31 +98,61 @@ jobs: yarn yarn package -# - name: publish + - name: publish + run: | + # Extract version number + VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) + + # Prepare filenames + if [[ $TARGET_NET = "mainnet" ]]; then + FILENAME_DEB="concordium-desktop-wallet-${VERSION}.deb" + FILENAME_RPM="concordium-desktop-wallet-${VERSION}.rpm" + FILENAME_APPIMAGE="concordium-desktop-wallet-${VERSION}.AppImage" + else + FILENAME_DEB="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.deb" + FILENAME_RPM="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.rpm" + FILENAME_APPIMAGE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.AppImage" + fi + + FILENAME_LATEST_LINUX="latest-linux.yml" + + OUT_FILENAME_DEB="${VERSION}/${TARGET_NET}/${FILENAME_DEB}" + OUT_FILENAME_RPM="${VERSION}/${TARGET_NET}/${FILENAME_RPM}" + OUT_FILENAME_APPIMAGE="${VERSION}/${TARGET_NET}/${FILENAME_APPIMAGE}" + OUT_LATEST_LINUX="${VERSION}/${TARGET_NET}/latest-linux.yml" + + # Push to s3 + echo ${FILENAME_DEB} + echo ${FILENAME_RPM} + echo ${FILENAME_APPIMAGE} + echo ${FILENAME_LATEST_LINUX} +# aws s3 cp "release/${FILENAME_DEB}" "${{env.S3_BUCKET}}/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers +# aws s3 cp "release/${FILENAME_RPM}" "${{env.S3_BUCKET}}/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers +# aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers +# aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + +# release-desktop-wallet-windows: +# runs-on: windows-latest +# steps: +# - name: setup # run: | # # Extract version number # VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) # -# # Prepare filenames # if [[ $TARGET_NET = "mainnet" ]]; then -# FILENAME_DEB="concordium-desktop-wallet-${VERSION}.deb" -# FILENAME_RPM="concordium-desktop-wallet-${VERSION}.rpm" -# FILENAME_APPIMAGE="concordium-desktop-wallet-${VERSION}.AppImage" +# FILENAME_EXE="concordium-desktop-wallet-${VERSION}.exe" # else -# FILENAME_DEB="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.deb" -# FILENAME_RPM="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.rpm" -# FILENAME_APPIMAGE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.AppImage" +# FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" # fi +# +# OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" # -# FILENAME_LATEST_LINUX="latest-linux.yml" -# -# OUT_FILENAME_DEB="${VERSION}/${TARGET_NET}/${FILENAME_DEB}" -# OUT_FILENAME_RPM="${VERSION}/${TARGET_NET}/${FILENAME_RPM}" -# OUT_FILENAME_APPIMAGE="${VERSION}/${TARGET_NET}/${FILENAME_APPIMAGE}" -# OUT_LATEST_LINUX="${VERSION}/${TARGET_NET}/latest-linux.yml" -# -# # Push to s3 -# aws s3 cp "release/${FILENAME_DEB}" "${{env.S3_BUCKET}}/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers -# aws s3 cp "release/${FILENAME_RPM}" "${{env.S3_BUCKET}}/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers -# aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers -# aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers +# check_uniqueness() { +# # Fail if file already exists +# totalFoundObjects=$(aws s3 ls "${S3_BUCKET}/$1" --summarize | grep "Total Objects: " | sed 's/[^0-9]*//g') +# if [ "$totalFoundObjects" -ne "0" ]; then +# echo "${S3_BUCKET}/$1 already exists" +# false +# fi +# } + \ No newline at end of file From 7eecb305382c039e69c49463b526e7a97fe8adaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 08:54:40 +0100 Subject: [PATCH 066/210] Check if image already exist --- .github/workflows/release.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index dde13644a..1809579a9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,6 +18,7 @@ on: env: BASE_IMAGE_VERSION: "rust-1.74.1_ghc-9.6.4" + TARGET_NET: "stagenet" NODE_VERSION: "16.20.2" STATIC_NODE_BINARY_IMAGE_NAME: 'static-node-binaries' AWS_ROLE_TO_ASSUME: "arn:aws:iam::192549843005:role/github_concordium-desktop-wallet" @@ -51,13 +52,21 @@ jobs: with: mask-password: false + - name: Check if image exist + run: | + aws s3 ls "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:test" + echo "EC=$?" >> $GITHUB_ENV + + - name: Checkout repository + if: ${{ env.EC }} uses: actions/checkout@v4 with: submodules: recursive ref: ${{ github.ref_name }} - name: build ci image + if: ${{ env.EC }} uses: docker/build-push-action@v6 with: push: true From f9b1d70141496f298521a8c44d4a44188c68e39d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 10:01:36 +0100 Subject: [PATCH 067/210] Test if ci image alreasdy exist --- .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 1809579a9..509276fae 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -54,19 +54,19 @@ jobs: - name: Check if image exist run: | - aws s3 ls "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:test" + aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=tess echo "EC=$?" >> $GITHUB_ENV - name: Checkout repository - if: ${{ env.EC }} + if: ${{ env.EC }} == 0 uses: actions/checkout@v4 with: submodules: recursive ref: ${{ github.ref_name }} - name: build ci image - if: ${{ env.EC }} + if: ${{ env.EC }} == 0 uses: docker/build-push-action@v6 with: push: true From dc147583f53c053bd5704ee25b852afe6514b7f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 10:02:25 +0100 Subject: [PATCH 068/210] 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 509276fae..5aaf2420a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -54,7 +54,7 @@ jobs: - name: Check if image exist run: | - aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=tess + aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=test echo "EC=$?" >> $GITHUB_ENV From f5545ca0c8915fe8dbe49b2ca0d1e32851150826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 10:03:17 +0100 Subject: [PATCH 069/210] Skip steps if image exist --- .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 5aaf2420a..442790b00 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -59,14 +59,14 @@ jobs: - name: Checkout repository - if: ${{ env.EC }} == 0 + if: ${{ env.EC }} != 0 uses: actions/checkout@v4 with: submodules: recursive ref: ${{ github.ref_name }} - name: build ci image - if: ${{ env.EC }} == 0 + if: ${{ env.EC }} != 0 uses: docker/build-push-action@v6 with: push: true From 73eadb7e4418fea46ae65bf23974a90910d27ba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 10:09:58 +0100 Subject: [PATCH 070/210] Change condition --- .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 442790b00..ee1f52dd0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -59,14 +59,14 @@ jobs: - name: Checkout repository - if: ${{ env.EC }} != 0 + if: ${{ env.EC == 254 }} uses: actions/checkout@v4 with: submodules: recursive ref: ${{ github.ref_name }} - name: build ci image - if: ${{ env.EC }} != 0 + if: ${{ env.EC == 254 }} uses: docker/build-push-action@v6 with: push: true From 790446ab297f5cb30b4c54b551da8b685e8447f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 10:26:09 +0100 Subject: [PATCH 071/210] Test windows setup --- .github/workflows/release.yaml | 151 +++++++++++++++++---------------- 1 file changed, 79 insertions(+), 72 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ee1f52dd0..be7699e23 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -77,91 +77,98 @@ jobs: BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} - release-desktop-wallet-linux: +# release-desktop-wallet-linux: +# environment: release +# needs: login-aws +# runs-on: ubuntu-latest +# container: +# image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:test" +# credentials: +# username: ${{needs.login-aws.outputs.access_key}} +# password: ${{needs.login-aws.outputs.secret_key}} +# options: -u root +# steps: +# - name: Checkout repository +# uses: actions/checkout@v4 +# with: +# submodules: recursive +# ref: ${{ github.ref_name }} +# +# - name: Install dependencies and build +# run: | +# rustup default stable +# node --version +# npm --version +# yarn --version +# python --version +# rustup show +# wasm-pack --version +# +# yarn +# yarn package +# +# - name: publish +# run: | +# # Extract version number +# VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) +# +# # Prepare filenames +# if [[ $TARGET_NET = "mainnet" ]]; then +# FILENAME_DEB="concordium-desktop-wallet-${VERSION}.deb" +# FILENAME_RPM="concordium-desktop-wallet-${VERSION}.rpm" +# FILENAME_APPIMAGE="concordium-desktop-wallet-${VERSION}.AppImage" +# else +# FILENAME_DEB="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.deb" +# FILENAME_RPM="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.rpm" +# FILENAME_APPIMAGE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.AppImage" +# fi +# +# FILENAME_LATEST_LINUX="latest-linux.yml" +# +# OUT_FILENAME_DEB="${VERSION}/${TARGET_NET}/${FILENAME_DEB}" +# OUT_FILENAME_RPM="${VERSION}/${TARGET_NET}/${FILENAME_RPM}" +# OUT_FILENAME_APPIMAGE="${VERSION}/${TARGET_NET}/${FILENAME_APPIMAGE}" +# OUT_LATEST_LINUX="${VERSION}/${TARGET_NET}/latest-linux.yml" +# +# # Push to s3 +# echo ${FILENAME_DEB} +# echo ${FILENAME_RPM} +# echo ${FILENAME_APPIMAGE} +# echo ${FILENAME_LATEST_LINUX} +# aws s3 cp "release/${FILENAME_DEB}" "${{env.S3_BUCKET}}/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers +# aws s3 cp "release/${FILENAME_RPM}" "${{env.S3_BUCKET}}/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers +# aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers +# aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + + release-desktop-wallet-windows: + runs-on: windows-latest environment: release needs: login-aws - runs-on: ubuntu-latest - container: - image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:test" - credentials: - username: ${{needs.login-aws.outputs.access_key}} - password: ${{needs.login-aws.outputs.secret_key}} - options: -u root steps: - name: Checkout repository uses: actions/checkout@v4 with: submodules: recursive ref: ${{ github.ref_name }} - - - name: Install dependencies and build - run: | - rustup default stable - node --version - npm --version - yarn --version - python --version - rustup show - wasm-pack --version - - yarn - yarn package - - - name: publish + - name: setup run: | # Extract version number VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) - # Prepare filenames if [[ $TARGET_NET = "mainnet" ]]; then - FILENAME_DEB="concordium-desktop-wallet-${VERSION}.deb" - FILENAME_RPM="concordium-desktop-wallet-${VERSION}.rpm" - FILENAME_APPIMAGE="concordium-desktop-wallet-${VERSION}.AppImage" + FILENAME_EXE="concordium-desktop-wallet-${VERSION}.exe" else - FILENAME_DEB="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.deb" - FILENAME_RPM="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.rpm" - FILENAME_APPIMAGE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.AppImage" + FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" fi - - FILENAME_LATEST_LINUX="latest-linux.yml" - - OUT_FILENAME_DEB="${VERSION}/${TARGET_NET}/${FILENAME_DEB}" - OUT_FILENAME_RPM="${VERSION}/${TARGET_NET}/${FILENAME_RPM}" - OUT_FILENAME_APPIMAGE="${VERSION}/${TARGET_NET}/${FILENAME_APPIMAGE}" - OUT_LATEST_LINUX="${VERSION}/${TARGET_NET}/latest-linux.yml" - - # Push to s3 - echo ${FILENAME_DEB} - echo ${FILENAME_RPM} - echo ${FILENAME_APPIMAGE} - echo ${FILENAME_LATEST_LINUX} -# aws s3 cp "release/${FILENAME_DEB}" "${{env.S3_BUCKET}}/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers -# aws s3 cp "release/${FILENAME_RPM}" "${{env.S3_BUCKET}}/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers -# aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers -# aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - -# release-desktop-wallet-windows: -# runs-on: windows-latest -# steps: -# - name: setup -# run: | -# # Extract version number -# VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) -# -# if [[ $TARGET_NET = "mainnet" ]]; then -# FILENAME_EXE="concordium-desktop-wallet-${VERSION}.exe" -# else -# FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" -# fi -# -# OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" -# -# check_uniqueness() { -# # Fail if file already exists -# totalFoundObjects=$(aws s3 ls "${S3_BUCKET}/$1" --summarize | grep "Total Objects: " | sed 's/[^0-9]*//g') -# if [ "$totalFoundObjects" -ne "0" ]; then -# echo "${S3_BUCKET}/$1 already exists" -# false -# fi -# } + + OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" + + check_uniqueness() { + # Fail if file already exists + totalFoundObjects=$(aws s3 ls "${{env.S3_BUCKET}}/$1" --summarize | grep "Total Objects: " | sed 's/[^0-9]*//g') + if [ "$totalFoundObjects" -ne "0" ]; then + echo "${{env.S3_BUCKET}}/$1 already exists" + false + fi + } \ No newline at end of file From 72aa5ed1383476cdb95b0152dc2e1989b9e68c63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 10:28:51 +0100 Subject: [PATCH 072/210] Use bash --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index be7699e23..53a6d214d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -151,6 +151,7 @@ jobs: submodules: recursive ref: ${{ github.ref_name }} - name: setup + shell: bash run: | # Extract version number VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) From 46064064d1a05d090e72f271879f90fbb28fbe24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 11:00:32 +0100 Subject: [PATCH 073/210] test windows build --- .github/workflows/release.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 53a6d214d..bb150c39c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -172,4 +172,22 @@ jobs: false fi } + OUT_FILENAME_LATEST_WINDOWS="${VERSION}/${TARGET_NET}/latest.yml" + + check_uniqueness "${OUT_FILENAME_EXE}" + check_uniqueness "${OUT_FILENAME_LATEST_WINDOWS}" + + # Print system info + node --version + npm --version + yarn --version + python --version + rustup show + wasm-pack --version + + # Install dependencies + yarn + + # Build + yarn package-win-no-sign \ No newline at end of file From df7f68d338cfca8cd043c1474e199834942401dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 11:06:48 +0100 Subject: [PATCH 074/210] test windows build --- .github/workflows/release.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index bb150c39c..fee64dea5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -145,6 +145,14 @@ jobs: environment: release needs: login-aws steps: + - name: aws creds + uses: aws-actions/configure-aws-credentials@v4 + id: creds + with: + aws-region: "eu-west-1" + role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} + role-session-name: ReleaseDesktopWalletSession + - name: Checkout repository uses: actions/checkout@v4 with: From bbd5afc9e29612b01cef5a7038dab8c7a7040290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 11:17:36 +0100 Subject: [PATCH 075/210] test windows build --- .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 fee64dea5..399d40f9f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -170,7 +170,7 @@ jobs: FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" fi - OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" + OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}/test" check_uniqueness() { # Fail if file already exists From 87da173663c197fd34cf09cc25e7a8d7e5759e55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 11:20:57 +0100 Subject: [PATCH 076/210] test windows build --- .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 399d40f9f..08e290850 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -182,8 +182,8 @@ jobs: } OUT_FILENAME_LATEST_WINDOWS="${VERSION}/${TARGET_NET}/latest.yml" - check_uniqueness "${OUT_FILENAME_EXE}" - check_uniqueness "${OUT_FILENAME_LATEST_WINDOWS}" + #check_uniqueness "${OUT_FILENAME_EXE}" + #check_uniqueness "${OUT_FILENAME_LATEST_WINDOWS}" # Print system info node --version From 5657253a8c2280e778af306328ff5b3f613120df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 11:25:22 +0100 Subject: [PATCH 077/210] Install wasm --- .github/workflows/release.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 08e290850..0223e4d89 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -158,6 +158,9 @@ jobs: with: submodules: recursive ref: ${{ github.ref_name }} + - name: install dependencies + uses: jetli/wasm-pack-action@c0.4.0 + - name: setup shell: bash run: | From 70c8c1d79c750ec6fccc89a7471c0b150a57b5f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 11:30:38 +0100 Subject: [PATCH 078/210] Install wasm --- .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 0223e4d89..80125f94a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -159,7 +159,7 @@ jobs: submodules: recursive ref: ${{ github.ref_name }} - name: install dependencies - uses: jetli/wasm-pack-action@c0.4.0 + uses: jetli/wasm-pack-action@v0.4.0 - name: setup shell: bash From 3ebde7ee8539893651493d603d968df1d9c24ea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 13:03:42 +0100 Subject: [PATCH 079/210] Install node --- .github/workflows/release.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 80125f94a..dab35937b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -160,6 +160,13 @@ jobs: ref: ${{ github.ref_name }} - name: install dependencies uses: jetli/wasm-pack-action@v0.4.0 + with: + version: 'v0.9.1' + + - name: install node + uses: actions/setup-node@v4 + with: + node-version: 14.16.0 - name: setup shell: bash From 46a0201d0f7a7bf58359bf73611a028da7d03c0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 13:43:47 +0100 Subject: [PATCH 080/210] Hardcode 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 dab35937b..13e3425f6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -157,7 +157,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - ref: ${{ github.ref_name }} + ref: v1..7.4 - name: install dependencies uses: jetli/wasm-pack-action@v0.4.0 with: From dd41803ce3f39ee1b5989e2994b1dd1e32a50d1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 13:45:17 +0100 Subject: [PATCH 081/210] Hardcode 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 13e3425f6..bda2fb3f1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -157,7 +157,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - ref: v1..7.4 + ref: v1.7.4 - name: install dependencies uses: jetli/wasm-pack-action@v0.4.0 with: From 6f51dfeeafdb46da0389f53172dd0f1dba41f264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 14:08:44 +0100 Subject: [PATCH 082/210] Set network timeout --- .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 bda2fb3f1..11d220c36 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -204,7 +204,7 @@ jobs: wasm-pack --version # Install dependencies - yarn + yarn --network-timeout 1000000 # Build yarn package-win-no-sign From 80313535f3e7c12242b1ceb18d4225d1332b4520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 14:30:01 +0100 Subject: [PATCH 083/210] Update node 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 11d220c36..cdfe0a048 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -166,7 +166,7 @@ jobs: - name: install node uses: actions/setup-node@v4 with: - node-version: 14.16.0 + node-version: 16.20.2 - name: setup shell: bash From 1216b42b1509edf6fe7e7a4e1aaf38ffaa9e6483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 14:41:42 +0100 Subject: [PATCH 084/210] Install python --- .github/workflows/release.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index cdfe0a048..98e7169f0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -167,6 +167,11 @@ jobs: uses: actions/setup-node@v4 with: node-version: 16.20.2 + + - name: install python + uses: actions/setup-python@v5 + with: + python-version: '2.7.18' - name: setup shell: bash From 3f9e9b288ec58897f4996b6b651ef81d6542b079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 14:48:12 +0100 Subject: [PATCH 085/210] Bump node version --- .github/workflows/release.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 98e7169f0..009e88c3a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -166,12 +166,7 @@ jobs: - name: install node uses: actions/setup-node@v4 with: - node-version: 16.20.2 - - - name: install python - uses: actions/setup-python@v5 - with: - python-version: '2.7.18' + node-version: 18.20.2 - name: setup shell: bash From e9778b4577b598149fad8d2318cadb3298cff99c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 15:02:46 +0100 Subject: [PATCH 086/210] Downgraded node 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 009e88c3a..11d220c36 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -166,7 +166,7 @@ jobs: - name: install node uses: actions/setup-node@v4 with: - node-version: 18.20.2 + node-version: 14.16.0 - name: setup shell: bash From b43e3eebbfa83503fd3659bc888ea148447e8c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 15:39:46 +0100 Subject: [PATCH 087/210] Use latest version of node --- .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 11d220c36..f912615f8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -166,7 +166,7 @@ jobs: - name: install node uses: actions/setup-node@v4 with: - node-version: 14.16.0 + node-version: 22.11.0 - name: setup shell: bash From 3d437db1f194c8db5445938b6732e1896237e716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 29 Nov 2024 09:12:46 +0100 Subject: [PATCH 088/210] Install node-gyp version 10 --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f912615f8..ca71a847b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -202,6 +202,7 @@ jobs: python --version rustup show wasm-pack --version + yarn install -g node-gyp@10.1.0 # Install dependencies yarn --network-timeout 1000000 From def7c281ded083116ae330294b9cf000eef58351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 29 Nov 2024 09:14:31 +0100 Subject: [PATCH 089/210] Install node-gyp version 10 --- .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 ca71a847b..72a162bc7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -202,7 +202,7 @@ jobs: python --version rustup show wasm-pack --version - yarn install -g node-gyp@10.1.0 + yarn global add node-gyp@10.1.0 # Install dependencies yarn --network-timeout 1000000 From a329b590b0d8c6ec03cd2be847dac2bf241d762d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 29 Nov 2024 10:06:43 +0100 Subject: [PATCH 090/210] Install node-gyp version 10 --- .github/workflows/release.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 72a162bc7..954fbe711 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -144,6 +144,10 @@ jobs: runs-on: windows-latest environment: release needs: login-aws + container: + image: dockurr/windows + env: + VERSION: "10" steps: - name: aws creds uses: aws-actions/configure-aws-credentials@v4 @@ -166,7 +170,7 @@ jobs: - name: install node uses: actions/setup-node@v4 with: - node-version: 22.11.0 + node-version: 14.16.0 - name: setup shell: bash @@ -202,7 +206,7 @@ jobs: python --version rustup show wasm-pack --version - yarn global add node-gyp@10.1.0 + yarn add node-gyp@10.1.0 # Install dependencies yarn --network-timeout 1000000 From d39dcf0e765d5f53d233da8241a240668e06c92a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 29 Nov 2024 10:28:25 +0100 Subject: [PATCH 091/210] Use msys shell --- .github/workflows/release.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 954fbe711..e7a2b84c4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -144,10 +144,6 @@ jobs: runs-on: windows-latest environment: release needs: login-aws - container: - image: dockurr/windows - env: - VERSION: "10" steps: - name: aws creds uses: aws-actions/configure-aws-credentials@v4 @@ -175,6 +171,7 @@ jobs: - name: setup shell: bash run: | + #! C:\msys64\usr\bin\bash.exe # Extract version number VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) From 0a083694f4548db97d5345d6dd507f6d1939899d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 29 Nov 2024 10:46:14 +0100 Subject: [PATCH 092/210] Use regular bash --- .github/workflows/release.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e7a2b84c4..b94cee28b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -171,7 +171,6 @@ jobs: - name: setup shell: bash run: | - #! C:\msys64\usr\bin\bash.exe # Extract version number VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) From eae551d2cf4e06220b5b3ed341fe580963b8325e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 29 Nov 2024 10:54:57 +0100 Subject: [PATCH 093/210] Don't install node-gyp 10 --- .github/workflows/release.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b94cee28b..787b4737c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -167,6 +167,11 @@ jobs: uses: actions/setup-node@v4 with: node-version: 14.16.0 + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v2 + with: + vs-version: '[16.4,16.5)' - name: setup shell: bash From 167a27af6749913fa2bd40deac2afa9284584339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 29 Nov 2024 11:00:23 +0100 Subject: [PATCH 094/210] Use windows server 2019 --- .github/workflows/release.yaml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 787b4737c..7a45d1637 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -141,7 +141,7 @@ jobs: # aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers release-desktop-wallet-windows: - runs-on: windows-latest + runs-on: windows-2019 environment: release needs: login-aws steps: @@ -167,11 +167,6 @@ jobs: uses: actions/setup-node@v4 with: node-version: 14.16.0 - - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v2 - with: - vs-version: '[16.4,16.5)' - name: setup shell: bash @@ -207,7 +202,6 @@ jobs: python --version rustup show wasm-pack --version - yarn add node-gyp@10.1.0 # Install dependencies yarn --network-timeout 1000000 From 3a988e1ce1b25947454bd1daa705c997f4706211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 29 Nov 2024 11:15:01 +0100 Subject: [PATCH 095/210] Try using check_uniqueness --- .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 7a45d1637..25297b378 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -192,8 +192,8 @@ jobs: } OUT_FILENAME_LATEST_WINDOWS="${VERSION}/${TARGET_NET}/latest.yml" - #check_uniqueness "${OUT_FILENAME_EXE}" - #check_uniqueness "${OUT_FILENAME_LATEST_WINDOWS}" + check_uniqueness "${OUT_FILENAME_EXE}" + check_uniqueness "${OUT_FILENAME_LATEST_WINDOWS}" # Print system info node --version From bbe93d8bd3a0f324e93d84515a37cf94f2d7397b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 29 Nov 2024 13:05:45 +0100 Subject: [PATCH 096/210] Check if executable exist --- .github/workflows/release.yaml | 46 ++++++++++++++++------------------ 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 25297b378..bf0605572 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -140,6 +140,7 @@ jobs: # aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers # aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + #using windows-2019 to be able to use visual studio 2019, newer versions do not support older versions of node release-desktop-wallet-windows: runs-on: windows-2019 environment: release @@ -152,6 +153,27 @@ jobs: aws-region: "eu-west-1" role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} role-session-name: ReleaseDesktopWalletSession + + - name: Check if file exists + run: | + # Extract version number + VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) + + if [[ $TARGET_NET = "mainnet" ]]; then + FILENAME_EXE="concordium-desktop-wallet-${VERSION}.exe" + else + FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" + fi + + OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}/test" + aws s3 ls ${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE + EC=$? + if [[EC -eq 254]]; then + echo "Executable already exist" + exit 1 + else + echo "OUT_OBJECT=${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE" >> $GITHUB_ENV + fi - name: Checkout repository uses: actions/checkout@v4 @@ -171,30 +193,6 @@ jobs: - name: setup shell: bash run: | - # Extract version number - VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) - - if [[ $TARGET_NET = "mainnet" ]]; then - FILENAME_EXE="concordium-desktop-wallet-${VERSION}.exe" - else - FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" - fi - - OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}/test" - - check_uniqueness() { - # Fail if file already exists - totalFoundObjects=$(aws s3 ls "${{env.S3_BUCKET}}/$1" --summarize | grep "Total Objects: " | sed 's/[^0-9]*//g') - if [ "$totalFoundObjects" -ne "0" ]; then - echo "${{env.S3_BUCKET}}/$1 already exists" - false - fi - } - OUT_FILENAME_LATEST_WINDOWS="${VERSION}/${TARGET_NET}/latest.yml" - - check_uniqueness "${OUT_FILENAME_EXE}" - check_uniqueness "${OUT_FILENAME_LATEST_WINDOWS}" - # Print system info node --version npm --version From 7a49e53f1d297dd514f45686e5481d7b8615acc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 29 Nov 2024 13:07:19 +0100 Subject: [PATCH 097/210] Change if statements --- .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 bf0605572..fc277ae78 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -159,7 +159,7 @@ jobs: # Extract version number VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) - if [[ $TARGET_NET = "mainnet" ]]; then + if [ $TARGET_NET = "mainnet" ]; then FILENAME_EXE="concordium-desktop-wallet-${VERSION}.exe" else FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" @@ -168,7 +168,7 @@ jobs: OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}/test" aws s3 ls ${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE EC=$? - if [[EC -eq 254]]; then + if [EC -eq 254]; then echo "Executable already exist" exit 1 else From 5d2ae90cec02a35784014d42fdefdeba38d63221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 29 Nov 2024 13:10:39 +0100 Subject: [PATCH 098/210] Define target net --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fc277ae78..9c8066400 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -158,6 +158,7 @@ jobs: run: | # Extract version number VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) + TARGET_NET=${{env.TARGET_NET}} if [ $TARGET_NET = "mainnet" ]; then FILENAME_EXE="concordium-desktop-wallet-${VERSION}.exe" From eea50313bb028b45bae2b8602c9206d78b55756e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 29 Nov 2024 13:14:13 +0100 Subject: [PATCH 099/210] Use bash --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9c8066400..daf72bb89 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -155,6 +155,7 @@ jobs: role-session-name: ReleaseDesktopWalletSession - name: Check if file exists + shell: bash run: | # Extract version number VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) From f0455ae36a655f1c6bd351453dd7d90a2224d847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 29 Nov 2024 13:17:23 +0100 Subject: [PATCH 100/210] Check file status later in flow --- .github/workflows/release.yaml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index daf72bb89..769259acb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -153,6 +153,21 @@ jobs: aws-region: "eu-west-1" role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} role-session-name: ReleaseDesktopWalletSession + + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + ref: v1.7.4 + - name: install dependencies + uses: jetli/wasm-pack-action@v0.4.0 + with: + version: 'v0.9.1' + + - name: install node + uses: actions/setup-node@v4 + with: + node-version: 14.16.0 - name: Check if file exists shell: bash @@ -160,7 +175,7 @@ jobs: # Extract version number VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) TARGET_NET=${{env.TARGET_NET}} - + if [ $TARGET_NET = "mainnet" ]; then FILENAME_EXE="concordium-desktop-wallet-${VERSION}.exe" else @@ -177,21 +192,6 @@ jobs: echo "OUT_OBJECT=${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE" >> $GITHUB_ENV fi - - name: Checkout repository - uses: actions/checkout@v4 - with: - submodules: recursive - ref: v1.7.4 - - name: install dependencies - uses: jetli/wasm-pack-action@v0.4.0 - with: - version: 'v0.9.1' - - - name: install node - uses: actions/setup-node@v4 - with: - node-version: 14.16.0 - - name: setup shell: bash run: | From 126a04f81c82ca42e1bc34d56e1991ffbd87e8e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 29 Nov 2024 13:20:44 +0100 Subject: [PATCH 101/210] Check file status later in flow --- .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 769259acb..92e4dbc74 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -172,6 +172,7 @@ jobs: - name: Check if file exists shell: bash run: | + set +e # Extract version number VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) TARGET_NET=${{env.TARGET_NET}} @@ -187,7 +188,7 @@ jobs: EC=$? if [EC -eq 254]; then echo "Executable already exist" - exit 1 + #exit 1 else echo "OUT_OBJECT=${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE" >> $GITHUB_ENV fi From 99ed530087ae5307cdbbea50b5fa8f80a8bae837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 2 Dec 2024 08:47:32 +0100 Subject: [PATCH 102/210] Exit when file exist --- .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 92e4dbc74..70e3b3452 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -183,12 +183,12 @@ jobs: FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" fi - OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}/test" + OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" aws s3 ls ${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE EC=$? - if [EC -eq 254]; then + if [$EC -eq 254]; then echo "Executable already exist" - #exit 1 + exit 1 else echo "OUT_OBJECT=${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE" >> $GITHUB_ENV fi From befce69443cf5948dfdd1ab2b15ec775a86608cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 2 Dec 2024 09:42:40 +0100 Subject: [PATCH 103/210] Exit when file exist --- .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 70e3b3452..68c0218fd 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -186,7 +186,7 @@ jobs: OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" aws s3 ls ${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE EC=$? - if [$EC -eq 254]; then + if [$EC -eq 0]; then echo "Executable already exist" exit 1 else From 6bd81088c9317fa3ec9cd1fbe5feecdfa41a607d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 2 Dec 2024 09:49:42 +0100 Subject: [PATCH 104/210] Use quotes --- .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 68c0218fd..1c78fbffe 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -186,7 +186,7 @@ jobs: OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" aws s3 ls ${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE EC=$? - if [$EC -eq 0]; then + if [$EC -eq "0"]; then echo "Executable already exist" exit 1 else From 742001b3a7c3938d1473496fa2636591924c54a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 2 Dec 2024 09:57:30 +0100 Subject: [PATCH 105/210] Add spaces --- .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 1c78fbffe..4f47005ba 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -186,7 +186,7 @@ jobs: OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" aws s3 ls ${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE EC=$? - if [$EC -eq "0"]; then + if [ $EC -eq "0" ]; then echo "Executable already exist" exit 1 else From e87c4bbd219b4fd4937c276e9e29e3534141c55c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 2 Dec 2024 10:13:32 +0100 Subject: [PATCH 106/210] Test with mainnet target net --- .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 4f47005ba..a39e9267b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -175,7 +175,7 @@ jobs: set +e # Extract version number VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) - TARGET_NET=${{env.TARGET_NET}} + TARGET_NET="mainnet" #{{env.TARGET_NET}} if [ $TARGET_NET = "mainnet" ]; then FILENAME_EXE="concordium-desktop-wallet-${VERSION}.exe" @@ -186,7 +186,7 @@ jobs: OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" aws s3 ls ${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE EC=$? - if [ $EC -eq "0" ]; then + if [ $EC -eq 0 ]; then echo "Executable already exist" exit 1 else From ba81a3a02426418094a6ad162c146892cb10753c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 2 Dec 2024 10:31:10 +0100 Subject: [PATCH 107/210] Try different approach --- .github/workflows/release.yaml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a39e9267b..6fd8c453b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -184,16 +184,20 @@ jobs: fi OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" - aws s3 ls ${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE + OUT_OBJECT=${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE + aws s3 ls $OUT_OBJECT EC=$? - if [ $EC -eq 0 ]; then - echo "Executable already exist" - exit 1 - else - echo "OUT_OBJECT=${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE" >> $GITHUB_ENV + echo "OUT_OBJECT=$OUT_OBJECT" >> $GITHUB_ENV + echo "ERROR_CODE=$EC" >> $GITHUB_ENV + if [ EC -eq 0 ]; then + echo "$OUT_OBJECT already exist" + elif [ $EC -ne 254 ]; then + echo "Error: $EC" fi + - name: setup + if: ${{ env.ERROR_CODE == 254 }} shell: bash run: | # Print system info From ee44a8eb92d499d13db0f52ad0d1367a36c591f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 2 Dec 2024 10:35:50 +0100 Subject: [PATCH 108/210] add dollar sign to 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 6fd8c453b..9689a871f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -189,7 +189,7 @@ jobs: EC=$? echo "OUT_OBJECT=$OUT_OBJECT" >> $GITHUB_ENV echo "ERROR_CODE=$EC" >> $GITHUB_ENV - if [ EC -eq 0 ]; then + if [ $EC -eq 0 ]; then echo "$OUT_OBJECT already exist" elif [ $EC -ne 254 ]; then echo "Error: $EC" From 6380f7e103b8f9af621d61c5e7f8cc2b98c3955c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 2 Dec 2024 10:42:51 +0100 Subject: [PATCH 109/210] debug --- .github/workflows/release.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9689a871f..093f0fe0d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -185,19 +185,21 @@ jobs: OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" OUT_OBJECT=${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE + echo $OUT_OBJECT aws s3 ls $OUT_OBJECT EC=$? - echo "OUT_OBJECT=$OUT_OBJECT" >> $GITHUB_ENV - echo "ERROR_CODE=$EC" >> $GITHUB_ENV + echo $EC if [ $EC -eq 0 ]; then - echo "$OUT_OBJECT already exist" + echo "$OUT_OBJECT already exist" elif [ $EC -ne 254 ]; then - echo "Error: $EC" + echo "Error: $EC" fi + echo "OUT_OBJECT=$OUT_OBJECT" >> $GITHUB_ENV + echo "EXIT_CODE=$EC" >> $GITHUB_ENV - name: setup - if: ${{ env.ERROR_CODE == 254 }} + if: ${{ env.EXIT_CODE == 254 }} shell: bash run: | # Print system info From a85806e36dab0473f62ed067b15f50c25c55af1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 2 Dec 2024 10:50:21 +0100 Subject: [PATCH 110/210] Remove slash after bucket 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 093f0fe0d..acb528e16 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -22,7 +22,7 @@ env: NODE_VERSION: "16.20.2" STATIC_NODE_BINARY_IMAGE_NAME: 'static-node-binaries' AWS_ROLE_TO_ASSUME: "arn:aws:iam::192549843005:role/github_concordium-desktop-wallet" - S3_BUCKET: "s3://desktopwallet.concordium.com/" + S3_BUCKET: "s3://desktopwallet.concordium.com" ECR_REPO: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci" permissions: From bbe87242dd0a7681cded91ae60ae95c9a4007058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 2 Dec 2024 11:02:46 +0100 Subject: [PATCH 111/210] Fix wrong return codes --- .github/workflows/release.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index acb528e16..b8f609bca 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -190,16 +190,16 @@ jobs: EC=$? echo $EC if [ $EC -eq 0 ]; then - echo "$OUT_OBJECT already exist" - elif [ $EC -ne 254 ]; then - echo "Error: $EC" + echo "$OUT_OBJECT already exist" + elif [ $EC -ne 1 ]; then + echo "Error: $EC" fi echo "OUT_OBJECT=$OUT_OBJECT" >> $GITHUB_ENV echo "EXIT_CODE=$EC" >> $GITHUB_ENV - name: setup - if: ${{ env.EXIT_CODE == 254 }} + if: ${{ env.EXIT_CODE == 1 }} shell: bash run: | # Print system info From c58a40efdb785bc9774d1b87a2371791dc7ebb7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 2 Dec 2024 11:50:30 +0100 Subject: [PATCH 112/210] Test push --- .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 b8f609bca..535cec289 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -174,7 +174,7 @@ jobs: run: | set +e # Extract version number - VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) + VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json)/test TARGET_NET="mainnet" #{{env.TARGET_NET}} if [ $TARGET_NET = "mainnet" ]; then @@ -182,11 +182,9 @@ jobs: else FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" fi - + OUT_YML="${VERSION}/${TARGET_NET}/latest.yml" OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" - OUT_OBJECT=${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE - echo $OUT_OBJECT - aws s3 ls $OUT_OBJECT + aws s3 ls ${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE EC=$? echo $EC if [ $EC -eq 0 ]; then @@ -194,11 +192,12 @@ jobs: elif [ $EC -ne 1 ]; then echo "Error: $EC" fi - echo "OUT_OBJECT=$OUT_OBJECT" >> $GITHUB_ENV + echo "OUT_EXE=$OUT_FILENAME_EXE" >> $GITHUB_ENV + echo "OUT_YML=$OUT_YML" >> $GITHUB_ENV echo "EXIT_CODE=$EC" >> $GITHUB_ENV - - name: setup + - name: Build and push desktop wallet if: ${{ env.EXIT_CODE == 1 }} shell: bash run: | @@ -215,4 +214,8 @@ jobs: # Build yarn package-win-no-sign + + # Push + aws s3 cp "release/${{ env.OUT_YML}}" ${{ env.S3_BUCKET }}/${{ env.OUT_YML }} + aws s3 cp "release/${{ env.OUT_EXE}}" ${{ env.S3_BUCKET }}/${{ env.OUT_EXE }} \ No newline at end of file From aab946044553b7d1384f8e7f951618338e9838fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 2 Dec 2024 12:34:29 +0100 Subject: [PATCH 113/210] try another path --- .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 535cec289..9e7aec2ef 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -216,6 +216,6 @@ jobs: yarn package-win-no-sign # Push - aws s3 cp "release/${{ env.OUT_YML}}" ${{ env.S3_BUCKET }}/${{ env.OUT_YML }} + aws s3 cp "release/latest.yml" ${{ env.S3_BUCKET }}/${{ env.OUT_YML }} aws s3 cp "release/${{ env.OUT_EXE}}" ${{ env.S3_BUCKET }}/${{ env.OUT_EXE }} \ No newline at end of file From e7fe06503f2522eaa3d09d317df9171cca9ca085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 2 Dec 2024 13:00:32 +0100 Subject: [PATCH 114/210] Change path for local exe file --- .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 9e7aec2ef..7d665e01f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -193,6 +193,7 @@ jobs: echo "Error: $EC" fi echo "OUT_EXE=$OUT_FILENAME_EXE" >> $GITHUB_ENV + echo "FILENAME_EXE=$FILENAME_EXE" >> $GITHUB_ENV echo "OUT_YML=$OUT_YML" >> $GITHUB_ENV echo "EXIT_CODE=$EC" >> $GITHUB_ENV @@ -217,5 +218,5 @@ jobs: # Push aws s3 cp "release/latest.yml" ${{ env.S3_BUCKET }}/${{ env.OUT_YML }} - aws s3 cp "release/${{ env.OUT_EXE}}" ${{ env.S3_BUCKET }}/${{ env.OUT_EXE }} + aws s3 cp "release/${{ env.FILENAME_EXE}}" ${{ env.S3_BUCKET }}/${{ env.OUT_EXE }} \ No newline at end of file From 8c2444293777f8b1b3dc2a2e208e6b81f35501a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 2 Dec 2024 13:18:25 +0100 Subject: [PATCH 115/210] Test push --- .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 7d665e01f..dea25b956 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -180,7 +180,7 @@ jobs: if [ $TARGET_NET = "mainnet" ]; then FILENAME_EXE="concordium-desktop-wallet-${VERSION}.exe" else - FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" + FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}.exe" fi OUT_YML="${VERSION}/${TARGET_NET}/latest.yml" OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" From c57521063a8b0c431f40be746d25d217ca3b8d7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 2 Dec 2024 13:37:40 +0100 Subject: [PATCH 116/210] Test push --- .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 dea25b956..535fa5162 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -178,9 +178,9 @@ jobs: TARGET_NET="mainnet" #{{env.TARGET_NET}} if [ $TARGET_NET = "mainnet" ]; then - FILENAME_EXE="concordium-desktop-wallet-${VERSION}.exe" + FILENAME_EXE="concordium-desktop-wallet.exe" else - FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}.exe" + FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" fi OUT_YML="${VERSION}/${TARGET_NET}/latest.yml" OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" From 28814d2661940513c5479905569128eb63b37649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 2 Dec 2024 13:52:28 +0100 Subject: [PATCH 117/210] Test push --- .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 535fa5162..2d4560a00 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -178,7 +178,7 @@ jobs: TARGET_NET="mainnet" #{{env.TARGET_NET}} if [ $TARGET_NET = "mainnet" ]; then - FILENAME_EXE="concordium-desktop-wallet.exe" + FILENAME_EXE="concordium-desktop-wallet-1.7.4.exe" else FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" fi From c67654b018da7540a3cf01aeabc61b1f4fb6169f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 2 Dec 2024 14:19:39 +0100 Subject: [PATCH 118/210] debug --- .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 2d4560a00..68e12beb2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -182,7 +182,7 @@ jobs: else FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" fi - OUT_YML="${VERSION}/${TARGET_NET}/latest.yml" + OUT_YML="${VERSION}/test/${TARGET_NET}/latest.yml" OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" aws s3 ls ${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE EC=$? @@ -216,6 +216,8 @@ jobs: # Build yarn package-win-no-sign + ls release + # Push aws s3 cp "release/latest.yml" ${{ env.S3_BUCKET }}/${{ env.OUT_YML }} aws s3 cp "release/${{ env.FILENAME_EXE}}" ${{ env.S3_BUCKET }}/${{ env.OUT_EXE }} From 4016e8daf8e2c905b06563341d3be09d467b6314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 2 Dec 2024 14:47:19 +0100 Subject: [PATCH 119/210] Test push --- .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 68e12beb2..569ad9319 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -180,7 +180,7 @@ jobs: if [ $TARGET_NET = "mainnet" ]; then FILENAME_EXE="concordium-desktop-wallet-1.7.4.exe" else - FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" + FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-1.7.4.exe" fi OUT_YML="${VERSION}/test/${TARGET_NET}/latest.yml" OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" From 6f8d2d1162bce3cf99db75b51beb73b90f071b83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 2 Dec 2024 14:59:26 +0100 Subject: [PATCH 120/210] Test push --- .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 569ad9319..f07dbe6e0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -174,13 +174,13 @@ jobs: run: | set +e # Extract version number - VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json)/test + VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) TARGET_NET="mainnet" #{{env.TARGET_NET}} if [ $TARGET_NET = "mainnet" ]; then - FILENAME_EXE="concordium-desktop-wallet-1.7.4.exe" + FILENAME_EXE="concordium-desktop-wallet-${VERSION}.exe" else - FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-1.7.4.exe" + FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" fi OUT_YML="${VERSION}/test/${TARGET_NET}/latest.yml" OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" From 45d615969db8cae9431a1390b8f6b8bc12a934fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 2 Dec 2024 15:18:14 +0100 Subject: [PATCH 121/210] Test push --- .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 f07dbe6e0..0dc5f1a2e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,7 +18,7 @@ on: env: BASE_IMAGE_VERSION: "rust-1.74.1_ghc-9.6.4" - TARGET_NET: "stagenet" + TARGET_NET: "mainnet" NODE_VERSION: "16.20.2" STATIC_NODE_BINARY_IMAGE_NAME: 'static-node-binaries' AWS_ROLE_TO_ASSUME: "arn:aws:iam::192549843005:role/github_concordium-desktop-wallet" @@ -202,6 +202,7 @@ jobs: if: ${{ env.EXIT_CODE == 1 }} shell: bash run: | + TARGET_NET="mainnet" # Print system info node --version npm --version From 04e791a603d985c4cd221cefd14f2fd3a21c5223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 2 Dec 2024 15:45:07 +0100 Subject: [PATCH 122/210] Test linux --- .github/workflows/release.yaml | 260 +++++++++++++++++---------------- 1 file changed, 133 insertions(+), 127 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0dc5f1a2e..5b2bdaea6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -77,133 +77,26 @@ jobs: BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} -# release-desktop-wallet-linux: -# environment: release -# needs: login-aws -# runs-on: ubuntu-latest -# container: -# image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:test" -# credentials: -# username: ${{needs.login-aws.outputs.access_key}} -# password: ${{needs.login-aws.outputs.secret_key}} -# options: -u root -# steps: -# - name: Checkout repository -# uses: actions/checkout@v4 -# with: -# submodules: recursive -# ref: ${{ github.ref_name }} -# -# - name: Install dependencies and build -# run: | -# rustup default stable -# node --version -# npm --version -# yarn --version -# python --version -# rustup show -# wasm-pack --version -# -# yarn -# yarn package -# -# - name: publish -# run: | -# # Extract version number -# VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) -# -# # Prepare filenames -# if [[ $TARGET_NET = "mainnet" ]]; then -# FILENAME_DEB="concordium-desktop-wallet-${VERSION}.deb" -# FILENAME_RPM="concordium-desktop-wallet-${VERSION}.rpm" -# FILENAME_APPIMAGE="concordium-desktop-wallet-${VERSION}.AppImage" -# else -# FILENAME_DEB="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.deb" -# FILENAME_RPM="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.rpm" -# FILENAME_APPIMAGE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.AppImage" -# fi -# -# FILENAME_LATEST_LINUX="latest-linux.yml" -# -# OUT_FILENAME_DEB="${VERSION}/${TARGET_NET}/${FILENAME_DEB}" -# OUT_FILENAME_RPM="${VERSION}/${TARGET_NET}/${FILENAME_RPM}" -# OUT_FILENAME_APPIMAGE="${VERSION}/${TARGET_NET}/${FILENAME_APPIMAGE}" -# OUT_LATEST_LINUX="${VERSION}/${TARGET_NET}/latest-linux.yml" -# -# # Push to s3 -# echo ${FILENAME_DEB} -# echo ${FILENAME_RPM} -# echo ${FILENAME_APPIMAGE} -# echo ${FILENAME_LATEST_LINUX} -# aws s3 cp "release/${FILENAME_DEB}" "${{env.S3_BUCKET}}/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers -# aws s3 cp "release/${FILENAME_RPM}" "${{env.S3_BUCKET}}/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers -# aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers -# aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - - #using windows-2019 to be able to use visual studio 2019, newer versions do not support older versions of node - release-desktop-wallet-windows: - runs-on: windows-2019 + release-desktop-wallet-linux: environment: release needs: login-aws + runs-on: ubuntu-latest + container: + image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:test" + credentials: + username: ${{needs.login-aws.outputs.access_key}} + password: ${{needs.login-aws.outputs.secret_key}} + options: -u root steps: - - name: aws creds - uses: aws-actions/configure-aws-credentials@v4 - id: creds - with: - aws-region: "eu-west-1" - role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} - role-session-name: ReleaseDesktopWalletSession - - name: Checkout repository uses: actions/checkout@v4 with: submodules: recursive - ref: v1.7.4 - - name: install dependencies - uses: jetli/wasm-pack-action@v0.4.0 - with: - version: 'v0.9.1' - - - name: install node - uses: actions/setup-node@v4 - with: - node-version: 14.16.0 + ref: ${{ github.ref_name }} - - name: Check if file exists - shell: bash - run: | - set +e - # Extract version number - VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) - TARGET_NET="mainnet" #{{env.TARGET_NET}} - - if [ $TARGET_NET = "mainnet" ]; then - FILENAME_EXE="concordium-desktop-wallet-${VERSION}.exe" - else - FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" - fi - OUT_YML="${VERSION}/test/${TARGET_NET}/latest.yml" - OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" - aws s3 ls ${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE - EC=$? - echo $EC - if [ $EC -eq 0 ]; then - echo "$OUT_OBJECT already exist" - elif [ $EC -ne 1 ]; then - echo "Error: $EC" - fi - echo "OUT_EXE=$OUT_FILENAME_EXE" >> $GITHUB_ENV - echo "FILENAME_EXE=$FILENAME_EXE" >> $GITHUB_ENV - echo "OUT_YML=$OUT_YML" >> $GITHUB_ENV - echo "EXIT_CODE=$EC" >> $GITHUB_ENV - - - - name: Build and push desktop wallet - if: ${{ env.EXIT_CODE == 1 }} - shell: bash + - name: Install dependencies and build run: | - TARGET_NET="mainnet" - # Print system info + rustup default stable node --version npm --version yarn --version @@ -211,15 +104,128 @@ jobs: rustup show wasm-pack --version - # Install dependencies - yarn --network-timeout 1000000 + yarn + yarn package + + - name: publish + run: | + # Extract version number + VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) + TARGET_NET=${{env.TARGET_NET}} - # Build - yarn package-win-no-sign + # Prepare filenames + if [[ $TARGET_NET = "mainnet" ]]; then + FILENAME_DEB="concordium-desktop-wallet-${VERSION}.deb" + FILENAME_RPM="concordium-desktop-wallet-${VERSION}.rpm" + FILENAME_APPIMAGE="concordium-desktop-wallet-${VERSION}.AppImage" + else + FILENAME_DEB="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.deb" + FILENAME_RPM="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.rpm" + FILENAME_APPIMAGE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.AppImage" + fi - ls release + FILENAME_LATEST_LINUX="latest-linux.yml" - # Push - aws s3 cp "release/latest.yml" ${{ env.S3_BUCKET }}/${{ env.OUT_YML }} - aws s3 cp "release/${{ env.FILENAME_EXE}}" ${{ env.S3_BUCKET }}/${{ env.OUT_EXE }} - \ No newline at end of file + OUT_FILENAME_DEB="${VERSION}/${TARGET_NET}/${FILENAME_DEB}" + OUT_FILENAME_RPM="${VERSION}/${TARGET_NET}/${FILENAME_RPM}" + OUT_FILENAME_APPIMAGE="${VERSION}/${TARGET_NET}/${FILENAME_APPIMAGE}" + OUT_LATEST_LINUX="${VERSION}/${TARGET_NET}/latest-linux.yml" + aws s3 ls ${{env.S3_BUCKET}}/test/${OUT_FILENAME_DEB} + EC=$? + if [ EC -eq 0 ]; then + echo ".deb file already exist" + exit 1 + elif [ EC -ne 1 ]; then + echo "Error: $EC" + fi + + # Push to s3 + aws s3 cp "release/${FILENAME_DEB}" "${{env.S3_BUCKET}}/test/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${FILENAME_RPM}" "${{env.S3_BUCKET}}/test/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/test/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/test/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + + #using windows-2019 to be able to use visual studio 2019, newer versions do not support older versions of node +# release-desktop-wallet-windows: +# runs-on: windows-2019 +# environment: release +# needs: login-aws +# steps: +# - name: aws creds +# uses: aws-actions/configure-aws-credentials@v4 +# id: creds +# with: +# aws-region: "eu-west-1" +# role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} +# role-session-name: ReleaseDesktopWalletSession +# +# - name: Checkout repository +# uses: actions/checkout@v4 +# with: +# submodules: recursive +# ref: v1.7.4 +# - name: install dependencies +# uses: jetli/wasm-pack-action@v0.4.0 +# with: +# version: 'v0.9.1' +# +# - name: install node +# uses: actions/setup-node@v4 +# with: +# node-version: 14.16.0 +# +# - name: Check if file exists +# shell: bash +# run: | +# set +e +# # Extract version number +# VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) +# TARGET_NET=${{env.TARGET_NET}} +# +# if [ $TARGET_NET = "mainnet" ]; then +# FILENAME_EXE="concordium-desktop-wallet-${VERSION}.exe" +# else +# FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" +# fi +# OUT_YML="${VERSION}/${TARGET_NET}/latest.yml" +# OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" +# aws s3 ls ${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE +# EC=$? +# echo $EC +# if [ $EC -eq 0 ]; then +# echo "$OUT_OBJECT already exist" +# elif [ $EC -ne 1 ]; then +# echo "Error: $EC" +# fi +# echo "OUT_EXE=$OUT_FILENAME_EXE" >> $GITHUB_ENV +# echo "FILENAME_EXE=$FILENAME_EXE" >> $GITHUB_ENV +# echo "OUT_YML=$OUT_YML" >> $GITHUB_ENV +# echo "EXIT_CODE=$EC" >> $GITHUB_ENV +# +# +# - name: Build and push desktop wallet +# if: ${{ env.EXIT_CODE == 1 }} +# shell: bash +# run: | +# TARGET_NET=${{env.TARGET_NET}} +# +# # Print system info +# node --version +# npm --version +# yarn --version +# python --version +# rustup show +# wasm-pack --version +# +# # Install dependencies +# yarn --network-timeout 1000000 +# +# # Build +# yarn package-win-no-sign +# +# ls release +# +# # Push +# aws s3 cp "release/latest.yml" ${{ env.S3_BUCKET }}/${{ env.OUT_YML }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers +# aws s3 cp "release/${{ env.FILENAME_EXE}}" ${{ env.S3_BUCKET }}/${{ env.OUT_EXE }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers +# \ No newline at end of file From 98d4eceaf7a177c1748b7fb532147bc40a4e3cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 08:59:41 +0100 Subject: [PATCH 123/210] Test linux --- .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 5b2bdaea6..10914a45c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -114,7 +114,7 @@ jobs: TARGET_NET=${{env.TARGET_NET}} # Prepare filenames - if [[ $TARGET_NET = "mainnet" ]]; then + if [ $TARGET_NET = "mainnet" ]; then FILENAME_DEB="concordium-desktop-wallet-${VERSION}.deb" FILENAME_RPM="concordium-desktop-wallet-${VERSION}.rpm" FILENAME_APPIMAGE="concordium-desktop-wallet-${VERSION}.AppImage" From 85eb4b99237903a96a5914c8de1e6d60518ce10f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 09:23:13 +0100 Subject: [PATCH 124/210] Test linux --- .github/workflows/release.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 10914a45c..534d0d6e8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -95,7 +95,9 @@ jobs: ref: ${{ github.ref_name }} - name: Install dependencies and build + shell: bash run: | + aws help rustup default stable node --version npm --version From 233f976c29b98995d5be94e6487da076be8d3b30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 09:46:48 +0100 Subject: [PATCH 125/210] Install AWS CLI --- .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 534d0d6e8..f56b35944 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -95,9 +95,7 @@ jobs: ref: ${{ github.ref_name }} - name: Install dependencies and build - shell: bash run: | - aws help rustup default stable node --version npm --version @@ -109,6 +107,9 @@ jobs: yarn yarn package + - name: Install AWS CLI + uses: unfor19/install-aws-cli-action@v1 + - name: publish run: | # Extract version number From ccf7d3b7b6919c84a8e78fe51da314f27fd19542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 10:01:13 +0100 Subject: [PATCH 126/210] Install aws --- .github/workflows/release.yaml | 176 ++++++++++++++++----------------- 1 file changed, 88 insertions(+), 88 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f56b35944..0e58f0b95 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -108,7 +108,7 @@ jobs: yarn package - name: Install AWS CLI - uses: unfor19/install-aws-cli-action@v1 + run: snap install aws-cli - name: publish run: | @@ -143,92 +143,92 @@ jobs: fi # Push to s3 - aws s3 cp "release/${FILENAME_DEB}" "${{env.S3_BUCKET}}/test/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${FILENAME_RPM}" "${{env.S3_BUCKET}}/test/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/test/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/test/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${FILENAME_DEB}" "${{env.S3_BUCKET}}/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${FILENAME_RPM}" "${{env.S3_BUCKET}}/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #using windows-2019 to be able to use visual studio 2019, newer versions do not support older versions of node -# release-desktop-wallet-windows: -# runs-on: windows-2019 -# environment: release -# needs: login-aws -# steps: -# - name: aws creds -# uses: aws-actions/configure-aws-credentials@v4 -# id: creds -# with: -# aws-region: "eu-west-1" -# role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} -# role-session-name: ReleaseDesktopWalletSession -# -# - name: Checkout repository -# uses: actions/checkout@v4 -# with: -# submodules: recursive -# ref: v1.7.4 -# - name: install dependencies -# uses: jetli/wasm-pack-action@v0.4.0 -# with: -# version: 'v0.9.1' -# -# - name: install node -# uses: actions/setup-node@v4 -# with: -# node-version: 14.16.0 -# -# - name: Check if file exists -# shell: bash -# run: | -# set +e -# # Extract version number -# VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) -# TARGET_NET=${{env.TARGET_NET}} -# -# if [ $TARGET_NET = "mainnet" ]; then -# FILENAME_EXE="concordium-desktop-wallet-${VERSION}.exe" -# else -# FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" -# fi -# OUT_YML="${VERSION}/${TARGET_NET}/latest.yml" -# OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" -# aws s3 ls ${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE -# EC=$? -# echo $EC -# if [ $EC -eq 0 ]; then -# echo "$OUT_OBJECT already exist" -# elif [ $EC -ne 1 ]; then -# echo "Error: $EC" -# fi -# echo "OUT_EXE=$OUT_FILENAME_EXE" >> $GITHUB_ENV -# echo "FILENAME_EXE=$FILENAME_EXE" >> $GITHUB_ENV -# echo "OUT_YML=$OUT_YML" >> $GITHUB_ENV -# echo "EXIT_CODE=$EC" >> $GITHUB_ENV -# -# -# - name: Build and push desktop wallet -# if: ${{ env.EXIT_CODE == 1 }} -# shell: bash -# run: | -# TARGET_NET=${{env.TARGET_NET}} -# -# # Print system info -# node --version -# npm --version -# yarn --version -# python --version -# rustup show -# wasm-pack --version -# -# # Install dependencies -# yarn --network-timeout 1000000 -# -# # Build -# yarn package-win-no-sign -# -# ls release -# -# # Push -# aws s3 cp "release/latest.yml" ${{ env.S3_BUCKET }}/${{ env.OUT_YML }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers -# aws s3 cp "release/${{ env.FILENAME_EXE}}" ${{ env.S3_BUCKET }}/${{ env.OUT_EXE }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers -# \ No newline at end of file + release-desktop-wallet-windows: + runs-on: windows-2019 + environment: release + needs: login-aws + steps: + - name: aws creds + uses: aws-actions/configure-aws-credentials@v4 + id: creds + with: + aws-region: "eu-west-1" + role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} + role-session-name: ReleaseDesktopWalletSession + + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + ref: v1.7.4 + - name: install dependencies + uses: jetli/wasm-pack-action@v0.4.0 + with: + version: 'v0.9.1' + + - name: install node + uses: actions/setup-node@v4 + with: + node-version: 14.16.0 + + - name: Check if file exists + shell: bash + run: | + set +e + # Extract version number + VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) + TARGET_NET=${{env.TARGET_NET}} + + if [ $TARGET_NET = "mainnet" ]; then + FILENAME_EXE="concordium-desktop-wallet-${VERSION}.exe" + else + FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" + fi + OUT_YML="${VERSION}/${TARGET_NET}/latest.yml" + OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" + aws s3 ls ${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE + EC=$? + echo $EC + if [ $EC -eq 0 ]; then + echo "$OUT_OBJECT already exist" + elif [ $EC -ne 1 ]; then + echo "Error: $EC" + fi + echo "OUT_EXE=$OUT_FILENAME_EXE" >> $GITHUB_ENV + echo "FILENAME_EXE=$FILENAME_EXE" >> $GITHUB_ENV + echo "OUT_YML=$OUT_YML" >> $GITHUB_ENV + echo "EXIT_CODE=$EC" >> $GITHUB_ENV + + + - name: Build and push desktop wallet + if: ${{ env.EXIT_CODE == 1 }} + shell: bash + run: | + TARGET_NET=${{env.TARGET_NET}} + + # Print system info + node --version + npm --version + yarn --version + python --version + rustup show + wasm-pack --version + + # Install dependencies + yarn --network-timeout 1000000 + + # Build + yarn package-win-no-sign + + ls release + + # Push + aws s3 cp "release/latest.yml" ${{ env.S3_BUCKET }}/${{ env.OUT_YML }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${{ env.FILENAME_EXE}}" ${{ env.S3_BUCKET }}/${{ env.OUT_EXE }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + \ No newline at end of file From e813f9aa095f1019eab9bacbdba5126b2ccc9add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 10:49:34 +0100 Subject: [PATCH 127/210] Install aws with apt-get --- .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 0e58f0b95..5cf886f4d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -108,7 +108,7 @@ jobs: yarn package - name: Install AWS CLI - run: snap install aws-cli + run: apt-get install aws-cli - name: publish run: | From f596f264efafb9cf6e3998f9b458a705b8bf2007 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 11:01:22 +0100 Subject: [PATCH 128/210] Install aws with apt-get --- .github/workflows/release.yaml | 184 +++++++++++++++++---------------- 1 file changed, 93 insertions(+), 91 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5cf886f4d..a08e3cd16 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -94,6 +94,11 @@ jobs: submodules: recursive ref: ${{ github.ref_name }} + - name: Install AWS CLI + run: apt install awscli + + #- name: check if executable exist + - name: Install dependencies and build run: | rustup default stable @@ -107,9 +112,6 @@ jobs: yarn yarn package - - name: Install AWS CLI - run: apt-get install aws-cli - - name: publish run: | # Extract version number @@ -143,92 +145,92 @@ jobs: fi # Push to s3 - aws s3 cp "release/${FILENAME_DEB}" "${{env.S3_BUCKET}}/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${FILENAME_RPM}" "${{env.S3_BUCKET}}/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - - #using windows-2019 to be able to use visual studio 2019, newer versions do not support older versions of node - release-desktop-wallet-windows: - runs-on: windows-2019 - environment: release - needs: login-aws - steps: - - name: aws creds - uses: aws-actions/configure-aws-credentials@v4 - id: creds - with: - aws-region: "eu-west-1" - role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} - role-session-name: ReleaseDesktopWalletSession - - - name: Checkout repository - uses: actions/checkout@v4 - with: - submodules: recursive - ref: v1.7.4 - - name: install dependencies - uses: jetli/wasm-pack-action@v0.4.0 - with: - version: 'v0.9.1' - - - name: install node - uses: actions/setup-node@v4 - with: - node-version: 14.16.0 - - - name: Check if file exists - shell: bash - run: | - set +e - # Extract version number - VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) - TARGET_NET=${{env.TARGET_NET}} - - if [ $TARGET_NET = "mainnet" ]; then - FILENAME_EXE="concordium-desktop-wallet-${VERSION}.exe" - else - FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" - fi - OUT_YML="${VERSION}/${TARGET_NET}/latest.yml" - OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" - aws s3 ls ${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE - EC=$? - echo $EC - if [ $EC -eq 0 ]; then - echo "$OUT_OBJECT already exist" - elif [ $EC -ne 1 ]; then - echo "Error: $EC" - fi - echo "OUT_EXE=$OUT_FILENAME_EXE" >> $GITHUB_ENV - echo "FILENAME_EXE=$FILENAME_EXE" >> $GITHUB_ENV - echo "OUT_YML=$OUT_YML" >> $GITHUB_ENV - echo "EXIT_CODE=$EC" >> $GITHUB_ENV - - - - name: Build and push desktop wallet - if: ${{ env.EXIT_CODE == 1 }} - shell: bash - run: | - TARGET_NET=${{env.TARGET_NET}} - - # Print system info - node --version - npm --version - yarn --version - python --version - rustup show - wasm-pack --version - - # Install dependencies - yarn --network-timeout 1000000 - - # Build - yarn package-win-no-sign - - ls release - - # Push - aws s3 cp "release/latest.yml" ${{ env.S3_BUCKET }}/${{ env.OUT_YML }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${{ env.FILENAME_EXE}}" ${{ env.S3_BUCKET }}/${{ env.OUT_EXE }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${FILENAME_DEB}" "${{env.S3_BUCKET}}/test/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${FILENAME_RPM}" "${{env.S3_BUCKET}}/test/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/test/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/test/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + +# #using windows-2019 to be able to use visual studio 2019, newer versions do not support older versions of node +# release-desktop-wallet-windows: +# runs-on: windows-2019 +# environment: release +# needs: login-aws +# steps: +# - name: aws creds +# uses: aws-actions/configure-aws-credentials@v4 +# id: creds +# with: +# aws-region: "eu-west-1" +# role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} +# role-session-name: ReleaseDesktopWalletSession +# +# - name: Checkout repository +# uses: actions/checkout@v4 +# with: +# submodules: recursive +# ref: v1.7.4 +# - name: install dependencies +# uses: jetli/wasm-pack-action@v0.4.0 +# with: +# version: 'v0.9.1' +# +# - name: install node +# uses: actions/setup-node@v4 +# with: +# node-version: 14.16.0 +# +# - name: Check if file exists +# shell: bash +# run: | +# set +e +# # Extract version number +# VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) +# TARGET_NET=${{env.TARGET_NET}} +# +# if [ $TARGET_NET = "mainnet" ]; then +# FILENAME_EXE="concordium-desktop-wallet-${VERSION}.exe" +# else +# FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" +# fi +# OUT_YML="${VERSION}/${TARGET_NET}/latest.yml" +# OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" +# aws s3 ls ${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE +# EC=$? +# echo $EC +# if [ $EC -eq 0 ]; then +# echo "$OUT_OBJECT already exist" +# elif [ $EC -ne 1 ]; then +# echo "Error: $EC" +# fi +# echo "OUT_EXE=$OUT_FILENAME_EXE" >> $GITHUB_ENV +# echo "FILENAME_EXE=$FILENAME_EXE" >> $GITHUB_ENV +# echo "OUT_YML=$OUT_YML" >> $GITHUB_ENV +# echo "EXIT_CODE=$EC" >> $GITHUB_ENV +# +# +# - name: Build and push desktop wallet +# if: ${{ env.EXIT_CODE == 1 }} +# shell: bash +# run: | +# TARGET_NET=${{env.TARGET_NET}} +# +# # Print system info +# node --version +# npm --version +# yarn --version +# python --version +# rustup show +# wasm-pack --version +# +# # Install dependencies +# yarn --network-timeout 1000000 +# +# # Build +# yarn package-win-no-sign +# +# ls release +# +# # Push +# aws s3 cp "release/latest.yml" ${{ env.S3_BUCKET }}/${{ env.OUT_YML }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers +# aws s3 cp "release/${{ env.FILENAME_EXE}}" ${{ env.S3_BUCKET }}/${{ env.OUT_EXE }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers \ No newline at end of file From 8b5ae88c752ac6553078a4daba1dfdad5cabf779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 11:04:16 +0100 Subject: [PATCH 129/210] Install aws with apt - auto accept --- .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 a08e3cd16..7062c2778 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -95,7 +95,7 @@ jobs: ref: ${{ github.ref_name }} - name: Install AWS CLI - run: apt install awscli + run: apt install awscli -y #- name: check if executable exist From 26cac535629f4db91bcb8911805ab9705b151a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 11:15:04 +0100 Subject: [PATCH 130/210] Login to aws --- .github/workflows/release.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7062c2778..89f09ed3d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -97,6 +97,15 @@ jobs: - name: Install AWS CLI run: apt install awscli -y + - name: aws creds + uses: aws-actions/configure-aws-credentials@v4 + id: creds + with: + aws-region: "eu-west-1" + role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} + role-session-name: ReleaseDesktopWalletSession + mask-aws-account-id: false + #- name: check if executable exist - name: Install dependencies and build From bec24245e8a0891947a5a096dff60c2b05f92c31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 11:27:19 +0100 Subject: [PATCH 131/210] set +e --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 89f09ed3d..094ee4f58 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -123,6 +123,7 @@ jobs: - name: publish run: | + set +e # Extract version number VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) TARGET_NET=${{env.TARGET_NET}} From 5b891b7ee3ecf64b370f649c626e967853332959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 12:51:29 +0100 Subject: [PATCH 132/210] Test github env --- .github/workflows/release.yaml | 55 ++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 094ee4f58..0e27ad2e8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -106,22 +106,7 @@ jobs: role-session-name: ReleaseDesktopWalletSession mask-aws-account-id: false - #- name: check if executable exist - - - name: Install dependencies and build - run: | - rustup default stable - node --version - npm --version - yarn --version - python --version - rustup show - wasm-pack --version - - yarn - yarn package - - - name: publish + - name: check if executable exist run: | set +e # Extract version number @@ -133,10 +118,12 @@ jobs: FILENAME_DEB="concordium-desktop-wallet-${VERSION}.deb" FILENAME_RPM="concordium-desktop-wallet-${VERSION}.rpm" FILENAME_APPIMAGE="concordium-desktop-wallet-${VERSION}.AppImage" + FILENAME="concordium-desktop-wallet-${VERSION}" else FILENAME_DEB="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.deb" FILENAME_RPM="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.rpm" FILENAME_APPIMAGE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.AppImage" + FILENAME="concordium-desktop-wallet-${TARGET_NET}-${VERSION}" fi FILENAME_LATEST_LINUX="latest-linux.yml" @@ -144,21 +131,45 @@ jobs: OUT_FILENAME_DEB="${VERSION}/${TARGET_NET}/${FILENAME_DEB}" OUT_FILENAME_RPM="${VERSION}/${TARGET_NET}/${FILENAME_RPM}" OUT_FILENAME_APPIMAGE="${VERSION}/${TARGET_NET}/${FILENAME_APPIMAGE}" + OUT_FILENAME="${VERSION}/${TARGET_NET}/${FILENAME}" OUT_LATEST_LINUX="${VERSION}/${TARGET_NET}/latest-linux.yml" - aws s3 ls ${{env.S3_BUCKET}}/test/${OUT_FILENAME_DEB} + aws s3 ls ${{env.S3_BUCKET}}/test/${OUT_FILENAME}.deb EC=$? if [ EC -eq 0 ]; then echo ".deb file already exist" - exit 1 elif [ EC -ne 1 ]; then echo "Error: $EC" fi + echo "EXIT_CODE=$EC" >> $GITHUB_ENV + echo "OUT_FILENAME=$OUT_FILENAME" >> $GITHUB_ENV + echo "FILENAME=$FILENAME" >> $GITHUB_ENV + echo "OUT_YML_FILENAME=$OUT_LATEST_LINUX" >> $GITHUB_ENV + + + - name: Install dependencies and build + if: ${{ env.EXIT_CODE == 1 }} + run: | + rustup default stable + node --version + npm --version + yarn --version + python --version + rustup show + wasm-pack --version + + yarn + yarn package + + - name: publish + if: ${{ env.EXIT_CODE == 1 }} + run: | + set +e # Push to s3 - aws s3 cp "release/${FILENAME_DEB}" "${{env.S3_BUCKET}}/test/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${FILENAME_RPM}" "${{env.S3_BUCKET}}/test/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/test/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/test/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${{ env.FILENAME }}.deb" "${{env.S3_BUCKET}}/test/${{ env.OUT_FILENAME }}.deb" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${{ env.FILENAME }}.rpm" "${{env.S3_BUCKET}}/test/${{ env.OUT_FILENAME }}.rpm" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${{ env.FILENAME }}.AppImage" "${{env.S3_BUCKET}}/test/${{ env.OUT_FILENAME }}.rpm" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/latest-linux.yml" "${{env.S3_BUCKET}}/test/${{ env.OUT_YML_FILENAME }}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers # #using windows-2019 to be able to use visual studio 2019, newer versions do not support older versions of node # release-desktop-wallet-windows: From 524a749f7c6500211b155edadd4fafced7424ee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 13:04:23 +0100 Subject: [PATCH 133/210] Test check on existing file --- .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 0e27ad2e8..e2caa96b7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -133,7 +133,7 @@ jobs: OUT_FILENAME_APPIMAGE="${VERSION}/${TARGET_NET}/${FILENAME_APPIMAGE}" OUT_FILENAME="${VERSION}/${TARGET_NET}/${FILENAME}" OUT_LATEST_LINUX="${VERSION}/${TARGET_NET}/latest-linux.yml" - aws s3 ls ${{env.S3_BUCKET}}/test/${OUT_FILENAME}.deb + aws s3 ls ${{env.S3_BUCKET}}/${OUT_FILENAME}.deb EC=$? if [ EC -eq 0 ]; then echo ".deb file already exist" From 43c7d4b4078ab1918a69bc9c72f890d4048dbf14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 13:19:32 +0100 Subject: [PATCH 134/210] Test check on existing file --- .github/workflows/release.yaml | 209 +++++++++++++++++---------------- 1 file changed, 110 insertions(+), 99 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e2caa96b7..839e83659 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -65,12 +65,26 @@ jobs: submodules: recursive ref: ${{ github.ref_name }} + - name: Check version + run: | + set +e + # Extract version number + VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) + + TAG_VERSION=${{ github.ref_name }} + if [ $VERSION -ne $TAG_VERSION ]; then + echo "Tag version is not correct. Tag version: $TAG_VERSION version from package.json: $VERSION" + EC=0 + exit 1 + fi + echo "VERSION=$VERSION" >> $GITHUB_ENV + - name: build ci image if: ${{ env.EC == 254 }} uses: docker/build-push-action@v6 with: push: true - tags: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:test" + tags: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:${{ env.VERSION }}-test" context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' build-args: | @@ -109,30 +123,28 @@ jobs: - name: check if executable exist run: | set +e - # Extract version number - VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) TARGET_NET=${{env.TARGET_NET}} # Prepare filenames if [ $TARGET_NET = "mainnet" ]; then - FILENAME_DEB="concordium-desktop-wallet-${VERSION}.deb" - FILENAME_RPM="concordium-desktop-wallet-${VERSION}.rpm" - FILENAME_APPIMAGE="concordium-desktop-wallet-${VERSION}.AppImage" - FILENAME="concordium-desktop-wallet-${VERSION}" + FILENAME_DEB="concordium-desktop-wallet-${{ env.VERSION }}.deb" + FILENAME_RPM="concordium-desktop-wallet-${{ env.VERSION }}.rpm" + FILENAME_APPIMAGE="concordium-desktop-wallet-${{ env.VERSION }}.AppImage" + FILENAME="concordium-desktop-wallet-${{ env.VERSION }}" else - FILENAME_DEB="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.deb" - FILENAME_RPM="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.rpm" - FILENAME_APPIMAGE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.AppImage" - FILENAME="concordium-desktop-wallet-${TARGET_NET}-${VERSION}" + FILENAME_DEB="concordium-desktop-wallet-${TARGET_NET}-${{ env.VERSION }}.deb" + FILENAME_RPM="concordium-desktop-wallet-${TARGET_NET}-${{ env.VERSION }}.rpm" + FILENAME_APPIMAGE="concordium-desktop-wallet-${TARGET_NET}-${{ env.VERSION }}.AppImage" + FILENAME="concordium-desktop-wallet-${TARGET_NET}-${{ env.VERSION }}" fi FILENAME_LATEST_LINUX="latest-linux.yml" - OUT_FILENAME_DEB="${VERSION}/${TARGET_NET}/${FILENAME_DEB}" - OUT_FILENAME_RPM="${VERSION}/${TARGET_NET}/${FILENAME_RPM}" - OUT_FILENAME_APPIMAGE="${VERSION}/${TARGET_NET}/${FILENAME_APPIMAGE}" - OUT_FILENAME="${VERSION}/${TARGET_NET}/${FILENAME}" - OUT_LATEST_LINUX="${VERSION}/${TARGET_NET}/latest-linux.yml" + OUT_FILENAME_DEB="${{ env.VERSION }}/${TARGET_NET}/${FILENAME_DEB}" + OUT_FILENAME_RPM="${{ env.VERSION }}/${TARGET_NET}/${FILENAME_RPM}" + OUT_FILENAME_APPIMAGE="${{ env.VERSION }}/${TARGET_NET}/${FILENAME_APPIMAGE}" + OUT_FILENAME="${{ env.VERSION }}/${TARGET_NET}/${FILENAME}" + OUT_LATEST_LINUX="${{ env.VERSION }}/${TARGET_NET}/latest-linux.yml" aws s3 ls ${{env.S3_BUCKET}}/${OUT_FILENAME}.deb EC=$? if [ EC -eq 0 ]; then @@ -171,87 +183,86 @@ jobs: aws s3 cp "release/${{ env.FILENAME }}.AppImage" "${{env.S3_BUCKET}}/test/${{ env.OUT_FILENAME }}.rpm" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers aws s3 cp "release/latest-linux.yml" "${{env.S3_BUCKET}}/test/${{ env.OUT_YML_FILENAME }}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers -# #using windows-2019 to be able to use visual studio 2019, newer versions do not support older versions of node -# release-desktop-wallet-windows: -# runs-on: windows-2019 -# environment: release -# needs: login-aws -# steps: -# - name: aws creds -# uses: aws-actions/configure-aws-credentials@v4 -# id: creds -# with: -# aws-region: "eu-west-1" -# role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} -# role-session-name: ReleaseDesktopWalletSession -# -# - name: Checkout repository -# uses: actions/checkout@v4 -# with: -# submodules: recursive -# ref: v1.7.4 -# - name: install dependencies -# uses: jetli/wasm-pack-action@v0.4.0 -# with: -# version: 'v0.9.1' -# -# - name: install node -# uses: actions/setup-node@v4 -# with: -# node-version: 14.16.0 -# -# - name: Check if file exists -# shell: bash -# run: | -# set +e -# # Extract version number -# VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) -# TARGET_NET=${{env.TARGET_NET}} -# -# if [ $TARGET_NET = "mainnet" ]; then -# FILENAME_EXE="concordium-desktop-wallet-${VERSION}.exe" -# else -# FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" -# fi -# OUT_YML="${VERSION}/${TARGET_NET}/latest.yml" -# OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" -# aws s3 ls ${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE -# EC=$? -# echo $EC -# if [ $EC -eq 0 ]; then -# echo "$OUT_OBJECT already exist" -# elif [ $EC -ne 1 ]; then -# echo "Error: $EC" -# fi -# echo "OUT_EXE=$OUT_FILENAME_EXE" >> $GITHUB_ENV -# echo "FILENAME_EXE=$FILENAME_EXE" >> $GITHUB_ENV -# echo "OUT_YML=$OUT_YML" >> $GITHUB_ENV -# echo "EXIT_CODE=$EC" >> $GITHUB_ENV -# -# -# - name: Build and push desktop wallet -# if: ${{ env.EXIT_CODE == 1 }} -# shell: bash -# run: | -# TARGET_NET=${{env.TARGET_NET}} -# -# # Print system info -# node --version -# npm --version -# yarn --version -# python --version -# rustup show -# wasm-pack --version -# -# # Install dependencies -# yarn --network-timeout 1000000 -# -# # Build -# yarn package-win-no-sign -# -# ls release -# -# # Push -# aws s3 cp "release/latest.yml" ${{ env.S3_BUCKET }}/${{ env.OUT_YML }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers -# aws s3 cp "release/${{ env.FILENAME_EXE}}" ${{ env.S3_BUCKET }}/${{ env.OUT_EXE }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + #using windows-2019 to be able to use visual studio 2019, newer versions do not support older versions of node + release-desktop-wallet-windows: + runs-on: windows-2019 + environment: release + needs: login-aws + steps: + - name: aws creds + uses: aws-actions/configure-aws-credentials@v4 + id: creds + with: + aws-region: "eu-west-1" + role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }} + role-session-name: ReleaseDesktopWalletSession + + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + ref: ${{ github.ref_name }} + - name: install dependencies + uses: jetli/wasm-pack-action@v0.4.0 + with: + version: 'v0.9.1' + + - name: install node + uses: actions/setup-node@v4 + with: + node-version: 14.16.0 + + - name: Check if file exists + shell: bash + run: | + set +e + TARGET_NET=${{env.TARGET_NET}} + + + if [ $TARGET_NET = "mainnet" ]; then + FILENAME_EXE="concordium-desktop-wallet-${{ env.VERSION }}.exe" + else + FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${{ env.VERSION }}.exe" + fi + OUT_YML="${{ env.VERSION }}/${TARGET_NET}/latest.yml" + OUT_FILENAME_EXE="${{ env.VERSION }}/${TARGET_NET}/${FILENAME_EXE}" + aws s3 ls ${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE + EC=$? + echo $EC + if [ $EC -eq 0 ]; then + echo "$OUT_OBJECT already exist" + elif [ $EC -ne 1 ]; then + echo "Error: $EC" + fi + echo "OUT_EXE=$OUT_FILENAME_EXE" >> $GITHUB_ENV + echo "FILENAME_EXE=$FILENAME_EXE" >> $GITHUB_ENV + echo "OUT_YML=$OUT_YML" >> $GITHUB_ENV + echo "EXIT_CODE=$EC" >> $GITHUB_ENV + + + - name: Build and push desktop wallet + if: ${{ env.EXIT_CODE == 1 }} + shell: bash + run: | + TARGET_NET=${{env.TARGET_NET}} + + # Print system info + node --version + npm --version + yarn --version + python --version + rustup show + wasm-pack --version + + # Install dependencies + yarn --network-timeout 1000000 + + # Build + yarn package-win-no-sign + + ls release + + # Push + aws s3 cp "release/latest.yml" ${{ env.S3_BUCKET }}/test/${{ env.OUT_YML }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${{ env.FILENAME_EXE}}" ${{ env.S3_BUCKET }}/test/${{ env.OUT_EXE }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers \ No newline at end of file From 2b06562cb6ebac0330fe93020e96ba5c27f7c749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 13:21:01 +0100 Subject: [PATCH 135/210] Test check version --- .github/workflows/release.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 839e83659..2d92f0ef3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -67,7 +67,6 @@ jobs: - name: Check version run: | - set +e # Extract version number VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) From 783c4785cdf48d25fa04447e5cca25b00a7913f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 13:23:05 +0100 Subject: [PATCH 136/210] Test check version --- .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 2d92f0ef3..ec50a454d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -51,15 +51,8 @@ jobs: uses: aws-actions/amazon-ecr-login@v2 with: mask-password: false - - - name: Check if image exist - run: | - aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=test - echo "EC=$?" >> $GITHUB_ENV - - name: Checkout repository - if: ${{ env.EC == 254 }} uses: actions/checkout@v4 with: submodules: recursive @@ -77,6 +70,11 @@ jobs: exit 1 fi echo "VERSION=$VERSION" >> $GITHUB_ENV + + - name: Check if image exist + run: | + aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=test + echo "EC=$?" >> $GITHUB_ENV - name: build ci image if: ${{ env.EC == 254 }} From 9a04486e445a92b1859d388270daa7b89454a857 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 13:24:45 +0100 Subject: [PATCH 137/210] Test check 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 ec50a454d..b7ac2a44b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -64,7 +64,7 @@ jobs: VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) TAG_VERSION=${{ github.ref_name }} - if [ $VERSION -ne $TAG_VERSION ]; then + if [ "$VERSION" -ne "$TAG_VERSION" ]; then echo "Tag version is not correct. Tag version: $TAG_VERSION version from package.json: $VERSION" EC=0 exit 1 From 2e54ee9360b275b38bf5e56997c7cdc7f1f775b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 13:34:44 +0100 Subject: [PATCH 138/210] Try different syntax in if statement --- .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 b7ac2a44b..ffc521693 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -64,7 +64,7 @@ jobs: VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) TAG_VERSION=${{ github.ref_name }} - if [ "$VERSION" -ne "$TAG_VERSION" ]; then + if [[ "$VERSION" -ne "$TAG_VERSION" ]]; then echo "Tag version is not correct. Tag version: $TAG_VERSION version from package.json: $VERSION" EC=0 exit 1 From 56812380e9a261ea5c94e6587afdc1d08cd46a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 13:37:54 +0100 Subject: [PATCH 139/210] Try different syntax in if statement --- .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 ffc521693..d2b38ce36 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -64,7 +64,7 @@ jobs: VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) TAG_VERSION=${{ github.ref_name }} - if [[ "$VERSION" -ne "$TAG_VERSION" ]]; then + if [ "$VERSION" != "$TAG_VERSION" ]; then echo "Tag version is not correct. Tag version: $TAG_VERSION version from package.json: $VERSION" EC=0 exit 1 From 9378bdf5a9f42b7e1ff367d94301172c06285fce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 14:14:03 +0100 Subject: [PATCH 140/210] Try to output image full tag --- .github/workflows/release.yaml | 43 +++++++++------------------------- 1 file changed, 11 insertions(+), 32 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d2b38ce36..2ddfe35a8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,18 +1,7 @@ name: Concordium desktop wallet release on: - workflow_dispatch: - inputs: - service: - type: choice - description: Choose which workflow should be ran - options: - - desktop-wallet-windows - - release-desktop-wallet-linux - push: - branches: - - ekw/SRE-1001/release-desktop-wallet tags: - desktop-wallet-*/* @@ -35,6 +24,7 @@ jobs: outputs: access_key: ${{ steps.login-ecr.outputs.docker_username_192549843005_dkr_ecr_eu_west_1_amazonaws_com }} secret_key: ${{ steps.login-ecr.outputs.docker_password_192549843005_dkr_ecr_eu_west_1_amazonaws_com }} + CONTAINER_TAG: ${{ env.CONTAINER_TAG }} environment: release steps: - name: aws creds @@ -70,10 +60,11 @@ jobs: exit 1 fi echo "VERSION=$VERSION" >> $GITHUB_ENV + echo "CONTAINER_TAG=${{ env.ECR_REPO }}:$VERSION" - name: Check if image exist run: | - aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=test + aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=${{ env.VERSION }} echo "EC=$?" >> $GITHUB_ENV - name: build ci image @@ -81,7 +72,7 @@ jobs: uses: docker/build-push-action@v6 with: push: true - tags: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:${{ env.VERSION }}-test" + tags: "${{ env.CONTAINER_TAG }}" context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' build-args: | @@ -93,7 +84,7 @@ jobs: needs: login-aws runs-on: ubuntu-latest container: - image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:test" + image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:${{ github.ref_name }}" credentials: username: ${{needs.login-aws.outputs.access_key}} password: ${{needs.login-aws.outputs.secret_key}} @@ -124,22 +115,13 @@ jobs: # Prepare filenames if [ $TARGET_NET = "mainnet" ]; then - FILENAME_DEB="concordium-desktop-wallet-${{ env.VERSION }}.deb" - FILENAME_RPM="concordium-desktop-wallet-${{ env.VERSION }}.rpm" - FILENAME_APPIMAGE="concordium-desktop-wallet-${{ env.VERSION }}.AppImage" FILENAME="concordium-desktop-wallet-${{ env.VERSION }}" else - FILENAME_DEB="concordium-desktop-wallet-${TARGET_NET}-${{ env.VERSION }}.deb" - FILENAME_RPM="concordium-desktop-wallet-${TARGET_NET}-${{ env.VERSION }}.rpm" - FILENAME_APPIMAGE="concordium-desktop-wallet-${TARGET_NET}-${{ env.VERSION }}.AppImage" FILENAME="concordium-desktop-wallet-${TARGET_NET}-${{ env.VERSION }}" fi FILENAME_LATEST_LINUX="latest-linux.yml" - OUT_FILENAME_DEB="${{ env.VERSION }}/${TARGET_NET}/${FILENAME_DEB}" - OUT_FILENAME_RPM="${{ env.VERSION }}/${TARGET_NET}/${FILENAME_RPM}" - OUT_FILENAME_APPIMAGE="${{ env.VERSION }}/${TARGET_NET}/${FILENAME_APPIMAGE}" OUT_FILENAME="${{ env.VERSION }}/${TARGET_NET}/${FILENAME}" OUT_LATEST_LINUX="${{ env.VERSION }}/${TARGET_NET}/latest-linux.yml" aws s3 ls ${{env.S3_BUCKET}}/${OUT_FILENAME}.deb @@ -175,10 +157,10 @@ jobs: set +e # Push to s3 - aws s3 cp "release/${{ env.FILENAME }}.deb" "${{env.S3_BUCKET}}/test/${{ env.OUT_FILENAME }}.deb" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${{ env.FILENAME }}.rpm" "${{env.S3_BUCKET}}/test/${{ env.OUT_FILENAME }}.rpm" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${{ env.FILENAME }}.AppImage" "${{env.S3_BUCKET}}/test/${{ env.OUT_FILENAME }}.rpm" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/latest-linux.yml" "${{env.S3_BUCKET}}/test/${{ env.OUT_YML_FILENAME }}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${{ env.FILENAME }}.deb" "${{env.S3_BUCKET}}/${{ env.OUT_FILENAME }}.deb" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${{ env.FILENAME }}.rpm" "${{env.S3_BUCKET}}/${{ env.OUT_FILENAME }}.rpm" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${{ env.FILENAME }}.AppImage" "${{env.S3_BUCKET}}/${{ env.OUT_FILENAME }}.rpm" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/latest-linux.yml" "${{env.S3_BUCKET}}/${{ env.OUT_YML_FILENAME }}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #using windows-2019 to be able to use visual studio 2019, newer versions do not support older versions of node release-desktop-wallet-windows: @@ -251,15 +233,12 @@ jobs: rustup show wasm-pack --version - # Install dependencies yarn --network-timeout 1000000 # Build yarn package-win-no-sign - ls release - # Push - aws s3 cp "release/latest.yml" ${{ env.S3_BUCKET }}/test/${{ env.OUT_YML }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${{ env.FILENAME_EXE}}" ${{ env.S3_BUCKET }}/test/${{ env.OUT_EXE }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/latest.yml" ${{ env.S3_BUCKET }}/${{ env.OUT_YML }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp "release/${{ env.FILENAME_EXE}}" ${{ env.S3_BUCKET }}/${{ env.OUT_EXE }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers \ No newline at end of file From cf646d59f4aec2801ea7524d473de72fc4f09392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 14:15:25 +0100 Subject: [PATCH 141/210] Test on branch --- .github/workflows/release.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2ddfe35a8..e01d677cb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,6 +2,8 @@ name: Concordium desktop wallet release on: push: + branches: + - ekw/SRE-1001/release-desktop-wallet tags: - desktop-wallet-*/* From b8f9a746ed709f84a369c2c3674a42e87e80a04c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 14:19:16 +0100 Subject: [PATCH 142/210] 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 e01d677cb..1c2fe499e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -53,7 +53,7 @@ jobs: - name: Check version run: | # Extract version number - VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) + VERSION=ekw/SRE-1001/release-desktop-wallet #$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) TAG_VERSION=${{ github.ref_name }} if [ "$VERSION" != "$TAG_VERSION" ]; then @@ -86,7 +86,7 @@ jobs: needs: login-aws runs-on: ubuntu-latest container: - image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:${{ github.ref_name }}" + image: "${{needs.login-aws.outputs.CONTAINER_TAG}}" credentials: username: ${{needs.login-aws.outputs.access_key}} password: ${{needs.login-aws.outputs.secret_key}} From 7dbe5c9dfb5887a1423c135859771222682162cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 14:21:05 +0100 Subject: [PATCH 143/210] Test hardcoded version --- .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 1c2fe499e..c025118ff 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -53,9 +53,9 @@ jobs: - name: Check version run: | # Extract version number - VERSION=ekw/SRE-1001/release-desktop-wallet #$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) + VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) - TAG_VERSION=${{ github.ref_name }} + TAG_VERSION=1.7.4 #${{ github.ref_name }} if [ "$VERSION" != "$TAG_VERSION" ]; then echo "Tag version is not correct. Tag version: $TAG_VERSION version from package.json: $VERSION" EC=0 From 0dfb5553ec4d186319fccdbd269fcffaaf8c469e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 14:22:57 +0100 Subject: [PATCH 144/210] Test hardcoded version --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c025118ff..670a2c1f1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -66,6 +66,7 @@ jobs: - name: Check if image exist run: | + set +e aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=${{ env.VERSION }} echo "EC=$?" >> $GITHUB_ENV From bec949bc2c42558c095cafa3c46b52422fa6d893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 14:28:32 +0100 Subject: [PATCH 145/210] Echo to 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 670a2c1f1..8ac269708 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -62,7 +62,7 @@ jobs: exit 1 fi echo "VERSION=$VERSION" >> $GITHUB_ENV - echo "CONTAINER_TAG=${{ env.ECR_REPO }}:$VERSION" + echo "CONTAINER_TAG=${{ env.ECR_REPO }}:$VERSION" >> $GITHUB_ENV - name: Check if image exist run: | From eb594627067f71c9fabafb5ba69c8fdf1e5e24ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 14:43:15 +0100 Subject: [PATCH 146/210] Echo to github outputs --- .github/workflows/release.yaml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8ac269708..c0234c2f2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,7 +26,8 @@ jobs: outputs: access_key: ${{ steps.login-ecr.outputs.docker_username_192549843005_dkr_ecr_eu_west_1_amazonaws_com }} secret_key: ${{ steps.login-ecr.outputs.docker_password_192549843005_dkr_ecr_eu_west_1_amazonaws_com }} - CONTAINER_TAG: ${{ env.CONTAINER_TAG }} + CONTAINER_TAG: ${{ steps.version_check.outputs.CONTAINER_TAG }} + VERSION: ${{ steps.version_check.outputs.VERSION }} environment: release steps: - name: aws creds @@ -51,6 +52,7 @@ jobs: ref: ${{ github.ref_name }} - name: Check version + id: version_check run: | # Extract version number VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) @@ -61,13 +63,13 @@ jobs: EC=0 exit 1 fi - echo "VERSION=$VERSION" >> $GITHUB_ENV - echo "CONTAINER_TAG=${{ env.ECR_REPO }}:$VERSION" >> $GITHUB_ENV + echo "VERSION=$VERSION" >> $GITHUB_OUTPUT + echo "CONTAINER_TAG=${{ env.ECR_REPO }}:$VERSION" >> $GITHUB_OUTPUT - name: Check if image exist run: | set +e - aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=${{ env.VERSION }} + aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=${{ steps.version_check.outputs.VERSION }} echo "EC=$?" >> $GITHUB_ENV - name: build ci image @@ -75,7 +77,7 @@ jobs: uses: docker/build-push-action@v6 with: push: true - tags: "${{ env.CONTAINER_TAG }}" + tags: "${{ steps.version_check.outputs.CONTAINER_TAG }}" context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' build-args: | @@ -114,19 +116,19 @@ jobs: - name: check if executable exist run: | set +e - TARGET_NET=${{env.TARGET_NET}} + TARGET_NET=${{needs.login-aws.outputs.TARGET_NET}} # Prepare filenames if [ $TARGET_NET = "mainnet" ]; then - FILENAME="concordium-desktop-wallet-${{ env.VERSION }}" + FILENAME="concordium-desktop-wallet-${{ needs.login-aws.outputs.VERSION }}" else - FILENAME="concordium-desktop-wallet-${TARGET_NET}-${{ env.VERSION }}" + FILENAME="concordium-desktop-wallet-${TARGET_NET}-${{ needs.login-aws.outputs.VERSION }}" fi FILENAME_LATEST_LINUX="latest-linux.yml" - OUT_FILENAME="${{ env.VERSION }}/${TARGET_NET}/${FILENAME}" - OUT_LATEST_LINUX="${{ env.VERSION }}/${TARGET_NET}/latest-linux.yml" + OUT_FILENAME="${{ needs.login-aws.outputs.VERSION }}/${TARGET_NET}/${FILENAME}" + OUT_LATEST_LINUX="${{ needs.login-aws.outputs.VERSION }}/${TARGET_NET}/latest-linux.yml" aws s3 ls ${{env.S3_BUCKET}}/${OUT_FILENAME}.deb EC=$? if [ EC -eq 0 ]; then @@ -202,12 +204,12 @@ jobs: if [ $TARGET_NET = "mainnet" ]; then - FILENAME_EXE="concordium-desktop-wallet-${{ env.VERSION }}.exe" + FILENAME_EXE="concordium-desktop-wallet-${{ needs.login-aws.outputs.VERSION }}.exe" else - FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${{ env.VERSION }}.exe" + FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${{ needs.login-aws.outputs.VERSION }}.exe" fi - OUT_YML="${{ env.VERSION }}/${TARGET_NET}/latest.yml" - OUT_FILENAME_EXE="${{ env.VERSION }}/${TARGET_NET}/${FILENAME_EXE}" + OUT_YML="${{ needs.login-aws.outputs.VERSION }}/${TARGET_NET}/latest.yml" + OUT_FILENAME_EXE="${{ needs.login-aws.outputs.VERSION }}/${TARGET_NET}/${FILENAME_EXE}" aws s3 ls ${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE EC=$? echo $EC From 1d0ca83baf0cf949fdee5d3819abce19f022319a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 15:01:21 +0100 Subject: [PATCH 147/210] Fix wrong reference syntax --- .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 c0234c2f2..fd6fb7043 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -131,9 +131,9 @@ jobs: OUT_LATEST_LINUX="${{ needs.login-aws.outputs.VERSION }}/${TARGET_NET}/latest-linux.yml" aws s3 ls ${{env.S3_BUCKET}}/${OUT_FILENAME}.deb EC=$? - if [ EC -eq 0 ]; then + if [ $EC -eq 0 ]; then echo ".deb file already exist" - elif [ EC -ne 1 ]; then + elif [ $EC -ne 1 ]; then echo "Error: $EC" fi echo "EXIT_CODE=$EC" >> $GITHUB_ENV From 8b9ae72a5cd0cb6f41006f7e25ea9400f78f67af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 15:06:42 +0100 Subject: [PATCH 148/210] Test hardcoded 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 fd6fb7043..addb8a932 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -185,7 +185,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - ref: ${{ github.ref_name }} + ref: 1.7.4 - name: install dependencies uses: jetli/wasm-pack-action@v0.4.0 with: From 23a2731699029f3c6e2f6afc9e88a37c682932ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 15:12:53 +0100 Subject: [PATCH 149/210] Test hardcoded 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 addb8a932..20c88fadb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -185,7 +185,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - ref: 1.7.4 + ref: v1.7.4 - name: install dependencies uses: jetli/wasm-pack-action@v0.4.0 with: From b48f1178585fa5287b8f5cdd12dfecfedbbdfbae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 15:15:27 +0100 Subject: [PATCH 150/210] Use correct variable for target net --- .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 20c88fadb..c56542a86 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -116,7 +116,7 @@ jobs: - name: check if executable exist run: | set +e - TARGET_NET=${{needs.login-aws.outputs.TARGET_NET}} + TARGET_NET=${{env.TARGET_NET}} # Prepare filenames if [ $TARGET_NET = "mainnet" ]; then From a38a3d6382d198bd3f7026859058e422317c0b21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 15:36:29 +0100 Subject: [PATCH 151/210] No hardcoded versions --- .github/workflows/release.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c56542a86..790877819 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,8 +2,6 @@ name: Concordium desktop wallet release on: push: - branches: - - ekw/SRE-1001/release-desktop-wallet tags: - desktop-wallet-*/* @@ -57,7 +55,7 @@ jobs: # Extract version number VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) - TAG_VERSION=1.7.4 #${{ github.ref_name }} + TAG_VERSION=${{ github.ref_name }} if [ "$VERSION" != "$TAG_VERSION" ]; then echo "Tag version is not correct. Tag version: $TAG_VERSION version from package.json: $VERSION" EC=0 @@ -185,7 +183,8 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - ref: v1.7.4 + ref: ${{ github.ref_name }} + - name: install dependencies uses: jetli/wasm-pack-action@v0.4.0 with: From f59da0e9067039b21cab42888d265f1e03fb84cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 15:37:33 +0100 Subject: [PATCH 152/210] Format --- .github/workflows/release.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 790877819..bda782d1e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -245,4 +245,3 @@ jobs: # Push aws s3 cp "release/latest.yml" ${{ env.S3_BUCKET }}/${{ env.OUT_YML }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers aws s3 cp "release/${{ env.FILENAME_EXE}}" ${{ env.S3_BUCKET }}/${{ env.OUT_EXE }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - \ No newline at end of file From 53b225565066cd7b265916a9e9a36543cf2424a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 3 Dec 2024 15:38:41 +0100 Subject: [PATCH 153/210] Update tag 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 bda782d1e..4db0da128 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,7 +3,7 @@ name: Concordium desktop wallet release on: push: tags: - - desktop-wallet-*/* + - '*.*.*' env: BASE_IMAGE_VERSION: "rust-1.74.1_ghc-9.6.4" From cf58f43b25f938bf2d76bf89eaa5fd05939159e3 Mon Sep 17 00:00:00 2001 From: EmilKWarmdahl <141136997+EmilKWarmdahl@users.noreply.github.com> Date: Thu, 5 Dec 2024 09:24:47 +0100 Subject: [PATCH 154/210] Apply suggestions from code review Co-authored-by: Lasse Alm --- .github/workflows/release.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4db0da128..52b954322 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -53,7 +53,7 @@ jobs: id: version_check run: | # Extract version number - VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) + VERSION=$(jq '.version' -r app/package.json) TAG_VERSION=${{ github.ref_name }} if [ "$VERSION" != "$TAG_VERSION" ]; then @@ -102,7 +102,7 @@ jobs: - name: Install AWS CLI run: apt install awscli -y - - name: aws creds + - name: Login to Amazon ECR uses: aws-actions/configure-aws-credentials@v4 id: creds with: @@ -154,7 +154,7 @@ jobs: yarn yarn package - - name: publish + - name: Publish if: ${{ env.EXIT_CODE == 1 }} run: | set +e @@ -185,7 +185,7 @@ jobs: submodules: recursive ref: ${{ github.ref_name }} - - name: install dependencies + - name: Install dependencies uses: jetli/wasm-pack-action@v0.4.0 with: version: 'v0.9.1' From fbd5151cfd3b6814c9840b205982366d4ecfb9f4 Mon Sep 17 00:00:00 2001 From: EmilKWarmdahl <141136997+EmilKWarmdahl@users.noreply.github.com> Date: Thu, 5 Dec 2024 09:25:18 +0100 Subject: [PATCH 155/210] Update .github/workflows/release.yaml Co-authored-by: Lasse Alm --- .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 52b954322..409f4ee98 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -111,7 +111,7 @@ jobs: role-session-name: ReleaseDesktopWalletSession mask-aws-account-id: false - - name: check if executable exist + - name: Check if executable exist run: | set +e TARGET_NET=${{env.TARGET_NET}} From d8f99cad5459e3bf5cd92e5c811270e018ae0133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 6 Dec 2024 09:21:50 +0100 Subject: [PATCH 156/210] Test copy folder recursive --- .github/workflows/release.yaml | 56 +++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 409f4ee98..2ea480696 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,8 +2,10 @@ name: Concordium desktop wallet release on: push: + branches: + - 'ekw/SRE-1001/release-desktop-wallet' tags: - - '*.*.*' + - '*/*.*.*' env: BASE_IMAGE_VERSION: "rust-1.74.1_ghc-9.6.4" @@ -55,10 +57,9 @@ jobs: # Extract version number VERSION=$(jq '.version' -r app/package.json) - TAG_VERSION=${{ github.ref_name }} + TAG_VERSION=1.7.4 ${{ github.ref_name }} if [ "$VERSION" != "$TAG_VERSION" ]; then echo "Tag version is not correct. Tag version: $TAG_VERSION version from package.json: $VERSION" - EC=0 exit 1 fi echo "VERSION=$VERSION" >> $GITHUB_OUTPUT @@ -99,9 +100,6 @@ jobs: submodules: recursive ref: ${{ github.ref_name }} - - name: Install AWS CLI - run: apt install awscli -y - - name: Login to Amazon ECR uses: aws-actions/configure-aws-credentials@v4 id: creds @@ -115,6 +113,7 @@ jobs: run: | set +e TARGET_NET=${{env.TARGET_NET}} + VERSION=${{ needs.login-aws.outputs.VERSION }} # Prepare filenames if [ $TARGET_NET = "mainnet" ]; then @@ -123,10 +122,11 @@ jobs: FILENAME="concordium-desktop-wallet-${TARGET_NET}-${{ needs.login-aws.outputs.VERSION }}" fi - FILENAME_LATEST_LINUX="latest-linux.yml" + #FILENAME_LATEST_LINUX="latest-linux.yml" - OUT_FILENAME="${{ needs.login-aws.outputs.VERSION }}/${TARGET_NET}/${FILENAME}" - OUT_LATEST_LINUX="${{ needs.login-aws.outputs.VERSION }}/${TARGET_NET}/latest-linux.yml" + #OUT_FILENAME="${{ needs.login-aws.outputs.VERSION }}/${TARGET_NET}/${FILENAME}" + #OUT_LATEST_LINUX="${{ needs.login-aws.outputs.VERSION }}/${TARGET_NET}/latest-linux.yml" + OUT_FOLDER="${{ env.S3_BUCKET }}/test/${VERSION}/${TARGET_NET}" aws s3 ls ${{env.S3_BUCKET}}/${OUT_FILENAME}.deb EC=$? if [ $EC -eq 0 ]; then @@ -134,10 +134,11 @@ jobs: elif [ $EC -ne 1 ]; then echo "Error: $EC" fi - echo "EXIT_CODE=$EC" >> $GITHUB_ENV - echo "OUT_FILENAME=$OUT_FILENAME" >> $GITHUB_ENV - echo "FILENAME=$FILENAME" >> $GITHUB_ENV - echo "OUT_YML_FILENAME=$OUT_LATEST_LINUX" >> $GITHUB_ENV + #echo "EXIT_CODE=$EC" >> $GITHUB_ENV + #echo "OUT_FILENAME=$OUT_FILENAME" >> $GITHUB_ENV + #echo "FILENAME=$FILENAME" >> $GITHUB_ENV + #echo "OUT_YML_FILENAME=$OUT_LATEST_LINUX" >> $GITHUB_ENV + echo "OUT_FOLDER=$OUT_FOLDER" >> $GITHUB_ENV - name: Install dependencies and build @@ -160,10 +161,11 @@ jobs: set +e # Push to s3 - aws s3 cp "release/${{ env.FILENAME }}.deb" "${{env.S3_BUCKET}}/${{ env.OUT_FILENAME }}.deb" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${{ env.FILENAME }}.rpm" "${{env.S3_BUCKET}}/${{ env.OUT_FILENAME }}.rpm" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${{ env.FILENAME }}.AppImage" "${{env.S3_BUCKET}}/${{ env.OUT_FILENAME }}.rpm" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/latest-linux.yml" "${{env.S3_BUCKET}}/${{ env.OUT_YML_FILENAME }}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp --recursive release/ ${{ env.OUT_FOLDER }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + #aws s3 cp "release/${{ env.FILENAME }}.deb" "${{env.S3_BUCKET}}/${{ env.OUT_FILENAME }}.deb" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + #aws s3 cp "release/${{ env.FILENAME }}.rpm" "${{env.S3_BUCKET}}/${{ env.OUT_FILENAME }}.rpm" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + #aws s3 cp "release/${{ env.FILENAME }}.AppImage" "${{env.S3_BUCKET}}/${{ env.OUT_FILENAME }}.rpm" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + #aws s3 cp "release/latest-linux.yml" "${{env.S3_BUCKET}}/${{ env.OUT_YML_FILENAME }}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #using windows-2019 to be able to use visual studio 2019, newer versions do not support older versions of node release-desktop-wallet-windows: @@ -200,6 +202,7 @@ jobs: run: | set +e TARGET_NET=${{env.TARGET_NET}} + VERSION=${{ needs.login-aws.outputs.VERSION }} if [ $TARGET_NET = "mainnet" ]; then @@ -207,8 +210,9 @@ jobs: else FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${{ needs.login-aws.outputs.VERSION }}.exe" fi - OUT_YML="${{ needs.login-aws.outputs.VERSION }}/${TARGET_NET}/latest.yml" - OUT_FILENAME_EXE="${{ needs.login-aws.outputs.VERSION }}/${TARGET_NET}/${FILENAME_EXE}" + #OUT_YML="${{ needs.login-aws.outputs.VERSION }}/${TARGET_NET}/latest.yml" + #OUT_FILENAME_EXE="${{ needs.login-aws.outputs.VERSION }}/${TARGET_NET}/${FILENAME_EXE}" + OUT_FOLDER="${{ env.S3_BUCKET }}/test/${VERSION}/${TARGET_NET}" aws s3 ls ${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE EC=$? echo $EC @@ -217,10 +221,11 @@ jobs: elif [ $EC -ne 1 ]; then echo "Error: $EC" fi - echo "OUT_EXE=$OUT_FILENAME_EXE" >> $GITHUB_ENV - echo "FILENAME_EXE=$FILENAME_EXE" >> $GITHUB_ENV - echo "OUT_YML=$OUT_YML" >> $GITHUB_ENV - echo "EXIT_CODE=$EC" >> $GITHUB_ENV + #echo "OUT_EXE=$OUT_FILENAME_EXE" >> $GITHUB_ENV + #echo "FILENAME_EXE=$FILENAME_EXE" >> $GITHUB_ENV + #echo "OUT_YML=$OUT_YML" >> $GITHUB_ENV + #echo "EXIT_CODE=$EC" >> $GITHUB_ENV + echo "OUT_FOLDER=$OUT_FOLDER" >> $GITHUB_ENV - name: Build and push desktop wallet @@ -243,5 +248,6 @@ jobs: yarn package-win-no-sign # Push - aws s3 cp "release/latest.yml" ${{ env.S3_BUCKET }}/${{ env.OUT_YML }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - aws s3 cp "release/${{ env.FILENAME_EXE}}" ${{ env.S3_BUCKET }}/${{ env.OUT_EXE }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp --recursive release/ ${{ env.OUT_FOLDER }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + #aws s3 cp "release/latest.yml" ${{ env.S3_BUCKET }}/${{ env.OUT_YML }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + #aws s3 cp "release/${{ env.FILENAME_EXE}}" ${{ env.S3_BUCKET }}/${{ env.OUT_EXE }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers From 7c9315a99f3bef4f6baad8cb46178c1458656c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 6 Dec 2024 09:23:11 +0100 Subject: [PATCH 157/210] Test copy folder recursive --- .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 2ea480696..8511263a0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -57,7 +57,7 @@ jobs: # Extract version number VERSION=$(jq '.version' -r app/package.json) - TAG_VERSION=1.7.4 ${{ github.ref_name }} + TAG_VERSION=1.7.4# ${{ github.ref_name }} if [ "$VERSION" != "$TAG_VERSION" ]; then echo "Tag version is not correct. Tag version: $TAG_VERSION version from package.json: $VERSION" exit 1 From dedcba7bf19f4f46aeed9b529ca2663bb3f8eea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 6 Dec 2024 09:24:37 +0100 Subject: [PATCH 158/210] Test copy folder recursive --- .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 8511263a0..1e617ef6e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -57,7 +57,7 @@ jobs: # Extract version number VERSION=$(jq '.version' -r app/package.json) - TAG_VERSION=1.7.4# ${{ github.ref_name }} + TAG_VERSION=1.7.4 #${{ github.ref_name }} if [ "$VERSION" != "$TAG_VERSION" ]; then echo "Tag version is not correct. Tag version: $TAG_VERSION version from package.json: $VERSION" exit 1 From 62cb850621c5c3b5fea4fbef18647d8af4b9e9f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 6 Dec 2024 09:31:06 +0100 Subject: [PATCH 159/210] Test copy folder recursive --- .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 1e617ef6e..42d8b33c0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -127,7 +127,7 @@ jobs: #OUT_FILENAME="${{ needs.login-aws.outputs.VERSION }}/${TARGET_NET}/${FILENAME}" #OUT_LATEST_LINUX="${{ needs.login-aws.outputs.VERSION }}/${TARGET_NET}/latest-linux.yml" OUT_FOLDER="${{ env.S3_BUCKET }}/test/${VERSION}/${TARGET_NET}" - aws s3 ls ${{env.S3_BUCKET}}/${OUT_FILENAME}.deb + aws s3 ls ${{env.S3_BUCKET}}/test/${OUT_FILENAME}.deb EC=$? if [ $EC -eq 0 ]; then echo ".deb file already exist" @@ -213,7 +213,7 @@ jobs: #OUT_YML="${{ needs.login-aws.outputs.VERSION }}/${TARGET_NET}/latest.yml" #OUT_FILENAME_EXE="${{ needs.login-aws.outputs.VERSION }}/${TARGET_NET}/${FILENAME_EXE}" OUT_FOLDER="${{ env.S3_BUCKET }}/test/${VERSION}/${TARGET_NET}" - aws s3 ls ${{ env.S3_BUCKET }}/$OUT_FILENAME_EXE + aws s3 ls ${{ env.S3_BUCKET }}/test/$OUT_FILENAME_EXE EC=$? echo $EC if [ $EC -eq 0 ]; then From 699803f8d9ae9365767e87e2379268989dc0be3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 6 Dec 2024 09:39:01 +0100 Subject: [PATCH 160/210] Add aws to docker image --- scripts/desktop-wallet-ci.Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/desktop-wallet-ci.Dockerfile b/scripts/desktop-wallet-ci.Dockerfile index 0d5971beb..ec4f0bf2c 100644 --- a/scripts/desktop-wallet-ci.Dockerfile +++ b/scripts/desktop-wallet-ci.Dockerfile @@ -11,7 +11,8 @@ FROM concordium/base:${BASE_VERSION} RUN apt-get update && apt-get install -y \ libudev-dev \ libusb-1.0-0-dev \ - rpm + rpm \ + awscli RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh From c420d221dbf8b6cc9c198217900dc6a38f780c32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 6 Dec 2024 09:44:40 +0100 Subject: [PATCH 161/210] Add ec back in --- .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 42d8b33c0..8c1d63d64 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -134,7 +134,7 @@ jobs: elif [ $EC -ne 1 ]; then echo "Error: $EC" fi - #echo "EXIT_CODE=$EC" >> $GITHUB_ENV + echo "EXIT_CODE=$EC" >> $GITHUB_ENV #echo "OUT_FILENAME=$OUT_FILENAME" >> $GITHUB_ENV #echo "FILENAME=$FILENAME" >> $GITHUB_ENV #echo "OUT_YML_FILENAME=$OUT_LATEST_LINUX" >> $GITHUB_ENV @@ -224,7 +224,7 @@ jobs: #echo "OUT_EXE=$OUT_FILENAME_EXE" >> $GITHUB_ENV #echo "FILENAME_EXE=$FILENAME_EXE" >> $GITHUB_ENV #echo "OUT_YML=$OUT_YML" >> $GITHUB_ENV - #echo "EXIT_CODE=$EC" >> $GITHUB_ENV + echo "EXIT_CODE=$EC" >> $GITHUB_ENV echo "OUT_FOLDER=$OUT_FOLDER" >> $GITHUB_ENV From 9f6e1eaaebf74f860d2b2f2721317174272d9372 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 6 Dec 2024 09:59:29 +0100 Subject: [PATCH 162/210] 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 8c1d63d64..434381602 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -161,7 +161,7 @@ jobs: set +e # Push to s3 - aws s3 cp --recursive release/ ${{ env.OUT_FOLDER }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp --recursive release/ ${{ env.OUT_FOLDER }} --exclude linux-unpacked builder-debug.yml --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #aws s3 cp "release/${{ env.FILENAME }}.deb" "${{env.S3_BUCKET}}/${{ env.OUT_FILENAME }}.deb" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #aws s3 cp "release/${{ env.FILENAME }}.rpm" "${{env.S3_BUCKET}}/${{ env.OUT_FILENAME }}.rpm" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #aws s3 cp "release/${{ env.FILENAME }}.AppImage" "${{env.S3_BUCKET}}/${{ env.OUT_FILENAME }}.rpm" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers @@ -248,6 +248,6 @@ jobs: yarn package-win-no-sign # Push - aws s3 cp --recursive release/ ${{ env.OUT_FOLDER }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp release/ ${{ env.OUT_FOLDER }} --exclude win-unpacked builder-debug.yml *.blockmap --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #aws s3 cp "release/latest.yml" ${{ env.S3_BUCKET }}/${{ env.OUT_YML }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #aws s3 cp "release/${{ env.FILENAME_EXE}}" ${{ env.S3_BUCKET }}/${{ env.OUT_EXE }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers From 5b50b861587ce89f0f46bb64d2639d9e5d5ae426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 6 Dec 2024 10:30:32 +0100 Subject: [PATCH 163/210] 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 434381602..8b76e5eb1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -161,7 +161,7 @@ jobs: set +e # Push to s3 - aws s3 cp --recursive release/ ${{ env.OUT_FOLDER }} --exclude linux-unpacked builder-debug.yml --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp --recursive release/ ${{ env.OUT_FOLDER }} --exclude linux-unpacked --exclude builder-debug.yml --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #aws s3 cp "release/${{ env.FILENAME }}.deb" "${{env.S3_BUCKET}}/${{ env.OUT_FILENAME }}.deb" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #aws s3 cp "release/${{ env.FILENAME }}.rpm" "${{env.S3_BUCKET}}/${{ env.OUT_FILENAME }}.rpm" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #aws s3 cp "release/${{ env.FILENAME }}.AppImage" "${{env.S3_BUCKET}}/${{ env.OUT_FILENAME }}.rpm" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers @@ -248,6 +248,6 @@ jobs: yarn package-win-no-sign # Push - aws s3 cp release/ ${{ env.OUT_FOLDER }} --exclude win-unpacked builder-debug.yml *.blockmap --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp release/ ${{ env.OUT_FOLDER }} --exclude win-unpacked --exclude builder-debug.yml --exclude *.blockmap --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #aws s3 cp "release/latest.yml" ${{ env.S3_BUCKET }}/${{ env.OUT_YML }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #aws s3 cp "release/${{ env.FILENAME_EXE}}" ${{ env.S3_BUCKET }}/${{ env.OUT_EXE }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers From 6ff1feaec5069cacaf1f6664fea9c02fffe95bc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 6 Dec 2024 12:36:45 +0100 Subject: [PATCH 164/210] 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 8b76e5eb1..0fa6d5563 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -248,6 +248,6 @@ jobs: yarn package-win-no-sign # Push - aws s3 cp release/ ${{ env.OUT_FOLDER }} --exclude win-unpacked --exclude builder-debug.yml --exclude *.blockmap --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp --recursive release/ ${{ env.OUT_FOLDER }} --exclude win-unpacked --exclude builder-debug.yml --exclude *.blockmap --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #aws s3 cp "release/latest.yml" ${{ env.S3_BUCKET }}/${{ env.OUT_YML }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #aws s3 cp "release/${{ env.FILENAME_EXE}}" ${{ env.S3_BUCKET }}/${{ env.OUT_EXE }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers From 2ee3504c4337fe5c38b881e15a011f181104e0db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 6 Dec 2024 12:56:23 +0100 Subject: [PATCH 165/210] Star on folder --- .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 0fa6d5563..d0f2b03d2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -161,7 +161,7 @@ jobs: set +e # Push to s3 - aws s3 cp --recursive release/ ${{ env.OUT_FOLDER }} --exclude linux-unpacked --exclude builder-debug.yml --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp --recursive release/ ${{ env.OUT_FOLDER }} --exclude linux-unpacked/* --exclude builder-debug.yml --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #aws s3 cp "release/${{ env.FILENAME }}.deb" "${{env.S3_BUCKET}}/${{ env.OUT_FILENAME }}.deb" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #aws s3 cp "release/${{ env.FILENAME }}.rpm" "${{env.S3_BUCKET}}/${{ env.OUT_FILENAME }}.rpm" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #aws s3 cp "release/${{ env.FILENAME }}.AppImage" "${{env.S3_BUCKET}}/${{ env.OUT_FILENAME }}.rpm" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers @@ -248,6 +248,6 @@ jobs: yarn package-win-no-sign # Push - aws s3 cp --recursive release/ ${{ env.OUT_FOLDER }} --exclude win-unpacked --exclude builder-debug.yml --exclude *.blockmap --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp --recursive release/ ${{ env.OUT_FOLDER }} --exclude win-unpacked/* --exclude builder-debug.yml --exclude *.blockmap --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #aws s3 cp "release/latest.yml" ${{ env.S3_BUCKET }}/${{ env.OUT_YML }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #aws s3 cp "release/${{ env.FILENAME_EXE}}" ${{ env.S3_BUCKET }}/${{ env.OUT_EXE }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers From 9bef441b9c93c688f455d3530667e64ae919e2c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 9 Dec 2024 09:28:39 +0100 Subject: [PATCH 166/210] Seperate tasks and output versions --- .github/workflows/release.yaml | 93 +++++++++++++++------------------- 1 file changed, 41 insertions(+), 52 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d0f2b03d2..ca3dd9b50 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,11 +10,12 @@ on: env: BASE_IMAGE_VERSION: "rust-1.74.1_ghc-9.6.4" TARGET_NET: "mainnet" - NODE_VERSION: "16.20.2" STATIC_NODE_BINARY_IMAGE_NAME: 'static-node-binaries' AWS_ROLE_TO_ASSUME: "arn:aws:iam::192549843005:role/github_concordium-desktop-wallet" S3_BUCKET: "s3://desktopwallet.concordium.com" ECR_REPO: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci" + WASM-PACK_VERSION: "v0.9.1" + NODE_VERSION: "14.16.0" permissions: id-token: write @@ -109,7 +110,7 @@ jobs: role-session-name: ReleaseDesktopWalletSession mask-aws-account-id: false - - name: Check if executable exist + - name: Generate filename run: | set +e TARGET_NET=${{env.TARGET_NET}} @@ -121,51 +122,44 @@ jobs: else FILENAME="concordium-desktop-wallet-${TARGET_NET}-${{ needs.login-aws.outputs.VERSION }}" fi - - #FILENAME_LATEST_LINUX="latest-linux.yml" - - #OUT_FILENAME="${{ needs.login-aws.outputs.VERSION }}/${TARGET_NET}/${FILENAME}" - #OUT_LATEST_LINUX="${{ needs.login-aws.outputs.VERSION }}/${TARGET_NET}/latest-linux.yml" OUT_FOLDER="${{ env.S3_BUCKET }}/test/${VERSION}/${TARGET_NET}" - aws s3 ls ${{env.S3_BUCKET}}/test/${OUT_FILENAME}.deb + echo "OUT_FOLDER=$OUT_FOLDER" >> $GITHUB_ENV + echo "FILENAME=$FILENAME" >> $GITHUB_ENV + + - name: Check if Executable exist + run: | + set +e + aws s3 ls "${{ env.OUT_FOLDER }}/latest-linux.yml" EC=$? if [ $EC -eq 0 ]; then echo ".deb file already exist" + exit 1 elif [ $EC -ne 1 ]; then echo "Error: $EC" + exit 1 fi echo "EXIT_CODE=$EC" >> $GITHUB_ENV - #echo "OUT_FILENAME=$OUT_FILENAME" >> $GITHUB_ENV - #echo "FILENAME=$FILENAME" >> $GITHUB_ENV - #echo "OUT_YML_FILENAME=$OUT_LATEST_LINUX" >> $GITHUB_ENV - echo "OUT_FOLDER=$OUT_FOLDER" >> $GITHUB_ENV - - - name: Install dependencies and build - if: ${{ env.EXIT_CODE == 1 }} + - name: Output dependency versions run: | rustup default stable - node --version - npm --version - yarn --version - python --version - rustup show - wasm-pack --version - - yarn - yarn package - - - name: Publish + echo "::info:: node version: $(node --version)" + echo "::info:: npm version: $(npm --version)" + echo "::info:: yarn version: $(yarn --version)" + echo "::info:: python version: $(python --version)" + echo "::info:: rustup version: $(rustup show)" + echo "::info:: wasm-pack version: $(wasm-pack --version)" + + - name: Build and publish if: ${{ env.EXIT_CODE == 1 }} run: | set +e + yarn + yarn package + # Push to s3 aws s3 cp --recursive release/ ${{ env.OUT_FOLDER }} --exclude linux-unpacked/* --exclude builder-debug.yml --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - #aws s3 cp "release/${{ env.FILENAME }}.deb" "${{env.S3_BUCKET}}/${{ env.OUT_FILENAME }}.deb" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - #aws s3 cp "release/${{ env.FILENAME }}.rpm" "${{env.S3_BUCKET}}/${{ env.OUT_FILENAME }}.rpm" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - #aws s3 cp "release/${{ env.FILENAME }}.AppImage" "${{env.S3_BUCKET}}/${{ env.OUT_FILENAME }}.rpm" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - #aws s3 cp "release/latest-linux.yml" "${{env.S3_BUCKET}}/${{ env.OUT_YML_FILENAME }}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #using windows-2019 to be able to use visual studio 2019, newer versions do not support older versions of node release-desktop-wallet-windows: @@ -190,14 +184,14 @@ jobs: - name: Install dependencies uses: jetli/wasm-pack-action@v0.4.0 with: - version: 'v0.9.1' + version: ${{ env.PACK_VERSION }} - name: install node uses: actions/setup-node@v4 with: - node-version: 14.16.0 + node-version: ${{ env.NODE_VERSION }} - - name: Check if file exists + - name: Generate filename shell: bash run: | set +e @@ -210,10 +204,13 @@ jobs: else FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${{ needs.login-aws.outputs.VERSION }}.exe" fi - #OUT_YML="${{ needs.login-aws.outputs.VERSION }}/${TARGET_NET}/latest.yml" - #OUT_FILENAME_EXE="${{ needs.login-aws.outputs.VERSION }}/${TARGET_NET}/${FILENAME_EXE}" OUT_FOLDER="${{ env.S3_BUCKET }}/test/${VERSION}/${TARGET_NET}" - aws s3 ls ${{ env.S3_BUCKET }}/test/$OUT_FILENAME_EXE + echo "OUT_FOLDER=$OUT_FOLDER" >> $GITHUB_ENV + echo "FILENAME=$FILENAME" >> $GITHUB_ENV + + - name: Check if executable exist + run: | + aws s3 ls "${{ env.OUT_FOLDER }}/latest.yml" EC=$? echo $EC if [ $EC -eq 0 ]; then @@ -221,27 +218,21 @@ jobs: elif [ $EC -ne 1 ]; then echo "Error: $EC" fi - #echo "OUT_EXE=$OUT_FILENAME_EXE" >> $GITHUB_ENV - #echo "FILENAME_EXE=$FILENAME_EXE" >> $GITHUB_ENV - #echo "OUT_YML=$OUT_YML" >> $GITHUB_ENV echo "EXIT_CODE=$EC" >> $GITHUB_ENV - echo "OUT_FOLDER=$OUT_FOLDER" >> $GITHUB_ENV + - name: Output dependency versions + run: | + echo "::info:: node version: $(node --version)" + echo "::info:: npm version: $(npm --version)" + echo "::info:: yarn version: $(yarn --version)" + echo "::info:: python version: $(python --version)" + echo "::info:: rustup version: $(rustup show)" + echo "::info:: wasm-pack version: $(wasm-pack --version)" - name: Build and push desktop wallet if: ${{ env.EXIT_CODE == 1 }} shell: bash run: | - TARGET_NET=${{env.TARGET_NET}} - - # Print system info - node --version - npm --version - yarn --version - python --version - rustup show - wasm-pack --version - yarn --network-timeout 1000000 # Build @@ -249,5 +240,3 @@ jobs: # Push aws s3 cp --recursive release/ ${{ env.OUT_FOLDER }} --exclude win-unpacked/* --exclude builder-debug.yml --exclude *.blockmap --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - #aws s3 cp "release/latest.yml" ${{ env.S3_BUCKET }}/${{ env.OUT_YML }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - #aws s3 cp "release/${{ env.FILENAME_EXE}}" ${{ env.S3_BUCKET }}/${{ env.OUT_EXE }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers From 1d607bc4498cd2bc8152cdfee4deb26f97bc4e2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 9 Dec 2024 09:35:35 +0100 Subject: [PATCH 167/210] Try cache from registry --- .github/workflows/release.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ca3dd9b50..adf27c48d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -80,6 +80,8 @@ jobs: tags: "${{ steps.version_check.outputs.CONTAINER_TAG }}" context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' + cache-from: type=registry,ref=${{ env.ECR_REPO }} + cache-to: type,ref=${{ env.ECR_REPO }} build-args: | BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} From ce85d9be6f622cc233e425d6a1a567a389d23ca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 9 Dec 2024 09:37:23 +0100 Subject: [PATCH 168/210] Do not check version --- .github/workflows/release.yaml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index adf27c48d..4e36d2af1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -52,19 +52,19 @@ jobs: submodules: recursive ref: ${{ github.ref_name }} - - name: Check version - id: version_check - run: | - # Extract version number - VERSION=$(jq '.version' -r app/package.json) - - TAG_VERSION=1.7.4 #${{ github.ref_name }} - if [ "$VERSION" != "$TAG_VERSION" ]; then - echo "Tag version is not correct. Tag version: $TAG_VERSION version from package.json: $VERSION" - exit 1 - fi - echo "VERSION=$VERSION" >> $GITHUB_OUTPUT - echo "CONTAINER_TAG=${{ env.ECR_REPO }}:$VERSION" >> $GITHUB_OUTPUT + #- name: Check version + # id: version_check + # run: | + # # Extract version number + # VERSION=$(jq '.version' -r app/package.json) +# + # TAG_VERSION=1.7.4 #${{ github.ref_name }} + # if [ "$VERSION" != "$TAG_VERSION" ]; then + # echo "Tag version is not correct. Tag version: $TAG_VERSION version from package.json: $VERSION" + # exit 1 + # fi + # echo "VERSION=$VERSION" >> $GITHUB_OUTPUT + # echo "CONTAINER_TAG=${{ env.ECR_REPO }}:$VERSION" >> $GITHUB_OUTPUT - name: Check if image exist run: | From 5062228af12e72e772d2569d53edff6ea57a1be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 9 Dec 2024 09:39:11 +0100 Subject: [PATCH 169/210] Do not check image --- .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 4e36d2af1..a7bb6cc47 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -66,11 +66,11 @@ jobs: # echo "VERSION=$VERSION" >> $GITHUB_OUTPUT # echo "CONTAINER_TAG=${{ env.ECR_REPO }}:$VERSION" >> $GITHUB_OUTPUT - - name: Check if image exist - run: | - set +e - aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=${{ steps.version_check.outputs.VERSION }} - echo "EC=$?" >> $GITHUB_ENV + #- name: Check if image exist + # run: | + # set +e + # aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=${{ steps.version_check.outputs.VERSION }} + echo "EC=254" >> $GITHUB_ENV #echo "EC=$?" >> $GITHUB_ENV - name: build ci image if: ${{ env.EC == 254 }} From bd7003a7a36205ea922641eb51805cefac4bf24b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 9 Dec 2024 09:39:44 +0100 Subject: [PATCH 170/210] Do not check image --- .github/workflows/release.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a7bb6cc47..c58f84776 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -66,10 +66,10 @@ jobs: # echo "VERSION=$VERSION" >> $GITHUB_OUTPUT # echo "CONTAINER_TAG=${{ env.ECR_REPO }}:$VERSION" >> $GITHUB_OUTPUT - #- name: Check if image exist - # run: | - # set +e - # aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=${{ steps.version_check.outputs.VERSION }} + - name: Check if image exist + run: | + set +e + #aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=${{ steps.version_check.outputs.VERSION }} echo "EC=254" >> $GITHUB_ENV #echo "EC=$?" >> $GITHUB_ENV - name: build ci image From 88388f299160e52bbb1cce8ee7de21bb62214481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 9 Dec 2024 09:40:30 +0100 Subject: [PATCH 171/210] Do not check image --- .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 c58f84776..d956c0c87 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -81,7 +81,7 @@ jobs: context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' cache-from: type=registry,ref=${{ env.ECR_REPO }} - cache-to: type,ref=${{ env.ECR_REPO }} + cache-to: type=registry,ref=${{ env.ECR_REPO }} build-args: | BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} From e046652ddd626b92e7d83a85a03735cbc3cdab19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 9 Dec 2024 09:44:46 +0100 Subject: [PATCH 172/210] Pull image --- .github/workflows/release.yaml | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d956c0c87..16c5c7e37 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -52,24 +52,25 @@ jobs: submodules: recursive ref: ${{ github.ref_name }} - #- name: Check version - # id: version_check - # run: | - # # Extract version number - # VERSION=$(jq '.version' -r app/package.json) -# - # TAG_VERSION=1.7.4 #${{ github.ref_name }} - # if [ "$VERSION" != "$TAG_VERSION" ]; then - # echo "Tag version is not correct. Tag version: $TAG_VERSION version from package.json: $VERSION" - # exit 1 - # fi - # echo "VERSION=$VERSION" >> $GITHUB_OUTPUT - # echo "CONTAINER_TAG=${{ env.ECR_REPO }}:$VERSION" >> $GITHUB_OUTPUT + - name: Check version + id: version_check + run: | + # Extract version number + VERSION=$(jq '.version' -r app/package.json) + + TAG_VERSION=1.7.4 #${{ github.ref_name }} + if [ "$VERSION" != "$TAG_VERSION" ]; then + echo "Tag version is not correct. Tag version: $TAG_VERSION version from package.json: $VERSION" + exit 1 + fi + echo "VERSION=$VERSION" >> $GITHUB_OUTPUT + echo "CONTAINER_TAG=${{ env.ECR_REPO }}:$VERSION" >> $GITHUB_OUTPUT - name: Check if image exist run: | set +e #aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=${{ steps.version_check.outputs.VERSION }} + docker pull ${{ steps.version_check.outputs.CONTAINER_TAG }} echo "EC=254" >> $GITHUB_ENV #echo "EC=$?" >> $GITHUB_ENV - name: build ci image @@ -80,8 +81,6 @@ jobs: tags: "${{ steps.version_check.outputs.CONTAINER_TAG }}" context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' - cache-from: type=registry,ref=${{ env.ECR_REPO }} - cache-to: type=registry,ref=${{ env.ECR_REPO }} build-args: | BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} From 70539dc0ea194a7eb8acae3a1b577cf980ab0774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 9 Dec 2024 09:47:48 +0100 Subject: [PATCH 173/210] Local cache --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 16c5c7e37..4c2d63add 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -81,6 +81,7 @@ jobs: tags: "${{ steps.version_check.outputs.CONTAINER_TAG }}" context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' + cache-from: type=local build-args: | BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} From 91e8b43f6cc3fdcf956f11db074530ca0e024bd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 9 Dec 2024 10:31:58 +0100 Subject: [PATCH 174/210] gha cache --- .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 4c2d63add..17969479d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -81,7 +81,8 @@ jobs: tags: "${{ steps.version_check.outputs.CONTAINER_TAG }}" context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' - cache-from: type=local + cache-from: type=gha + cache-to: type=gha build-args: | BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} From c4298c279df6c2642f1730af691226855ecfd283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 9 Dec 2024 13:32:05 +0100 Subject: [PATCH 175/210] Try local cache with src --- .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 17969479d..04308d462 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -81,8 +81,8 @@ jobs: tags: "${{ steps.version_check.outputs.CONTAINER_TAG }}" context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' - cache-from: type=gha - cache-to: type=gha + cache-from: type=local,src=/$HOME/cache + cache-to: type=local,src=/$HOME/cache build-args: | BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} From 8f9b84c74b0a7a319139fe81bbf2efd1c17cfe13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 9 Dec 2024 13:32:18 +0100 Subject: [PATCH 176/210] Try local cache with src --- .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 04308d462..194524455 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -82,7 +82,7 @@ jobs: context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' cache-from: type=local,src=/$HOME/cache - cache-to: type=local,src=/$HOME/cache + cache-to: type=local,dest=/$HOME/cache build-args: | BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} From 0078c196724bd437d99ef973c938571c1fc833f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 9 Dec 2024 13:35:52 +0100 Subject: [PATCH 177/210] Add driver --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 194524455..3e5e6cdc1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -83,6 +83,7 @@ jobs: file: 'scripts/desktop-wallet-ci.Dockerfile' cache-from: type=local,src=/$HOME/cache cache-to: type=local,dest=/$HOME/cache + driver: docker-container build-args: | BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} From c131f0db1a25183bbb0e564906874c1c9f5db59d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 9 Dec 2024 13:41:11 +0100 Subject: [PATCH 178/210] Setup docker --- .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 3e5e6cdc1..0b1923633 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -73,6 +73,9 @@ jobs: docker pull ${{ steps.version_check.outputs.CONTAINER_TAG }} echo "EC=254" >> $GITHUB_ENV #echo "EC=$?" >> $GITHUB_ENV + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: build ci image if: ${{ env.EC == 254 }} uses: docker/build-push-action@v6 @@ -83,7 +86,6 @@ jobs: file: 'scripts/desktop-wallet-ci.Dockerfile' cache-from: type=local,src=/$HOME/cache cache-to: type=local,dest=/$HOME/cache - driver: docker-container build-args: | BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} From bb40037372c5a0ad6ae21f4544f381a373074e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 9 Dec 2024 13:47:40 +0100 Subject: [PATCH 179/210] gha cache --- .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 0b1923633..0ec5cb521 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -84,8 +84,8 @@ jobs: tags: "${{ steps.version_check.outputs.CONTAINER_TAG }}" context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' - cache-from: type=local,src=/$HOME/cache - cache-to: type=local,dest=/$HOME/cache + cache-from: type=gha + cache-to: type=gha build-args: | BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} From a659b31e86d2f20c160f2d3da10646eedb9ac31c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 10 Dec 2024 09:52:08 +0100 Subject: [PATCH 180/210] Test - different 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 0ec5cb521..bdb5c1696 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -81,7 +81,7 @@ jobs: uses: docker/build-push-action@v6 with: push: true - tags: "${{ steps.version_check.outputs.CONTAINER_TAG }}" + tags: "${{ steps.version_check.outputs.CONTAINER_TAG }}-dev" context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' cache-from: type=gha From a8d661940a1d27e5c1858b26fac4c47dfa5a74a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 10 Dec 2024 10:17:49 +0100 Subject: [PATCH 181/210] Correct wasm version variable 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 bdb5c1696..057ed6412 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -190,7 +190,7 @@ jobs: - name: Install dependencies uses: jetli/wasm-pack-action@v0.4.0 with: - version: ${{ env.PACK_VERSION }} + version: ${{ env.WASM-PACK_VERSION }} - name: install node uses: actions/setup-node@v4 From 2c661b4d9affe1111791a5e534d04b0b4cae1b1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 10 Dec 2024 11:09:27 +0100 Subject: [PATCH 182/210] Use bash --- .github/workflows/release.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 057ed6412..fcafcf357 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -215,6 +215,7 @@ jobs: echo "FILENAME=$FILENAME" >> $GITHUB_ENV - name: Check if executable exist + shell: bash run: | aws s3 ls "${{ env.OUT_FOLDER }}/latest.yml" EC=$? @@ -227,6 +228,7 @@ jobs: echo "EXIT_CODE=$EC" >> $GITHUB_ENV - name: Output dependency versions + shell: bash run: | echo "::info:: node version: $(node --version)" echo "::info:: npm version: $(npm --version)" From 9fedb9a6ce4bd53ac38818f12b3c79d0c5303eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 10 Dec 2024 11:14:52 +0100 Subject: [PATCH 183/210] Try without cahce --- .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 fcafcf357..3f8f2ae82 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -70,7 +70,7 @@ jobs: run: | set +e #aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=${{ steps.version_check.outputs.VERSION }} - docker pull ${{ steps.version_check.outputs.CONTAINER_TAG }} + #docker pull ${{ steps.version_check.outputs.CONTAINER_TAG }} echo "EC=254" >> $GITHUB_ENV #echo "EC=$?" >> $GITHUB_ENV - name: Set up Docker Buildx @@ -84,8 +84,8 @@ jobs: tags: "${{ steps.version_check.outputs.CONTAINER_TAG }}-dev" context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' - cache-from: type=gha - cache-to: type=gha + #cache-from: type=gha + #cache-to: type=gha build-args: | BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} From a0d6624d8874221facbb347c061eb3c0ec949018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 10 Dec 2024 11:40:58 +0100 Subject: [PATCH 184/210] set +e --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3f8f2ae82..97b4c39ea 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -217,6 +217,7 @@ jobs: - name: Check if executable exist shell: bash run: | + set +e aws s3 ls "${{ env.OUT_FOLDER }}/latest.yml" EC=$? echo $EC From 769709c425aaeb09d3779a1c7677892bcc4ff719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 10 Dec 2024 15:00:22 +0100 Subject: [PATCH 185/210] Cache mode = max --- .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 97b4c39ea..4f2dda076 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -84,8 +84,8 @@ jobs: tags: "${{ steps.version_check.outputs.CONTAINER_TAG }}-dev" context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' - #cache-from: type=gha - #cache-to: type=gha + cache-from: type=gha + cache-to: type=gha,mode=max build-args: | BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} From 4b5248195fe586aadc5a4490a34db29e04bab068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 10 Dec 2024 15:19:44 +0100 Subject: [PATCH 186/210] build new ci image --- .github/workflows/release.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4f2dda076..d733dad82 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -223,8 +223,10 @@ jobs: echo $EC if [ $EC -eq 0 ]; then echo "$OUT_OBJECT already exist" + exit 1 elif [ $EC -ne 1 ]; then echo "Error: $EC" + exit 1 fi echo "EXIT_CODE=$EC" >> $GITHUB_ENV From 903c7ef752b8cc5c5e035e7a8594f60162ee4f17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 10 Dec 2024 15:20:49 +0100 Subject: [PATCH 187/210] build new ci image --- scripts/desktop-wallet-ci.Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/desktop-wallet-ci.Dockerfile b/scripts/desktop-wallet-ci.Dockerfile index ec4f0bf2c..bf8fbd798 100644 --- a/scripts/desktop-wallet-ci.Dockerfile +++ b/scripts/desktop-wallet-ci.Dockerfile @@ -12,7 +12,8 @@ RUN apt-get update && apt-get install -y \ libudev-dev \ libusb-1.0-0-dev \ rpm \ - awscli + awscli \ + sl RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh From 522e967ac3286d2d42a790d2122262a2b76a8184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 10 Dec 2024 15:28:03 +0100 Subject: [PATCH 188/210] Build new docker image --- .github/workflows/release.yaml | 2 +- scripts/desktop-wallet-ci.Dockerfile | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d733dad82..a0e9600fe 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -70,7 +70,7 @@ jobs: run: | set +e #aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=${{ steps.version_check.outputs.VERSION }} - #docker pull ${{ steps.version_check.outputs.CONTAINER_TAG }} + docker pull ${{ steps.version_check.outputs.CONTAINER_TAG }} echo "EC=254" >> $GITHUB_ENV #echo "EC=$?" >> $GITHUB_ENV - name: Set up Docker Buildx diff --git a/scripts/desktop-wallet-ci.Dockerfile b/scripts/desktop-wallet-ci.Dockerfile index bf8fbd798..4e2edcede 100644 --- a/scripts/desktop-wallet-ci.Dockerfile +++ b/scripts/desktop-wallet-ci.Dockerfile @@ -13,7 +13,8 @@ RUN apt-get update && apt-get install -y \ libusb-1.0-0-dev \ rpm \ awscli \ - sl + sl \ + sed RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh From 0e0fa311da2d5e7ea30240e566e2117498c02d5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 10 Dec 2024 15:32:39 +0100 Subject: [PATCH 189/210] No cache --- .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 a0e9600fe..de91f752e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -70,7 +70,7 @@ jobs: run: | set +e #aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=${{ steps.version_check.outputs.VERSION }} - docker pull ${{ steps.version_check.outputs.CONTAINER_TAG }} + #docker pull ${{ steps.version_check.outputs.CONTAINER_TAG }} echo "EC=254" >> $GITHUB_ENV #echo "EC=$?" >> $GITHUB_ENV - name: Set up Docker Buildx @@ -84,8 +84,8 @@ jobs: tags: "${{ steps.version_check.outputs.CONTAINER_TAG }}-dev" context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' - cache-from: type=gha - cache-to: type=gha,mode=max + #cache-from: type=gha + #cache-to: type=gha,mode=max build-args: | BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} From b4894ed4b6bafe1cc6c5346fd3ac05795d69da50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 10 Dec 2024 15:36:59 +0100 Subject: [PATCH 190/210] New docker image --- .github/workflows/release.yaml | 5 ++--- scripts/desktop-wallet-ci.Dockerfile | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index de91f752e..c694807a0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -70,7 +70,6 @@ jobs: run: | set +e #aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=${{ steps.version_check.outputs.VERSION }} - #docker pull ${{ steps.version_check.outputs.CONTAINER_TAG }} echo "EC=254" >> $GITHUB_ENV #echo "EC=$?" >> $GITHUB_ENV - name: Set up Docker Buildx @@ -84,8 +83,8 @@ jobs: tags: "${{ steps.version_check.outputs.CONTAINER_TAG }}-dev" context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' - #cache-from: type=gha - #cache-to: type=gha,mode=max + cache-from: type=gha + cache-to: type=gha,mode=max build-args: | BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} diff --git a/scripts/desktop-wallet-ci.Dockerfile b/scripts/desktop-wallet-ci.Dockerfile index 4e2edcede..884b1e202 100644 --- a/scripts/desktop-wallet-ci.Dockerfile +++ b/scripts/desktop-wallet-ci.Dockerfile @@ -12,9 +12,7 @@ RUN apt-get update && apt-get install -y \ libudev-dev \ libusb-1.0-0-dev \ rpm \ - awscli \ - sl \ - sed + awscli RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh @@ -25,4 +23,6 @@ RUN . $NVM_DIR/nvm.sh \ && npm install --global yarn \ && nvm use ${NODE_VERSION} +RUN echo "new thing" + ENV PATH=$NVM_DIR/versions/node/v${NODE_VERSION}/bin:${PATH} From 1e798e062dac7c7afba2e2c38797d577ba53d819 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 10 Dec 2024 15:38:47 +0100 Subject: [PATCH 191/210] Test new docker image --- scripts/desktop-wallet-ci.Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/desktop-wallet-ci.Dockerfile b/scripts/desktop-wallet-ci.Dockerfile index 884b1e202..fe0eb939d 100644 --- a/scripts/desktop-wallet-ci.Dockerfile +++ b/scripts/desktop-wallet-ci.Dockerfile @@ -24,5 +24,6 @@ RUN . $NVM_DIR/nvm.sh \ && nvm use ${NODE_VERSION} RUN echo "new thing" +RUN echo "Another new thing" ENV PATH=$NVM_DIR/versions/node/v${NODE_VERSION}/bin:${PATH} From 5dc4090b9702c34c79e045ba12768799c67fcccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 10 Dec 2024 15:40:52 +0100 Subject: [PATCH 192/210] Remove stuff --- scripts/desktop-wallet-ci.Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/desktop-wallet-ci.Dockerfile b/scripts/desktop-wallet-ci.Dockerfile index fe0eb939d..ec4f0bf2c 100644 --- a/scripts/desktop-wallet-ci.Dockerfile +++ b/scripts/desktop-wallet-ci.Dockerfile @@ -23,7 +23,4 @@ RUN . $NVM_DIR/nvm.sh \ && npm install --global yarn \ && nvm use ${NODE_VERSION} -RUN echo "new thing" -RUN echo "Another new thing" - ENV PATH=$NVM_DIR/versions/node/v${NODE_VERSION}/bin:${PATH} From 506d1b4e052117c00ba36bdd419219b36622b4c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 10 Dec 2024 15:42:22 +0100 Subject: [PATCH 193/210] Add echo to test cache --- scripts/desktop-wallet-ci.Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/desktop-wallet-ci.Dockerfile b/scripts/desktop-wallet-ci.Dockerfile index ec4f0bf2c..e2f875948 100644 --- a/scripts/desktop-wallet-ci.Dockerfile +++ b/scripts/desktop-wallet-ci.Dockerfile @@ -23,4 +23,6 @@ RUN . $NVM_DIR/nvm.sh \ && npm install --global yarn \ && nvm use ${NODE_VERSION} +RUN echo "Tester" + ENV PATH=$NVM_DIR/versions/node/v${NODE_VERSION}/bin:${PATH} From 8cab01c8736bb56538626ec80532471979dae8f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 10 Dec 2024 16:04:00 +0100 Subject: [PATCH 194/210] Remove echo again --- scripts/desktop-wallet-ci.Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/desktop-wallet-ci.Dockerfile b/scripts/desktop-wallet-ci.Dockerfile index e2f875948..ec4f0bf2c 100644 --- a/scripts/desktop-wallet-ci.Dockerfile +++ b/scripts/desktop-wallet-ci.Dockerfile @@ -23,6 +23,4 @@ RUN . $NVM_DIR/nvm.sh \ && npm install --global yarn \ && nvm use ${NODE_VERSION} -RUN echo "Tester" - ENV PATH=$NVM_DIR/versions/node/v${NODE_VERSION}/bin:${PATH} From d55ecc2927bf6773848d88e167d9d79331393246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Tue, 10 Dec 2024 16:04:55 +0100 Subject: [PATCH 195/210] Check existence of docker image --- .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 c694807a0..6784e7022 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -69,8 +69,8 @@ jobs: - name: Check if image exist run: | set +e - #aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=${{ steps.version_check.outputs.VERSION }} - echo "EC=254" >> $GITHUB_ENV #echo "EC=$?" >> $GITHUB_ENV + aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=${{ steps.version_check.outputs.VERSION }} + echo "EC=$?" >> $GITHUB_ENV - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 From 4eb47223849f2109f7d753ae28c01c2ed544b591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 11 Dec 2024 11:13:50 +0100 Subject: [PATCH 196/210] Get target net from tag instead of env var --- .github/workflows/release.yaml | 55 +++++++++++++++++----------------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6784e7022..0942b750b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,7 +9,6 @@ on: env: BASE_IMAGE_VERSION: "rust-1.74.1_ghc-9.6.4" - TARGET_NET: "mainnet" STATIC_NODE_BINARY_IMAGE_NAME: 'static-node-binaries' AWS_ROLE_TO_ASSUME: "arn:aws:iam::192549843005:role/github_concordium-desktop-wallet" S3_BUCKET: "s3://desktopwallet.concordium.com" @@ -29,6 +28,7 @@ jobs: secret_key: ${{ steps.login-ecr.outputs.docker_password_192549843005_dkr_ecr_eu_west_1_amazonaws_com }} CONTAINER_TAG: ${{ steps.version_check.outputs.CONTAINER_TAG }} VERSION: ${{ steps.version_check.outputs.VERSION }} + TARGET_NET: ${{ steps.target_net.outputs.TARGET_NET }} environment: release steps: - name: aws creds @@ -52,13 +52,26 @@ jobs: submodules: recursive ref: ${{ github.ref_name }} - - name: Check version + - name: Set target net if correctly formatted + id: target_net + env: + TAG: ${{ github.ref_name }} + run: | + TARGET_NET=${TAG%%/*} + if [ $TARGET_NET != "Stagenet" ] || [ $TARGET_NET != "Testnet" ] || [ $TARGET_NET =! "Mainnet" ]; then + echo "Tag does not contain target net" + exit 1 + fi + echo "TARGET_NET=$TARGET_NET" >> $GITHUB_OUTPUT + + + - name: Verify version id: version_check run: | # Extract version number VERSION=$(jq '.version' -r app/package.json) - TAG_VERSION=1.7.4 #${{ github.ref_name }} + TAG_VERSION=${{ github.ref_name }} if [ "$VERSION" != "$TAG_VERSION" ]; then echo "Tag version is not correct. Tag version: $TAG_VERSION version from package.json: $VERSION" exit 1 @@ -118,23 +131,16 @@ jobs: - name: Generate filename run: | set +e - TARGET_NET=${{env.TARGET_NET}} + TARGET_NET=${{ needs.login-aws.outputs.TARGET_NET}} VERSION=${{ needs.login-aws.outputs.VERSION }} - # Prepare filenames - if [ $TARGET_NET = "mainnet" ]; then - FILENAME="concordium-desktop-wallet-${{ needs.login-aws.outputs.VERSION }}" - else - FILENAME="concordium-desktop-wallet-${TARGET_NET}-${{ needs.login-aws.outputs.VERSION }}" - fi - OUT_FOLDER="${{ env.S3_BUCKET }}/test/${VERSION}/${TARGET_NET}" - echo "OUT_FOLDER=$OUT_FOLDER" >> $GITHUB_ENV - echo "FILENAME=$FILENAME" >> $GITHUB_ENV + OUT_FOLDER_PATH="${{ env.S3_BUCKET }}/${VERSION}/${TARGET_NET}" + echo "OUT_FOLDER_PATH=$OUT_FOLDER_PATH" >> $GITHUB_ENV - name: Check if Executable exist run: | set +e - aws s3 ls "${{ env.OUT_FOLDER }}/latest-linux.yml" + aws s3 ls "${{ env.OUT_FOLDER_PATH }}/latest-linux.yml" EC=$? if [ $EC -eq 0 ]; then echo ".deb file already exist" @@ -164,9 +170,9 @@ jobs: yarn package # Push to s3 - aws s3 cp --recursive release/ ${{ env.OUT_FOLDER }} --exclude linux-unpacked/* --exclude builder-debug.yml --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp --recursive release/ ${{ env.OUT_FOLDER_PATH }} --exclude linux-unpacked/* --exclude builder-debug.yml --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - #using windows-2019 to be able to use visual studio 2019, newer versions do not support older versions of node + #using windows-2019 to be able to use visual studio 2019, newer versions do not support older versions of node.js release-desktop-wallet-windows: runs-on: windows-2019 environment: release @@ -200,24 +206,17 @@ jobs: shell: bash run: | set +e - TARGET_NET=${{env.TARGET_NET}} + TARGET_NET=${{ needs.login-aws.outputs.TARGET_NET}} VERSION=${{ needs.login-aws.outputs.VERSION }} - - if [ $TARGET_NET = "mainnet" ]; then - FILENAME_EXE="concordium-desktop-wallet-${{ needs.login-aws.outputs.VERSION }}.exe" - else - FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${{ needs.login-aws.outputs.VERSION }}.exe" - fi - OUT_FOLDER="${{ env.S3_BUCKET }}/test/${VERSION}/${TARGET_NET}" - echo "OUT_FOLDER=$OUT_FOLDER" >> $GITHUB_ENV - echo "FILENAME=$FILENAME" >> $GITHUB_ENV + OUT_FOLDER_PATH="${{ env.S3_BUCKET }}/${VERSION}/${TARGET_NET}" + echo "OUT_FOLDER_PATH=$OUT_FOLDER_PATH" >> $GITHUB_ENV - name: Check if executable exist shell: bash run: | set +e - aws s3 ls "${{ env.OUT_FOLDER }}/latest.yml" + aws s3 ls "${{ env.OUT_FOLDER_PATH }}/latest.yml" EC=$? echo $EC if [ $EC -eq 0 ]; then @@ -249,4 +248,4 @@ jobs: yarn package-win-no-sign # Push - aws s3 cp --recursive release/ ${{ env.OUT_FOLDER }} --exclude win-unpacked/* --exclude builder-debug.yml --exclude *.blockmap --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + aws s3 cp --recursive release/ ${{ env.OUT_FOLDER_PATH }} --exclude win-unpacked/* --exclude builder-debug.yml --exclude *.blockmap --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers From 8c0c1bc61cd8f2485bd8268496186ca6893c5676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 11 Dec 2024 11:40:46 +0100 Subject: [PATCH 197/210] Set target net based on tag --- .github/workflows/release.yaml | 37 +++++++++++++--------------------- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0942b750b..fae4ebc94 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,8 +2,6 @@ name: Concordium desktop wallet release on: push: - branches: - - 'ekw/SRE-1001/release-desktop-wallet' tags: - '*/*.*.*' @@ -21,7 +19,7 @@ permissions: contents: read jobs: - login-aws: + build-ci-image: runs-on: ubuntu-latest outputs: access_key: ${{ steps.login-ecr.outputs.docker_username_192549843005_dkr_ecr_eu_west_1_amazonaws_com }} @@ -31,7 +29,7 @@ jobs: TARGET_NET: ${{ steps.target_net.outputs.TARGET_NET }} environment: release steps: - - name: aws creds + - name: Assume role uses: aws-actions/configure-aws-credentials@v4 id: creds with: @@ -78,22 +76,15 @@ jobs: fi echo "VERSION=$VERSION" >> $GITHUB_OUTPUT echo "CONTAINER_TAG=${{ env.ECR_REPO }}:$VERSION" >> $GITHUB_OUTPUT - - - name: Check if image exist - run: | - set +e - aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=${{ steps.version_check.outputs.VERSION }} - echo "EC=$?" >> $GITHUB_ENV - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: build ci image - if: ${{ env.EC == 254 }} uses: docker/build-push-action@v6 with: push: true - tags: "${{ steps.version_check.outputs.CONTAINER_TAG }}-dev" + tags: "${{ steps.version_check.outputs.CONTAINER_TAG }}" context: '.' file: 'scripts/desktop-wallet-ci.Dockerfile' cache-from: type=gha @@ -104,13 +95,13 @@ jobs: release-desktop-wallet-linux: environment: release - needs: login-aws + needs: build-ci-image runs-on: ubuntu-latest container: - image: "${{needs.login-aws.outputs.CONTAINER_TAG}}" + image: "${{needs.build-ci-image.outputs.CONTAINER_TAG}}" credentials: - username: ${{needs.login-aws.outputs.access_key}} - password: ${{needs.login-aws.outputs.secret_key}} + username: ${{needs.build-ci-image.outputs.access_key}} + password: ${{needs.build-ci-image.outputs.secret_key}} options: -u root steps: - name: Checkout repository @@ -128,11 +119,11 @@ jobs: role-session-name: ReleaseDesktopWalletSession mask-aws-account-id: false - - name: Generate filename + - name: Generate output folder run: | set +e - TARGET_NET=${{ needs.login-aws.outputs.TARGET_NET}} - VERSION=${{ needs.login-aws.outputs.VERSION }} + TARGET_NET=${{ needs.build-ci-image.outputs.TARGET_NET}} + VERSION=${{ needs.build-ci-image.outputs.VERSION }} OUT_FOLDER_PATH="${{ env.S3_BUCKET }}/${VERSION}/${TARGET_NET}" echo "OUT_FOLDER_PATH=$OUT_FOLDER_PATH" >> $GITHUB_ENV @@ -176,7 +167,7 @@ jobs: release-desktop-wallet-windows: runs-on: windows-2019 environment: release - needs: login-aws + needs: build-ci-image steps: - name: aws creds uses: aws-actions/configure-aws-credentials@v4 @@ -202,12 +193,12 @@ jobs: with: node-version: ${{ env.NODE_VERSION }} - - name: Generate filename + - name: Generate output folder shell: bash run: | set +e - TARGET_NET=${{ needs.login-aws.outputs.TARGET_NET}} - VERSION=${{ needs.login-aws.outputs.VERSION }} + TARGET_NET=${{ needs.build-ci-image.outputs.TARGET_NET}} + VERSION=${{ needs.build-ci-image.outputs.VERSION }} OUT_FOLDER_PATH="${{ env.S3_BUCKET }}/${VERSION}/${TARGET_NET}" echo "OUT_FOLDER_PATH=$OUT_FOLDER_PATH" >> $GITHUB_ENV From 3d78179ce15355ca0c81bad94760bb4da93a22af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Wed, 11 Dec 2024 15:12:01 +0100 Subject: [PATCH 198/210] Resolve comments --- .github/workflows/release.yaml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fae4ebc94..2dc6ae41c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,7 +3,9 @@ name: Concordium desktop wallet release on: push: tags: - - '*/*.*.*' + - 'desktop-wallet/*.*.*-stagenet' + - 'desktop-wallet/*.*.*-testnet' + - 'desktop-wallet/*.*.*-mainnet' env: BASE_IMAGE_VERSION: "rust-1.74.1_ghc-9.6.4" @@ -55,8 +57,8 @@ jobs: env: TAG: ${{ github.ref_name }} run: | - TARGET_NET=${TAG%%/*} - if [ $TARGET_NET != "Stagenet" ] || [ $TARGET_NET != "Testnet" ] || [ $TARGET_NET =! "Mainnet" ]; then + TARGET_NET=${TAG##desktop-wallet/*-} + if [ $TARGET_NET != "stagenet" ] || [ $TARGET_NET != "testnet" ] || [ $TARGET_NET =! "mainnet" ]; then echo "Tag does not contain target net" exit 1 fi @@ -137,10 +139,9 @@ jobs: echo ".deb file already exist" exit 1 elif [ $EC -ne 1 ]; then - echo "Error: $EC" + echo "::error:: $EC" exit 1 fi - echo "EXIT_CODE=$EC" >> $GITHUB_ENV - name: Output dependency versions run: | @@ -153,14 +154,12 @@ jobs: echo "::info:: wasm-pack version: $(wasm-pack --version)" - name: Build and publish - if: ${{ env.EXIT_CODE == 1 }} run: | set +e yarn yarn package - # Push to s3 aws s3 cp --recursive release/ ${{ env.OUT_FOLDER_PATH }} --exclude linux-unpacked/* --exclude builder-debug.yml --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers #using windows-2019 to be able to use visual studio 2019, newer versions do not support older versions of node.js @@ -214,10 +213,9 @@ jobs: echo "$OUT_OBJECT already exist" exit 1 elif [ $EC -ne 1 ]; then - echo "Error: $EC" + echo "::error:: $EC" exit 1 fi - echo "EXIT_CODE=$EC" >> $GITHUB_ENV - name: Output dependency versions shell: bash @@ -230,13 +228,9 @@ jobs: echo "::info:: wasm-pack version: $(wasm-pack --version)" - name: Build and push desktop wallet - if: ${{ env.EXIT_CODE == 1 }} shell: bash run: | yarn --network-timeout 1000000 - - # Build yarn package-win-no-sign - # Push aws s3 cp --recursive release/ ${{ env.OUT_FOLDER_PATH }} --exclude win-unpacked/* --exclude builder-debug.yml --exclude *.blockmap --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers From 623b88592af81d1c3ab71594ffed075fd21c0f1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 12 Dec 2024 09:49:17 +0100 Subject: [PATCH 199/210] print out ::error:: --- .github/workflows/release.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2dc6ae41c..9b5e3d883 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -59,7 +59,7 @@ jobs: run: | TARGET_NET=${TAG##desktop-wallet/*-} if [ $TARGET_NET != "stagenet" ] || [ $TARGET_NET != "testnet" ] || [ $TARGET_NET =! "mainnet" ]; then - echo "Tag does not contain target net" + ::error:: Tag does not contain target net" exit 1 fi echo "TARGET_NET=$TARGET_NET" >> $GITHUB_OUTPUT @@ -73,7 +73,7 @@ jobs: TAG_VERSION=${{ github.ref_name }} if [ "$VERSION" != "$TAG_VERSION" ]; then - echo "Tag version is not correct. Tag version: $TAG_VERSION version from package.json: $VERSION" + echo "::error:: Tag version is not correct. Tag version: $TAG_VERSION version from package.json: $VERSION" exit 1 fi echo "VERSION=$VERSION" >> $GITHUB_OUTPUT @@ -136,7 +136,7 @@ jobs: aws s3 ls "${{ env.OUT_FOLDER_PATH }}/latest-linux.yml" EC=$? if [ $EC -eq 0 ]; then - echo ".deb file already exist" + echo ::error:: file file already exist" exit 1 elif [ $EC -ne 1 ]; then echo "::error:: $EC" @@ -210,7 +210,7 @@ jobs: EC=$? echo $EC if [ $EC -eq 0 ]; then - echo "$OUT_OBJECT already exist" + echo "::error:: file already exist" exit 1 elif [ $EC -ne 1 ]; then echo "::error:: $EC" From 8e2f8cd1ccb477c5304bba1f49b0c479ee4628da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 13 Dec 2024 08:36:04 +0100 Subject: [PATCH 200/210] echo ::error:: --- .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 9b5e3d883..faf665b72 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -59,7 +59,7 @@ jobs: run: | TARGET_NET=${TAG##desktop-wallet/*-} if [ $TARGET_NET != "stagenet" ] || [ $TARGET_NET != "testnet" ] || [ $TARGET_NET =! "mainnet" ]; then - ::error:: Tag does not contain target net" + echo "::error:: Tag does not contain target net" exit 1 fi echo "TARGET_NET=$TARGET_NET" >> $GITHUB_OUTPUT From 8e9479f98c16a04fe1bd078e22e0b3a97e00a1b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 13 Dec 2024 08:47:51 +0100 Subject: [PATCH 201/210] Test tag --- .github/workflows/release.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index faf665b72..8713dc213 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -55,7 +55,7 @@ jobs: - name: Set target net if correctly formatted id: target_net env: - TAG: ${{ github.ref_name }} + TAG: 'desktop-wallet/1.7.4-stagenet' #${{ github.ref_name }} run: | TARGET_NET=${TAG##desktop-wallet/*-} if [ $TARGET_NET != "stagenet" ] || [ $TARGET_NET != "testnet" ] || [ $TARGET_NET =! "mainnet" ]; then @@ -67,17 +67,19 @@ jobs: - name: Verify version id: version_check + env: + TAG: 'desktop-wallet/1.7.4-stagenet' #${{ github.ref_name}} run: | # Extract version number VERSION=$(jq '.version' -r app/package.json) - TAG_VERSION=${{ github.ref_name }} + TAG_VERSION=${TAG##*/%%-*} if [ "$VERSION" != "$TAG_VERSION" ]; then echo "::error:: Tag version is not correct. Tag version: $TAG_VERSION version from package.json: $VERSION" exit 1 fi - echo "VERSION=$VERSION" >> $GITHUB_OUTPUT - echo "CONTAINER_TAG=${{ env.ECR_REPO }}:$VERSION" >> $GITHUB_OUTPUT + echo "VERSION=$VERSION-test" >> $GITHUB_OUTPUT + echo "CONTAINER_TAG=${{ env.ECR_REPO }}:$VERSION-test" >> $GITHUB_OUTPUT - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 From 6ce7c536d6929da0da73cbe36ebe7ded178a9827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 13 Dec 2024 08:48:47 +0100 Subject: [PATCH 202/210] Run workflow on branch push --- .github/workflows/release.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8713dc213..b374f140c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,6 +2,8 @@ name: Concordium desktop wallet release on: push: + branches: + - 'ekw/SRE-1001/release-desktop-wallet' tags: - 'desktop-wallet/*.*.*-stagenet' - 'desktop-wallet/*.*.*-testnet' From 64a5f6dd896750218c6bc200186b579eff444aba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 13 Dec 2024 08:52:32 +0100 Subject: [PATCH 203/210] Print out target net --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b374f140c..8c30aea85 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -60,6 +60,7 @@ jobs: TAG: 'desktop-wallet/1.7.4-stagenet' #${{ github.ref_name }} run: | TARGET_NET=${TAG##desktop-wallet/*-} + echo "$TARGET_NET" if [ $TARGET_NET != "stagenet" ] || [ $TARGET_NET != "testnet" ] || [ $TARGET_NET =! "mainnet" ]; then echo "::error:: Tag does not contain target net" exit 1 From 6c65d2ac3c0f779258f3c8cfc743241b3f176803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 13 Dec 2024 09:38:05 +0100 Subject: [PATCH 204/210] change format for if statement --- .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 8c30aea85..10dab941c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -61,7 +61,7 @@ jobs: run: | TARGET_NET=${TAG##desktop-wallet/*-} echo "$TARGET_NET" - if [ $TARGET_NET != "stagenet" ] || [ $TARGET_NET != "testnet" ] || [ $TARGET_NET =! "mainnet" ]; then + if [ $TARGET_NET != "stagenet" || "testnet" || "mainnet" ]; then echo "::error:: Tag does not contain target net" exit 1 fi From 950410e9f642d51e0f1c4fd1cc63eaadb9277ee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 13 Dec 2024 09:41:12 +0100 Subject: [PATCH 205/210] change format for if statement --- .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 10dab941c..e5e9c7bd5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -61,7 +61,7 @@ jobs: run: | TARGET_NET=${TAG##desktop-wallet/*-} echo "$TARGET_NET" - if [ $TARGET_NET != "stagenet" || "testnet" || "mainnet" ]; then + if [[ $TARGET_NET != "stagenet" || "testnet" || "mainnet" ]]; then echo "::error:: Tag does not contain target net" exit 1 fi From 5efc9b056011b93ef184102ce04d52f93eaa25a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 13 Dec 2024 09:47:29 +0100 Subject: [PATCH 206/210] change format for if statement --- .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 e5e9c7bd5..3dbdd2d0c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -61,7 +61,7 @@ jobs: run: | TARGET_NET=${TAG##desktop-wallet/*-} echo "$TARGET_NET" - if [[ $TARGET_NET != "stagenet" || "testnet" || "mainnet" ]]; then + if [[ $TARGET_NET != "stagenet" ]] || [[ $TARGET_NET != "testnet" ]] || [[ $TARGET_NET != "mainnet" ]]; then echo "::error:: Tag does not contain target net" exit 1 fi @@ -76,7 +76,8 @@ jobs: # Extract version number VERSION=$(jq '.version' -r app/package.json) - TAG_VERSION=${TAG##*/%%-*} + TAG_VERSION_NET=${TAG##*/} + TAG_VERSION=${TAG_VERSION_NET%%-*} if [ "$VERSION" != "$TAG_VERSION" ]; then echo "::error:: Tag version is not correct. Tag version: $TAG_VERSION version from package.json: $VERSION" exit 1 From a6f7cd23c3c0cd6f860ef67e21875949e3fbb714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 13 Dec 2024 09:48:38 +0100 Subject: [PATCH 207/210] Use and instead of or --- .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 3dbdd2d0c..f194f804e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -61,7 +61,7 @@ jobs: run: | TARGET_NET=${TAG##desktop-wallet/*-} echo "$TARGET_NET" - if [[ $TARGET_NET != "stagenet" ]] || [[ $TARGET_NET != "testnet" ]] || [[ $TARGET_NET != "mainnet" ]]; then + if [[ $TARGET_NET != "stagenet" ]] && [[ $TARGET_NET != "testnet" ]] && [[ $TARGET_NET != "mainnet" ]]; then echo "::error:: Tag does not contain target net" exit 1 fi From f893115ea0a8f2721ad4b18cce62cf9e294b0cb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 13 Dec 2024 09:53:12 +0100 Subject: [PATCH 208/210] Add start quote --- .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 f194f804e..423088b11 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -142,7 +142,7 @@ jobs: aws s3 ls "${{ env.OUT_FOLDER_PATH }}/latest-linux.yml" EC=$? if [ $EC -eq 0 ]; then - echo ::error:: file file already exist" + echo "::error:: file file already exist" exit 1 elif [ $EC -ne 1 ]; then echo "::error:: $EC" From 981b93d2cee5dbf0293dabed2d13e0d3897a031b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 13 Dec 2024 10:53:08 +0100 Subject: [PATCH 209/210] check if docker image exist --- .github/workflows/release.yaml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 423088b11..367c6288f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -82,6 +82,9 @@ jobs: echo "::error:: Tag version is not correct. Tag version: $TAG_VERSION version from package.json: $VERSION" exit 1 fi + aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=$VERSION-test + EC=$? + echo "EXIT_CODE=$EC" >> $GITHUB_ENV echo "VERSION=$VERSION-test" >> $GITHUB_OUTPUT echo "CONTAINER_TAG=${{ env.ECR_REPO }}:$VERSION-test" >> $GITHUB_OUTPUT @@ -89,6 +92,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: build ci image + if: ${{ env.EXIT_CODE == 254 }} uses: docker/build-push-action@v6 with: push: true @@ -152,12 +156,12 @@ jobs: - name: Output dependency versions run: | rustup default stable - echo "::info:: node version: $(node --version)" - echo "::info:: npm version: $(npm --version)" - echo "::info:: yarn version: $(yarn --version)" - echo "::info:: python version: $(python --version)" - echo "::info:: rustup version: $(rustup show)" - echo "::info:: wasm-pack version: $(wasm-pack --version)" + echo "::notice::node version: $(node --version)" + echo "::notice::npm version: $(npm --version)" + echo "::notice::yarn version: $(yarn --version)" + echo "::notice::python version: $(python --version)" + echo "::notice::rustup version: $(rustup show)" + echo "::notice::wasm-pack version: $(wasm-pack --version)" - name: Build and publish run: | @@ -226,12 +230,12 @@ jobs: - name: Output dependency versions shell: bash run: | - echo "::info:: node version: $(node --version)" - echo "::info:: npm version: $(npm --version)" - echo "::info:: yarn version: $(yarn --version)" - echo "::info:: python version: $(python --version)" - echo "::info:: rustup version: $(rustup show)" - echo "::info:: wasm-pack version: $(wasm-pack --version)" + echo "::notice::node version: $(node --version)" + echo "::notice::npm version: $(npm --version)" + echo "::notice::yarn version: $(yarn --version)" + echo "::notice::python version: $(python --version)" + echo "::notice::rustup version: $(rustup show)" + echo "::notice::wasm-pack version: $(wasm-pack --version)" - name: Build and push desktop wallet shell: bash From 2795017625aa4b989c6e1068da74407b1626cfa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Fri, 13 Dec 2024 13:13:16 +0100 Subject: [PATCH 210/210] Remove hardcoded test values --- .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 367c6288f..969f88a32 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,8 +2,6 @@ name: Concordium desktop wallet release on: push: - branches: - - 'ekw/SRE-1001/release-desktop-wallet' tags: - 'desktop-wallet/*.*.*-stagenet' - 'desktop-wallet/*.*.*-testnet' @@ -57,7 +55,7 @@ jobs: - name: Set target net if correctly formatted id: target_net env: - TAG: 'desktop-wallet/1.7.4-stagenet' #${{ github.ref_name }} + TAG: ${{ github.ref_name }} run: | TARGET_NET=${TAG##desktop-wallet/*-} echo "$TARGET_NET" @@ -71,7 +69,7 @@ jobs: - name: Verify version id: version_check env: - TAG: 'desktop-wallet/1.7.4-stagenet' #${{ github.ref_name}} + TAG: ${{ github.ref_name}} run: | # Extract version number VERSION=$(jq '.version' -r app/package.json) @@ -82,11 +80,11 @@ jobs: echo "::error:: Tag version is not correct. Tag version: $TAG_VERSION version from package.json: $VERSION" exit 1 fi - aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=$VERSION-test + aws ecr describe-images --registry-id "192549843005" --repository-name "concordium/desktop-wallet-ci" --region eu-west-1 --image-ids=imageTag=$VERSION EC=$? echo "EXIT_CODE=$EC" >> $GITHUB_ENV - echo "VERSION=$VERSION-test" >> $GITHUB_OUTPUT - echo "CONTAINER_TAG=${{ env.ECR_REPO }}:$VERSION-test" >> $GITHUB_OUTPUT + echo "VERSION=$VERSION" >> $GITHUB_OUTPUT + echo "CONTAINER_TAG=${{ env.ECR_REPO }}:$VERSION" >> $GITHUB_OUTPUT - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3