Skip to content

Commit

Permalink
ci(github-actions): merge wait for deployment and trigger master dag …
Browse files Browse the repository at this point in the history
…job into the same job but different step

Split them into different job will need to wasting additional resources on spinning up another runner
and there's no good reason to do so as of now
  • Loading branch information
Lee-W committed May 24, 2023
1 parent ed5b8d8 commit c628cd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/deploy-integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
astronomer_key_secret: ${{ secrets.PROVIDER_INTEGRATION_TESTS_ASTRONOMER_KEY_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

wait-for-providers-integration-tests-to-be-ready:
wait-for-deployment-to-be-ready-and-trigger-master-dag-for-providers-integration-tests:
if: github.event_name == 'schedule'
needs: deploy-to-providers-integration-tests
runs-on: 'ubuntu-20.04'
Expand All @@ -48,11 +48,6 @@ jobs:
echo "allowing the deployed image to be updated across all Airflow components.."
sleep 1800
trigger-providers-integration-tests-master-dag:
if: github.event_name == 'schedule'
needs: wait-for-providers-integration-tests-to-be-ready
runs-on: 'ubuntu-20.04'
steps:
- name: checkout
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -81,7 +76,7 @@ jobs:
astronomer_key_secret: ${{ secrets.PROVIDER_INTEGRATION_TESTS_ON_KE_ASTRONOMER_KEY_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

wait-for-providers-integration-tests-on-KE-to-be-ready:
wait-for-deployment-to-be-ready-and-trigger-master-dag-for-providers-integration-tests-on-KE:
if: github.event_name == 'schedule'
needs: deploy-to-providers-integration-tests-on-KE
runs-on: 'ubuntu-20.04'
Expand All @@ -100,11 +95,6 @@ jobs:
echo "allowing the deployed image to be updated across all Airflow components.."
sleep $sleep_time
trigger-providers-integration-tests-on-KE-master-dag:
if: github.event_name == 'schedule'
needs: wait-for-providers-integration-tests-on-KE-to-be-ready
runs-on: 'ubuntu-20.04'
steps:
- name: checkout
uses: actions/checkout@v3
with:
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/test-rc-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
astronomer_key_secret: ${{ secrets.PROVIDER_INTEGRATION_TESTS_ASTRONOMER_KEY_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

wait-for-deployment-to-be-ready:
wait-for-deployment-to-be-ready-and-trigger-master-dag:
needs: deploy-rc-testing-branch-to-astro-cloud
if: |
always() &&
Expand All @@ -132,13 +132,6 @@ jobs:
echo "allowing the deployed image to be updated across all Airflow components.."
sleep 1800
trigger-master-dag:
needs: wait-for-deployment-to-be-ready
if: |
always() &&
needs.wait-for-deployment-to-be-ready.result == 'success'
runs-on: 'ubuntu-20.04'
steps:
- name: checkout
uses: actions/checkout@v3
with:
Expand Down

0 comments on commit c628cd2

Please sign in to comment.