-
Notifications
You must be signed in to change notification settings - Fork 9
80 lines (73 loc) · 3.2 KB
/
deploy-dev.yml
File metadata and controls
80 lines (73 loc) · 3.2 KB
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
name: Deploy to Development Environment
on:
workflow_dispatch:
pull_request:
branches: ['develop']
types:
- closed
concurrency:
group: ${{ github.workflow }}-develop
cancel-in-progress: true
jobs:
get-deploy-inputs:
name: Get Deploy Inputs
runs-on: [self-hosted, Linux, X64]
outputs:
trigger_source: ${{ steps.set-outputs.outputs.trigger_source }}
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
with:
egress-policy: audit
- name: Set outputs
id: set-outputs
run: echo "trigger_source=${{ format('PR <{0}|#{1}> merged by <{2}|{3}>', github.event.pull_request.html_url, github.event.pull_request.number, format('{0}/{1}', github.server_url, github.actor), github.actor) }}" >> $GITHUB_OUTPUT
deploy:
name: Deploy to Development Environment
needs: [get-deploy-inputs]
if: github.event.pull_request.merged == true
uses: ./.github/workflows/deploy.yml
with:
environment: 'development'
bugsnag_release_stage: 'development'
s3_dir_path: 'dev/latest/v3'
s3_dir_path_legacy: 'dev/latest/v1.1'
base_cdn_url: 'https://cdn.dev.rudderlabs.com'
trigger_source: ${{ needs.get-deploy-inputs.outputs.trigger_source }}
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_DEV_ACCOUNT_ID }}
AWS_S3_BUCKET_NAME: ${{ secrets.AWS_DEV_S3_BUCKET_NAME }}
AWS_S3_SYNC_ROLE: ${{ secrets.AWS_DEV_S3_SYNC_ROLE }}
AWS_CF_DISTRIBUTION_ID: ${{ secrets.AWS_DEV_CF_DISTRIBUTION_ID }}
BUGSNAG_API_KEY: ${{ secrets.RS_DEV_BUGSNAG_API_KEY }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_RELEASE_CHANNEL_ID: ${{ secrets.SLACK_RELEASE_CHANNEL_ID_NON_PROD }}
deploy-sanity-suite:
name: Deploy sanity suite
if: github.event.pull_request.merged == true
needs: [get-deploy-inputs]
uses: ./.github/workflows/deploy-sanity-suite.yml
with:
environment: 'development'
trigger_source: ${{ needs.get-deploy-inputs.outputs.trigger_source }}
base_cdn_url: 'https://cdn.dev.rudderlabs.com'
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_DEV_ACCOUNT_ID }}
AWS_S3_BUCKET_NAME: ${{ secrets.AWS_DEV_S3_BUCKET_NAME }}
AWS_S3_SYNC_ROLE: ${{ secrets.AWS_DEV_S3_SYNC_ROLE }}
AWS_CF_DISTRIBUTION_ID: ${{ secrets.AWS_DEV_CF_DISTRIBUTION_ID }}
SANITY_SUITE_WRITE_KEY: ${{ secrets.SANITY_SUITE_DEV_WRITE_KEY }}
SANITY_SUITE_DATAPLANE_URL: ${{ secrets.SANITY_SUITE_DEV_DATAPLANE_URL }}
SANITY_SUITE_CONFIG_SERVER_HOST: ${{ secrets.SANITY_SUITE_DEV_CONFIG_SERVER_HOST }}
BUGSNAG_API_KEY: ${{ secrets.RS_DEV_BUGSNAG_API_KEY }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_RELEASE_CHANNEL_ID: ${{ secrets.SLACK_RELEASE_CHANNEL_ID_NON_PROD }}
run-e2e-regression-test-suites:
uses: ./.github/workflows/run-e2e-regression-test-suites.yml
name: Run E2E Regression Test Suites
needs: [get-deploy-inputs, deploy-sanity-suite, deploy]
with:
environment: development
trigger_source: ${{ needs.get-deploy-inputs.outputs.trigger_source }}
secrets:
RELEASE_PRIVATE_KEY: ${{ secrets.RELEASE_PRIVATE_KEY }}