Skip to content

Commit a6bd8b7

Browse files
Merge pull request #7905 from GeorgianaElena/fix-health-check
[CI/CD] Fix the automated health checks
2 parents 3ea9503 + 62e14a8 commit a6bd8b7

File tree

2 files changed

+47
-12
lines changed

2 files changed

+47
-12
lines changed

.github/workflows/pd-triggered-health-check.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ jobs:
4646
needs: [get_incident_details, health_check]
4747
runs-on: ubuntu-latest
4848
steps:
49+
- uses: actions/checkout@v6
50+
with:
51+
submodules: true
4952
- name: Report Status
5053
if: always()
5154
uses: ravsamhq/notify-slack-action@v2

.github/workflows/run-health-check.yaml

Lines changed: 44 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,29 @@ jobs:
8989
fail-fast: false
9090
matrix:
9191
jobs: ${{ fromJson(needs.generate-jobs.outputs.staging-jobs) }}
92-
uses: ./.github/workflows/reusable-health-check.yaml
93-
with:
94-
cluster: ${{ matrix.jobs.cluster_name }}
95-
hub: ${{ matrix.jobs.hub_name }}
96-
provider: ${{ matrix.jobs.provider }}
97-
secrets: inherit
92+
steps:
93+
- name: Install deployer script's Python dependencies
94+
run: |
95+
pip install --editable .
96+
go install github.com/google/go-jsonnet/cmd/jsonnet@v0.20.0
97+
98+
- name: Setup deploy for ${{ matrix.jobs.cluster_name }}cluster
99+
uses: ./.github/actions/setup-deploy
100+
with:
101+
provider: ${{ matrix.jobs.provider }}
102+
GCP_KMS_DECRYPTOR_KEY: ${{ secrets.GCP_KMS_DECRYPTOR_KEY }}
103+
104+
- name: Run health check against ${{ matrix.jobs.cluster_name }} ${{ matrix.jobs.hub_name }}
105+
uses: nick-fields/retry@v3
106+
id: health_check
107+
with:
108+
timeout_minutes: 10
109+
max_attempts: 3
110+
command: |
111+
echo "health_check_output<<EOF" >> "$GITHUB_OUTPUT"
112+
deployer run-hub-health-check ${{ matrix.jobs.cluster_name }} ${{ matrix.jobs.hub_name }} | tee --append "$GITHUB_OUTPUT"
113+
echo "EOF" >> "$GITHUB_OUTPUT"
114+
98115
99116
upgrade-prod:
100117
runs-on: ubuntu-latest
@@ -109,9 +126,24 @@ jobs:
109126
fail-fast: false
110127
matrix:
111128
jobs: ${{ fromJson(needs.generate-jobs.outputs.prod-jobs) }}
112-
uses: ./.github/workflows/reusable-health-check.yaml
113-
with:
114-
cluster: ${{ matrix.jobs.cluster_name }}
115-
hub: ${{ matrix.jobs.hub_name }}
116-
provider: ${{ matrix.jobs.provider }}
117-
secrets: inherit
129+
steps:
130+
- name: Install deployer script's Python dependencies
131+
run: |
132+
pip install --editable .
133+
go install github.com/google/go-jsonnet/cmd/jsonnet@v0.20.0
134+
- name: Setup deploy for ${{ matrix.jobs.cluster_name }}cluster
135+
uses: ./.github/actions/setup-deploy
136+
with:
137+
provider: ${{ matrix.jobs.provider }}
138+
GCP_KMS_DECRYPTOR_KEY: ${{ secrets.GCP_KMS_DECRYPTOR_KEY }}
139+
140+
- name: Run health check against ${{ matrix.jobs.cluster_name }} ${{ matrix.jobs.hub_name }}
141+
uses: nick-fields/retry@v3
142+
id: health_check
143+
with:
144+
timeout_minutes: 10
145+
max_attempts: 3
146+
command: |
147+
echo "health_check_output<<EOF" >> "$GITHUB_OUTPUT"
148+
deployer run-hub-health-check ${{ matrix.jobs.cluster_name }} ${{ matrix.jobs.hub_name }} | tee --append "$GITHUB_OUTPUT"
149+
echo "EOF" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)