-
Notifications
You must be signed in to change notification settings - Fork 15
85 lines (78 loc) · 3.31 KB
/
Copy pathdeploy-dev.yml
File metadata and controls
85 lines (78 loc) · 3.31 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
81
82
83
84
85
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@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- name: Set outputs
id: set-outputs
env:
PR_HTML_URL: ${{ github.event.pull_request.html_url }}
PR_NUMBER: ${{ github.event.pull_request.number }}
SERVER_URL: ${{ github.server_url }}
ACTOR: ${{ github.actor }}
run: echo "trigger_source=PR <${PR_HTML_URL}|#${PR_NUMBER}> merged by <${SERVER_URL}/${ACTOR}|${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 }}