Skip to content

Commit 7fb0993

Browse files
authored
Stop docker acceptance instances (#10961)
* Stop docker acceptance instances * Fix typo
1 parent 4880709 commit 7fb0993

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/gradle.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,31 @@ jobs:
344344
SLACK_TITLE: "Build Success"
345345
SLACK_FOOTER: ""
346346

347+
# In case of self-hosted EC2 errors, remove this block.
348+
stop-platform-new-scheduler-acceptance-runner:
349+
name: Stop Acceptance Tests (Docker w/ Scheduler v2) Runner
350+
timeout-minutes: 10
351+
needs:
352+
- start-platform-new-scheduler-acceptance-runner # required to get output from the start-runner job
353+
- platform-new-scheduler-acceptance # required to wait when the main job is done
354+
runs-on: ubuntu-latest
355+
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
356+
steps:
357+
- name: Configure AWS credentials
358+
uses: aws-actions/configure-aws-credentials@v1
359+
with:
360+
aws-access-key-id: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
361+
aws-secret-access-key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
362+
aws-region: us-east-2
363+
- name: Stop EC2 runner
364+
uses: machulav/[email protected]
365+
with:
366+
mode: stop
367+
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN_1 }}
368+
label: ${{ needs.start-platform-new-scheduler-acceptance-runner.outputs.label }}
369+
ec2-instance-id: ${{ needs.start-platform-new-scheduler-acceptance-runner.outputs.ec2-instance-id }}
370+
371+
347372
# In case of self-hosted EC2 errors, remove this block.
348373
stop-platform-build-runner:
349374
name: "Platform: Stop Build EC2 Runner"

0 commit comments

Comments
 (0)