Updated prombench workflow to use test-infra cluster (#7214)
This commit is contained in:
parent
adeb946e54
commit
581d16d751
|
@ -1,5 +1,19 @@
|
||||||
on: repository_dispatch
|
on: repository_dispatch
|
||||||
name: Prombench Workflow
|
name: Prombench Workflow
|
||||||
|
env:
|
||||||
|
AUTH_FILE: ${{ secrets.TEST_INFRA_GKE_AUTH }}
|
||||||
|
CLUSTER_NAME: test-infra
|
||||||
|
DOMAIN_NAME: prombench.prometheus.io
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GITHUB_ORG: prometheus
|
||||||
|
GITHUB_REPO: prometheus
|
||||||
|
GITHUB_STATUS_TARGET_URL: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
|
||||||
|
LAST_COMMIT_SHA: ${{ github.event.client_payload.LAST_COMMIT_SHA }}
|
||||||
|
PROJECT_ID: macro-mile-203600
|
||||||
|
PR_NUMBER: ${{ github.event.client_payload.PR_NUMBER }}
|
||||||
|
RELEASE: ${{ github.event.client_payload.RELEASE }}
|
||||||
|
TEST_INFRA_REPO: https://github.com/prometheus/test-infra.git
|
||||||
|
ZONE: europe-west3-a
|
||||||
jobs:
|
jobs:
|
||||||
benchmark_start:
|
benchmark_start:
|
||||||
name: Benchmark Start
|
name: Benchmark Start
|
||||||
|
@ -7,141 +21,85 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Update status to pending
|
- name: Update status to pending
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
LAST_COMMIT_SHA: ${{ github.event.client_payload.LAST_COMMIT_SHA }}
|
|
||||||
run: >-
|
run: >-
|
||||||
curl -i -X POST
|
curl -i -X POST
|
||||||
-H "Authorization: Bearer $GITHUB_TOKEN"
|
-H "Authorization: Bearer $GITHUB_TOKEN"
|
||||||
-H "Content-Type: application/json"
|
-H "Content-Type: application/json"
|
||||||
--data '{"state":"pending", "context": "prombench-status-update-start", "target_url": "https://github.com/'$GITHUB_REPOSITORY'/actions/runs/'$GITHUB_RUN_ID'"}'
|
--data '{"state":"pending", "context": "prombench-status-update-start", "target_url": "'$GITHUB_STATUS_TARGET_URL'"}'
|
||||||
"https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/$LAST_COMMIT_SHA"
|
"https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/$LAST_COMMIT_SHA"
|
||||||
- name: Run make deploy to start test
|
- name: Run make deploy to start test
|
||||||
id: make_deploy
|
id: make_deploy
|
||||||
uses: docker://prominfra/prombench:master
|
uses: docker://prominfra/prombench:master
|
||||||
env:
|
|
||||||
AUTH_FILE: ${{ secrets.PROMBENCH_GKE_AUTH }}
|
|
||||||
PROJECT_ID: macro-mile-203600
|
|
||||||
CLUSTER_NAME: prombench
|
|
||||||
ZONE: europe-west3-a
|
|
||||||
DOMAIN_NAME: prombench.prometheus.io
|
|
||||||
TEST_INFRA_REPO: https://github.com/prometheus/test-infra.git
|
|
||||||
GITHUB_ORG: prometheus
|
|
||||||
GITHUB_REPO: prometheus
|
|
||||||
PR_NUMBER: ${{ github.event.client_payload.PR_NUMBER }}
|
|
||||||
RELEASE: ${{ github.event.client_payload.RELEASE }}
|
|
||||||
with:
|
with:
|
||||||
args: >-
|
args: >-
|
||||||
until make all_nodepools_deleted; do echo "waiting for nodepools to be deleted"; sleep 10; done;
|
until make all_nodepools_deleted; do echo "waiting for nodepools to be deleted"; sleep 10; done;
|
||||||
make deploy;
|
make deploy;
|
||||||
- name: Update status to failure
|
- name: Update status to failure
|
||||||
if: failure()
|
if: failure()
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
LAST_COMMIT_SHA: ${{ github.event.client_payload.LAST_COMMIT_SHA }}
|
|
||||||
run: >-
|
run: >-
|
||||||
curl -i -X POST
|
curl -i -X POST
|
||||||
-H "Authorization: Bearer $GITHUB_TOKEN"
|
-H "Authorization: Bearer $GITHUB_TOKEN"
|
||||||
-H "Content-Type: application/json"
|
-H "Content-Type: application/json"
|
||||||
--data '{"state":"failure", "context": "prombench-status-update-start", "target_url": "https://github.com/'$GITHUB_REPOSITORY'/actions/runs/'$GITHUB_RUN_ID'"}'
|
--data '{"state":"failure", "context": "prombench-status-update-start", "target_url": "'$GITHUB_STATUS_TARGET_URL'"}'
|
||||||
"https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/$LAST_COMMIT_SHA"
|
"https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/$LAST_COMMIT_SHA"
|
||||||
- name: Update status to success
|
- name: Update status to success
|
||||||
if: success()
|
if: success()
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
LAST_COMMIT_SHA: ${{ github.event.client_payload.LAST_COMMIT_SHA }}
|
|
||||||
run: >-
|
run: >-
|
||||||
curl -i -X POST
|
curl -i -X POST
|
||||||
-H "Authorization: Bearer $GITHUB_TOKEN"
|
-H "Authorization: Bearer $GITHUB_TOKEN"
|
||||||
-H "Content-Type: application/json"
|
-H "Content-Type: application/json"
|
||||||
--data '{"state":"success", "context": "prombench-status-update-start", "target_url": "https://github.com/'$GITHUB_REPOSITORY'/actions/runs/'$GITHUB_RUN_ID'"}'
|
--data '{"state":"success", "context": "prombench-status-update-start", "target_url": "'$GITHUB_STATUS_TARGET_URL'"}'
|
||||||
"https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/$LAST_COMMIT_SHA"
|
"https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/$LAST_COMMIT_SHA"
|
||||||
#############################
|
|
||||||
# Jobs for stopping benchmark
|
|
||||||
#############################
|
|
||||||
benchmark_cancel:
|
benchmark_cancel:
|
||||||
name: Benchmark Cancel
|
name: Benchmark Cancel
|
||||||
if: github.event.action == 'prombench_stop'
|
if: github.event.action == 'prombench_stop'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Update status to pending
|
- name: Update status to pending
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
LAST_COMMIT_SHA: ${{ github.event.client_payload.LAST_COMMIT_SHA }}
|
|
||||||
run: >-
|
run: >-
|
||||||
curl -i -X POST
|
curl -i -X POST
|
||||||
-H "Authorization: Bearer $GITHUB_TOKEN"
|
-H "Authorization: Bearer $GITHUB_TOKEN"
|
||||||
-H "Content-Type: application/json"
|
-H "Content-Type: application/json"
|
||||||
--data '{"state":"pending", "context": "prombench-status-update-cancel", "target_url": "https://github.com/'$GITHUB_REPOSITORY'/actions/runs/'$GITHUB_RUN_ID'"}'
|
--data '{"state":"pending", "context": "prombench-status-update-cancel", "target_url": "'$GITHUB_STATUS_TARGET_URL'"}'
|
||||||
"https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/$LAST_COMMIT_SHA"
|
"https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/$LAST_COMMIT_SHA"
|
||||||
- name: Run make clean to stop test
|
- name: Run make clean to stop test
|
||||||
id: make_clean
|
id: make_clean
|
||||||
uses: docker://prominfra/prombench:master
|
uses: docker://prominfra/prombench:master
|
||||||
env:
|
|
||||||
AUTH_FILE: ${{ secrets.PROMBENCH_GKE_AUTH }}
|
|
||||||
PROJECT_ID: macro-mile-203600
|
|
||||||
CLUSTER_NAME: prombench
|
|
||||||
ZONE: europe-west3-a
|
|
||||||
TEST_INFRA_REPO: https://github.com/prometheus/test-infra.git
|
|
||||||
PR_NUMBER: ${{ github.event.client_payload.PR_NUMBER }}
|
|
||||||
with:
|
with:
|
||||||
args: >-
|
args: >-
|
||||||
until make all_nodepools_running; do echo "waiting for nodepools to be created"; sleep 10; done;
|
until make all_nodepools_running; do echo "waiting for nodepools to be created"; sleep 10; done;
|
||||||
make clean;
|
make clean;
|
||||||
- name: Update status to failure
|
- name: Update status to failure
|
||||||
if: failure()
|
if: failure()
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
LAST_COMMIT_SHA: ${{ github.event.client_payload.LAST_COMMIT_SHA }}
|
|
||||||
run: >-
|
run: >-
|
||||||
curl -i -X POST
|
curl -i -X POST
|
||||||
-H "Authorization: Bearer $GITHUB_TOKEN"
|
-H "Authorization: Bearer $GITHUB_TOKEN"
|
||||||
-H "Content-Type: application/json"
|
-H "Content-Type: application/json"
|
||||||
--data '{"state":"failure", "context": "prombench-status-update-cancel", "target_url": "https://github.com/'$GITHUB_REPOSITORY'/actions/runs/'$GITHUB_RUN_ID'"}'
|
--data '{"state":"failure", "context": "prombench-status-update-cancel", "target_url": "'$GITHUB_STATUS_TARGET_URL'"}'
|
||||||
"https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/$LAST_COMMIT_SHA"
|
"https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/$LAST_COMMIT_SHA"
|
||||||
- name: Update status to success
|
- name: Update status to success
|
||||||
if: success()
|
if: success()
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
LAST_COMMIT_SHA: ${{ github.event.client_payload.LAST_COMMIT_SHA }}
|
|
||||||
run: >-
|
run: >-
|
||||||
curl -i -X POST
|
curl -i -X POST
|
||||||
-H "Authorization: Bearer $GITHUB_TOKEN"
|
-H "Authorization: Bearer $GITHUB_TOKEN"
|
||||||
-H "Content-Type: application/json"
|
-H "Content-Type: application/json"
|
||||||
--data '{"state":"success", "context": "prombench-status-update-cancel", "target_url": "https://github.com/'$GITHUB_REPOSITORY'/actions/runs/'$GITHUB_RUN_ID'"}'
|
--data '{"state":"success", "context": "prombench-status-update-cancel", "target_url": "'$GITHUB_STATUS_TARGET_URL'"}'
|
||||||
"https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/$LAST_COMMIT_SHA"
|
"https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/$LAST_COMMIT_SHA"
|
||||||
###############################
|
|
||||||
# Jobs for restarting benchmark
|
|
||||||
###############################
|
|
||||||
benchmark_restart:
|
benchmark_restart:
|
||||||
name: Benchmark Restart
|
name: Benchmark Restart
|
||||||
if: github.event.action == 'prombench_restart'
|
if: github.event.action == 'prombench_restart'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Update status to pending
|
- name: Update status to pending
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
LAST_COMMIT_SHA: ${{ github.event.client_payload.LAST_COMMIT_SHA }}
|
|
||||||
run: >-
|
run: >-
|
||||||
curl -i -X POST
|
curl -i -X POST
|
||||||
-H "Authorization: Bearer $GITHUB_TOKEN"
|
-H "Authorization: Bearer $GITHUB_TOKEN"
|
||||||
-H "Content-Type: application/json"
|
-H "Content-Type: application/json"
|
||||||
--data '{"state":"pending", "context": "prombench-status-update-restart", "target_url": "https://github.com/'$GITHUB_REPOSITORY'/actions/runs/'$GITHUB_RUN_ID'"}'
|
--data '{"state":"pending", "context": "prombench-status-update-restart", "target_url": "'$GITHUB_STATUS_TARGET_URL'"}'
|
||||||
"https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/$LAST_COMMIT_SHA"
|
"https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/$LAST_COMMIT_SHA"
|
||||||
- name: Run make clean then make deploy to restart test
|
- name: Run make clean then make deploy to restart test
|
||||||
id: make_restart
|
id: make_restart
|
||||||
uses: docker://prominfra/prombench:master
|
uses: docker://prominfra/prombench:master
|
||||||
env:
|
|
||||||
AUTH_FILE: ${{ secrets.PROMBENCH_GKE_AUTH }}
|
|
||||||
PROJECT_ID: macro-mile-203600
|
|
||||||
CLUSTER_NAME: prombench
|
|
||||||
ZONE: europe-west3-a
|
|
||||||
DOMAIN_NAME: prombench.prometheus.io
|
|
||||||
TEST_INFRA_REPO: https://github.com/prometheus/test-infra.git
|
|
||||||
GITHUB_ORG: prometheus
|
|
||||||
GITHUB_REPO: prometheus
|
|
||||||
PR_NUMBER: ${{ github.event.client_payload.PR_NUMBER }}
|
|
||||||
RELEASE: ${{ github.event.client_payload.RELEASE }}
|
|
||||||
with:
|
with:
|
||||||
args: >-
|
args: >-
|
||||||
until make all_nodepools_running; do echo "waiting for nodepools to be created"; sleep 10; done;
|
until make all_nodepools_running; do echo "waiting for nodepools to be created"; sleep 10; done;
|
||||||
|
@ -150,23 +108,17 @@ jobs:
|
||||||
make deploy;
|
make deploy;
|
||||||
- name: Update status to failure
|
- name: Update status to failure
|
||||||
if: failure()
|
if: failure()
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
LAST_COMMIT_SHA: ${{ github.event.client_payload.LAST_COMMIT_SHA }}
|
|
||||||
run: >-
|
run: >-
|
||||||
curl -i -X POST
|
curl -i -X POST
|
||||||
-H "Authorization: Bearer $GITHUB_TOKEN"
|
-H "Authorization: Bearer $GITHUB_TOKEN"
|
||||||
-H "Content-Type: application/json"
|
-H "Content-Type: application/json"
|
||||||
--data '{"state":"failure", "context": "prombench-status-update-restart", "target_url": "https://github.com/'$GITHUB_REPOSITORY'/actions/runs/'$GITHUB_RUN_ID'"}'
|
--data '{"state":"failure", "context": "prombench-status-update-restart", "target_url": "'$GITHUB_STATUS_TARGET_URL'"}'
|
||||||
"https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/$LAST_COMMIT_SHA"
|
"https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/$LAST_COMMIT_SHA"
|
||||||
- name: Update status to success
|
- name: Update status to success
|
||||||
if: success()
|
if: success()
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
LAST_COMMIT_SHA: ${{ github.event.client_payload.LAST_COMMIT_SHA }}
|
|
||||||
run: >-
|
run: >-
|
||||||
curl -i -X POST
|
curl -i -X POST
|
||||||
-H "Authorization: Bearer $GITHUB_TOKEN"
|
-H "Authorization: Bearer $GITHUB_TOKEN"
|
||||||
-H "Content-Type: application/json"
|
-H "Content-Type: application/json"
|
||||||
--data '{"state":"success", "context": "prombench-status-update-restart", "target_url": "https://github.com/'$GITHUB_REPOSITORY'/actions/runs/'$GITHUB_RUN_ID'"}'
|
--data '{"state":"success", "context": "prombench-status-update-restart", "target_url": "'$GITHUB_STATUS_TARGET_URL'"}'
|
||||||
"https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/$LAST_COMMIT_SHA"
|
"https://api.github.com/repos/$GITHUB_REPOSITORY/statuses/$LAST_COMMIT_SHA"
|
Loading…
Reference in New Issue