-
Notifications
You must be signed in to change notification settings - Fork 26
107 lines (101 loc) · 4.78 KB
/
test-rc-release.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
---
name: Test providers RC releases
on: # yamllint disable-line rule:truthy
schedule:
- cron: "0 0,12 * * *"
workflow_dispatch:
inputs:
rc_testing_branch:
# If a branch is given, the workflow will use it for deployment and testing.
# If no branch is provided, the workflow will create a new rc testing branch
# for deployment and testing.
description: |
rc_testing_branch: existing testing branch
(Either rc_testing_branch or issue_url is required, and you cannot give both.)
required: false
default: ''
issue_url:
description: |
issue_url: the GitHub issue URL that tracks the status of Providers release
(Either rc_testing_branch or issue_url is required, and you cannot give both.)
required: false
base_git_rev:
description: 'The base git revision to test Providers RCs'
required: false
type: string
default: 'main'
jobs:
check-airflow-provider-rc-release:
uses: ./.github/workflows/reuse-wf-check-rc-release.yaml
with:
rc_testing_branch: ${{ inputs.rc_testing_branch }}
issue_url: ${{ inputs.issue_url }}
base_git_rev: ${{ inputs.base_git_rev }}
git_email: "airflow-oss-bot@astronomer.io"
git_username: "airflow-oss-bot"
secrets:
BOT_ACCESS_TOKEN: ${{ secrets.BOT_ACCESS_TOKEN }}
deploy-rc-testing-branch-to-astro-cloud:
needs: check-airflow-provider-rc-release
if: |
always() &&
needs.check-airflow-provider-rc-release.result == 'success'
uses: ./.github/workflows/reuse-wf-deploy-to-astro-cloud.yaml
with:
git_rev: ${{ needs.check-airflow-provider-rc-release.outputs.rc_testing_branch }}
environment_to_deploy: 'providers-integration-tests'
secrets:
docker_registry: ${{ secrets.DOCKER_REGISTRY }}
organization_id: ${{ secrets.ORGANIZATION_ID }}
deployment_id: ${{ secrets.PROVIDER_INTEGRATION_TESTS_DEPLOYMENT_ID }}
astronomer_key_id: ${{ secrets.PROVIDER_INTEGRATION_TESTS_ASTRONOMER_KEY_ID }}
astronomer_key_secret: ${{ secrets.PROVIDER_INTEGRATION_TESTS_ASTRONOMER_KEY_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
wait-for-deployment-to-be-ready-and-trigger-master-dag:
needs: [deploy-rc-testing-branch-to-astro-cloud, check-airflow-provider-rc-release]
if: |
always() &&
needs.deploy-rc-testing-branch-to-astro-cloud.result == 'success'
uses: ./.github/workflows/reuse-wf-trigger-dag.yaml
with:
git_rev: ${{ needs.check-airflow-provider-rc-release.outputs.rc_testing_branch }}
dags_to_trigger_after_deployment: "example_master_dag"
secrets:
astro_subdomain: ${{ secrets.ASTRO_SUBDOMAIN }}
deployment_id: ${{ secrets.PROVIDER_INTEGRATION_TESTS_DEPLOYMENT_ID }}
astronomer_key_id: ${{ secrets.PROVIDER_INTEGRATION_TESTS_ASTRONOMER_KEY_ID }}
astronomer_key_secret: ${{ secrets.PROVIDER_INTEGRATION_TESTS_ASTRONOMER_KEY_SECRET }}
organization_id: ${{ secrets.ORGANIZATION_ID }}
bearer_token: ${{ secrets.BEARER_TOKEN }}
deploy-rc-testing-branch-to-astro-cloud-on-GCP:
needs: check-airflow-provider-rc-release
if: |
always() &&
needs.check-airflow-provider-rc-release.result == 'success'
uses: ./.github/workflows/reuse-wf-deploy-to-astro-cloud.yaml
with:
git_rev: ${{ needs.check-airflow-provider-rc-release.outputs.rc_testing_branch }}
environment_to_deploy: 'providers-integration-tests'
secrets:
docker_registry: ${{ secrets.DOCKER_REGISTRY }}
organization_id: ${{ secrets.ORGANIZATION_ID }}
deployment_id: ${{ secrets.PROVIDER_INTEGRATION_TESTS_GCP_DEPLOYMENT_ID }}
astronomer_key_id: ${{ secrets.PROVIDER_INTEGRATION_TESTS_GCP_ASTRONOMER_KEY_ID }}
astronomer_key_secret: ${{ secrets.PROVIDER_INTEGRATION_TESTS_GCP_ASTRONOMER_KEY_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
wait-for-deployment-to-be-ready-and-trigger-master-dag-on-GCP:
needs: [deploy-rc-testing-branch-to-astro-cloud, check-airflow-provider-rc-release]
if: |
always() &&
needs.deploy-rc-testing-branch-to-astro-cloud.result == 'success'
uses: ./.github/workflows/reuse-wf-trigger-dag.yaml
with:
git_rev: ${{ needs.check-airflow-provider-rc-release.outputs.rc_testing_branch }}
dags_to_trigger_after_deployment: "example_master_dag"
secrets:
astro_subdomain: ${{ secrets.ASTRO_SUBDOMAIN }}
deployment_id: ${{ secrets.PROVIDER_INTEGRATION_TESTS_GCP_DEPLOYMENT_ID }}
astronomer_key_id: ${{ secrets.PROVIDER_INTEGRATION_TESTS_GCP_ASTRONOMER_KEY_ID }}
astronomer_key_secret: ${{ secrets.PROVIDER_INTEGRATION_TESTS_GCP_ASTRONOMER_KEY_SECRET }}
organization_id: ${{ secrets.ORGANIZATION_ID }}
bearer_token: ${{ secrets.BEARER_TOKEN }}