Skip to content

Commit

Permalink
implementation to trigger GKE kube acceptance test via slash command (#…
Browse files Browse the repository at this point in the history
…5031)

* add comment feature to trigger gke kube test

* fix yaml

* add command ind

* add command id

* command is not being identified

* no idea why it doesnt work!

* rename

* random try to see if the command list is updated

* reset
  • Loading branch information
subodh1810 committed Jul 28, 2021
1 parent 953744a commit 0414009
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/gke-kube-test-command.yml
Expand Up @@ -2,6 +2,11 @@ name: GKE Kube Acceptance Test
on:
schedule:
- cron: '0 */6 * * *'
workflow_dispatch:
inputs:
comment-id:
description: 'The comment-id of the slash command. Used to update the comment with the status.'
required: false

jobs:
start-gke-kube-acceptance-test-runner:
Expand Down Expand Up @@ -33,6 +38,13 @@ jobs:
runs-on: ${{ needs.start-gke-kube-acceptance-test-runner.outputs.label }} # run the job on the newly created runner
name: GKE Acceptance Tests (Kube)
steps:
- name: Link comment to workflow run
if: github.event.inputs.comment-id
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.inputs.comment-id }}
body: |
> :clock2: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
- name: Checkout Airbyte
uses: actions/checkout@v2

Expand Down Expand Up @@ -81,12 +93,29 @@ jobs:
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
- name: Run End-to-End Acceptance Tests on GKE
id: gke-kube-test
env:
USER: root
HOME: /home/runner
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
ACTION_RUN_ID: ${{github.run_id}}
run: |
./tools/bin/gke-kube-acceptance-test/acceptance_test_kube_gke.sh
- name: Add Success Comment
if: github.event.inputs.comment-id && success()
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.inputs.comment-id }}
body: |
> :white_check_mark: ${{github.event.inputs.connector}} https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
- name: Add Failure Comment
if: github.event.inputs.comment-id && !success()
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.inputs.comment-id }}
body: |
> :x: ${{github.event.inputs.connector}} https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
# In case of self-hosted EC2 errors, remove this block.
stop-gke-kube-acceptance-test-runner:
name: Stop GKE Kube Acceptance Test EC2 Runner
Expand Down

0 comments on commit 0414009

Please sign in to comment.