-
Notifications
You must be signed in to change notification settings - Fork 18
92 lines (90 loc) · 3.26 KB
/
deploy-and-smoke-test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Deploy And SmokeTests
on:
push:
branches:
- develop
jobs:
cancel_running_workflows:
name: Cancel running workflows
runs-on: ubuntu-22.04
steps:
- name: cancel running workflows
uses: RDXWorks-actions/cancel-workflow-action@main
with:
access_token: ${{ github.token }}
deploy:
permissions:
id-token: write
contents: read
name: Deploy to Gilganet
runs-on: ubuntu-22.04
steps:
- uses: RDXWorks-actions/checkout@main
with:
# Shallow clones should be disabled for a better relevancy of analysis
fetch-depth: 0
- uses: ./.github/actions/fetch-secrets
with:
role_name: "${{ secrets.BABYLON_SECRETS_ROLE_ARN }}"
app_name: "babylon-node"
step_name: "deploy"
secret_prefix: "JENKINS"
secret_name: "github-actions/radixdlt/babylon-node/jenkins-api-token"
parse_json: true
- name: Connect to tailnet
uses: radixdlt/public-iac-resuable-artifacts/tailnet@main
with:
role_name: "arn:aws:iam::${{ secrets.SECRETS_ACCOUNT_ID }}:role/gh-common-secrets-read-access"
region: "eu-west-2"
secret_name: "arn:aws:secretsmanager:eu-west-2:${{ secrets.SECRETS_ACCOUNT_ID }}:secret:github-actions/common/tailscale-public-workflows-DpiE80"
- name: Deploy
uses: RDXWorks-actions/jenkins-job-trigger-action@master
with:
jenkins_url: "${{ env.JENKINS_URL }}"
jenkins_user: ${{ env.JENKINS_USER }}
jenkins_token: ${{ env.JENKINS_TOKEN }}
job_name: "v2-jobs/job/babylon-deploy-main"
job_params: |
{
"NETWORK_NAME":"gilganet",
"FEATURE_BRANCH_NAME":"develop",
"WIPE_LEDGER":true
}
job_timeout: "3600"
smoke_test:
permissions:
id-token: write
contents: read
needs:
- deploy
name: Run smoke tests
runs-on: ubuntu-22.04
steps:
- uses: RDXWorks-actions/checkout@main
with:
# Shallow clones should be disabled for a better relevancy of analysis
fetch-depth: 0
- uses: ./.github/actions/fetch-secrets
with:
role_name: "${{ secrets.BABYLON_SECRETS_ROLE_ARN }}"
app_name: "babylon-node"
step_name: "smoke_test"
secret_prefix: "JENKINS"
secret_name: "github-actions/radixdlt/babylon-node/jenkins-api-token"
parse_json: true
- name: Connect to tailnet
uses: radixdlt/public-iac-resuable-artifacts/tailnet@main
with:
role_name: "arn:aws:iam::${{ secrets.SECRETS_ACCOUNT_ID }}:role/gh-common-secrets-read-access"
region: "eu-west-2"
secret_name: "arn:aws:secretsmanager:eu-west-2:${{ secrets.SECRETS_ACCOUNT_ID }}:secret:github-actions/common/tailscale-public-workflows-DpiE80"
- name: SmokeTests
uses: RDXWorks-actions/jenkins-job-trigger-action@master
with:
jenkins_url: "${{ env.JENKINS_URL }}"
jenkins_user: ${{ env.JENKINS_USER }}
jenkins_token: ${{ env.JENKINS_TOKEN }}
job_name: "v2-jobs/job/babylon-testnet-smoke-tests"
job_params: |
{"networkName":"gilganet"}
job_timeout: "3600"