From d71e4c9afe00232ca2b9fe70776b76430b4be1ea Mon Sep 17 00:00:00 2001 From: David Ugbero Date: Wed, 14 Feb 2024 09:41:42 +0000 Subject: [PATCH 1/7] feat: onboard cicd for boltz testnet --- .github/workflows/deploy.boltz.testnet.yml | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/deploy.boltz.testnet.yml diff --git a/.github/workflows/deploy.boltz.testnet.yml b/.github/workflows/deploy.boltz.testnet.yml new file mode 100644 index 0000000..df8224e --- /dev/null +++ b/.github/workflows/deploy.boltz.testnet.yml @@ -0,0 +1,34 @@ +--- +name: CD for Boltz Testnet + +on: + push: + tags: + - '**beta-boltz-testnet**' + +jobs: + deploy-testnet: + runs-on: ubuntu-latest + environment: + name: Boltz-Testnet + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.BOLTZ_TESTNET_AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.BOLTZ_TESTNET_AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.BOLTZ_TESTNET_AWS_REGION }} + + - name: Deploy rif-relay-server on TESTNET + run: | + aws ssm send-command \ + --document-name "AWS-RunRemoteScript" \ + --instance-ids ""${{ secrets.BOLTZ_TESTNET_EC2_ID }}"" \ + --region=${{ secrets.BOLTZ_TESTNET_AWS_REGION }} \ + --parameters '{"sourceType":["GitHub"],"sourceInfo":["{\"owner\":\"rootstock\", \"repository\":\"ask-devops\", \"path\": \"rif-relay/\", \"tokenInfo\":\"{{ssm-secure:github-token}}\"}"],"commandLine":["deploy-testnet.sh"]}' From d3514f3d79e4ef38354c2d73f2c1568fbc1072ff Mon Sep 17 00:00:00 2001 From: David Ugbero Date: Wed, 14 Feb 2024 09:43:06 +0000 Subject: [PATCH 2/7] fix: small change --- .github/workflows/deploy.boltz.testnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.boltz.testnet.yml b/.github/workflows/deploy.boltz.testnet.yml index df8224e..106fdb7 100644 --- a/.github/workflows/deploy.boltz.testnet.yml +++ b/.github/workflows/deploy.boltz.testnet.yml @@ -25,7 +25,7 @@ jobs: aws-secret-access-key: ${{ secrets.BOLTZ_TESTNET_AWS_SECRET_ACCESS_KEY }} aws-region: ${{ secrets.BOLTZ_TESTNET_AWS_REGION }} - - name: Deploy rif-relay-server on TESTNET + - name: Deploy rif-relay-server on Boltz Testnet run: | aws ssm send-command \ --document-name "AWS-RunRemoteScript" \ From e399d8e064a53fcbcb872f9b4fc4fa27f2b6ca24 Mon Sep 17 00:00:00 2001 From: David Ugbero Date: Wed, 14 Feb 2024 09:51:20 +0000 Subject: [PATCH 3/7] fix: for debug, push on this branch --- .github/workflows/deploy.boltz.testnet.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.boltz.testnet.yml b/.github/workflows/deploy.boltz.testnet.yml index 106fdb7..ff62e85 100644 --- a/.github/workflows/deploy.boltz.testnet.yml +++ b/.github/workflows/deploy.boltz.testnet.yml @@ -4,7 +4,9 @@ name: CD for Boltz Testnet on: push: tags: - - '**beta-boltz-testnet**' + - '**beta-boltz**' + branches: [ DEVOPS-1891/add-ci-for-boltz ] + jobs: deploy-testnet: From 54cecf8f42db3e6a3c77e445260ea9ffe503dcc0 Mon Sep 17 00:00:00 2001 From: David Ugbero Date: Wed, 14 Feb 2024 10:37:49 +0000 Subject: [PATCH 4/7] fix: modify deploy job name --- .github/workflows/deploy.boltz.testnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.boltz.testnet.yml b/.github/workflows/deploy.boltz.testnet.yml index ff62e85..fb24065 100644 --- a/.github/workflows/deploy.boltz.testnet.yml +++ b/.github/workflows/deploy.boltz.testnet.yml @@ -9,7 +9,7 @@ on: jobs: - deploy-testnet: + deploy-boltz-testnet: runs-on: ubuntu-latest environment: name: Boltz-Testnet From cd7f17931f6ccb8b0ccb61acd6c31f1834a57916 Mon Sep 17 00:00:00 2001 From: David Ugbero Date: Wed, 14 Feb 2024 11:23:30 +0000 Subject: [PATCH 5/7] fix: debug aws region field --- .github/workflows/deploy.boltz.testnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.boltz.testnet.yml b/.github/workflows/deploy.boltz.testnet.yml index fb24065..9cc2c5b 100644 --- a/.github/workflows/deploy.boltz.testnet.yml +++ b/.github/workflows/deploy.boltz.testnet.yml @@ -25,12 +25,12 @@ jobs: with: aws-access-key-id: ${{ secrets.BOLTZ_TESTNET_AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.BOLTZ_TESTNET_AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ secrets.BOLTZ_TESTNET_AWS_REGION }} + aws-region: "us-west-2" - name: Deploy rif-relay-server on Boltz Testnet run: | aws ssm send-command \ --document-name "AWS-RunRemoteScript" \ --instance-ids ""${{ secrets.BOLTZ_TESTNET_EC2_ID }}"" \ - --region=${{ secrets.BOLTZ_TESTNET_AWS_REGION }} \ + --region="us-west-2" \ --parameters '{"sourceType":["GitHub"],"sourceInfo":["{\"owner\":\"rootstock\", \"repository\":\"ask-devops\", \"path\": \"rif-relay/\", \"tokenInfo\":\"{{ssm-secure:github-token}}\"}"],"commandLine":["deploy-testnet.sh"]}' From 3925197c3ee02d2c695e61c72e0f2b385843b305 Mon Sep 17 00:00:00 2001 From: David Ugbero Date: Wed, 14 Feb 2024 12:54:04 +0000 Subject: [PATCH 6/7] fix: revert hard region --- .github/workflows/deploy.boltz.testnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.boltz.testnet.yml b/.github/workflows/deploy.boltz.testnet.yml index 9cc2c5b..6065175 100644 --- a/.github/workflows/deploy.boltz.testnet.yml +++ b/.github/workflows/deploy.boltz.testnet.yml @@ -25,12 +25,12 @@ jobs: with: aws-access-key-id: ${{ secrets.BOLTZ_TESTNET_AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.BOLTZ_TESTNET_AWS_SECRET_ACCESS_KEY }} - aws-region: "us-west-2" + aws-region: "${{ secrets.BOLTZ_TESTNET_AWS_REGION }}" - name: Deploy rif-relay-server on Boltz Testnet run: | aws ssm send-command \ --document-name "AWS-RunRemoteScript" \ --instance-ids ""${{ secrets.BOLTZ_TESTNET_EC2_ID }}"" \ - --region="us-west-2" \ + --region=${{ secrets.BOLTZ_TESTNET_AWS_REGION }} \ --parameters '{"sourceType":["GitHub"],"sourceInfo":["{\"owner\":\"rootstock\", \"repository\":\"ask-devops\", \"path\": \"rif-relay/\", \"tokenInfo\":\"{{ssm-secure:github-token}}\"}"],"commandLine":["deploy-testnet.sh"]}' From 2a486da0634e07c5a5ea2ca4d6ef12a7c3e7ac29 Mon Sep 17 00:00:00 2001 From: David Ugbero Date: Wed, 14 Feb 2024 12:54:33 +0000 Subject: [PATCH 7/7] fix: only run on specified tag --- .github/workflows/deploy.boltz.testnet.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy.boltz.testnet.yml b/.github/workflows/deploy.boltz.testnet.yml index 6065175..2dbc931 100644 --- a/.github/workflows/deploy.boltz.testnet.yml +++ b/.github/workflows/deploy.boltz.testnet.yml @@ -5,7 +5,6 @@ on: push: tags: - '**beta-boltz**' - branches: [ DEVOPS-1891/add-ci-for-boltz ] jobs: