-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add another token to alleviate API limit pressure. (#10826)
We are running into Github API rate limits. This PR: - introduces another token as a temp solution. - reorganises the workflow file.
- Loading branch information
Showing
1 changed file
with
30 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -283,6 +283,30 @@ jobs: | |
SLACK_USERNAME: Buildbot | ||
SLACK_TITLE: "Build Success" | ||
SLACK_FOOTER: "" | ||
# In case of self-hosted EC2 errors, remove this block. | ||
stop-platform-build-runner: | ||
name: "Platform: Stop Build EC2 Runner" | ||
timeout-minutes: 10 | ||
needs: | ||
- start-platform-build-runner # required to get output from the start-runner job | ||
- platform-build # required to wait when the main job is done | ||
runs-on: ubuntu-latest | ||
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs | ||
steps: | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-2 | ||
- name: Stop EC2 runner | ||
uses: machulav/[email protected] | ||
with: | ||
mode: stop | ||
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }} | ||
label: ${{ needs.start-platform-build-runner.outputs.label }} | ||
ec2-instance-id: ${{ needs.start-platform-build-runner.outputs.ec2-instance-id }} | ||
|
||
octavia-cli-build: | ||
runs-on: ubuntu-latest | ||
name: "Octavia CLI: Build" | ||
|
@@ -353,29 +377,6 @@ jobs: | |
SLACK_USERNAME: Buildbot | ||
SLACK_TITLE: "Build Success" | ||
SLACK_FOOTER: "" | ||
# In case of self-hosted EC2 errors, remove this block. | ||
stop-platform-build-runner: | ||
name: "Platform: Stop Build EC2 Runner" | ||
timeout-minutes: 10 | ||
needs: | ||
- start-platform-build-runner # required to get output from the start-runner job | ||
- platform-build # required to wait when the main job is done | ||
runs-on: ubuntu-latest | ||
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs | ||
steps: | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-2 | ||
- name: Stop EC2 runner | ||
uses: machulav/[email protected] | ||
with: | ||
mode: stop | ||
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }} | ||
label: ${{ needs.start-platform-build-runner.outputs.label }} | ||
ec2-instance-id: ${{ needs.start-platform-build-runner.outputs.ec2-instance-id }} | ||
|
||
## Frontend Test | ||
## Gradle Build | ||
|
@@ -396,7 +397,7 @@ jobs: | |
with: | ||
aws-access-key-id: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }} | ||
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }} | ||
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN_1 }} | ||
frontend-test: | ||
needs: start-frontend-test-runner # required to start the main job when the runner is ready | ||
runs-on: ${{ needs.start-frontend-test-runner.outputs.label }} # run the job on the newly created runner | ||
|
@@ -461,7 +462,7 @@ jobs: | |
uses: machulav/[email protected] | ||
with: | ||
mode: stop | ||
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }} | ||
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN_1 }} | ||
label: ${{ needs.start-frontend-test-runner.outputs.label }} | ||
ec2-instance-id: ${{ needs.start-frontend-test-runner.outputs.ec2-instance-id }} | ||
|
||
|
@@ -486,7 +487,7 @@ jobs: | |
ec2-image-id: ami-0c1a9bc22624339d8 | ||
aws-access-key-id: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }} | ||
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }} | ||
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN_1 }} | ||
kube-acceptance-test: | ||
# In case of self-hosted EC2 errors, removed the `needs` line and switch back to running on ubuntu-latest. | ||
needs: start-kube-acceptance-test-runner # required to start the main job when the runner is ready | ||
|
@@ -613,7 +614,7 @@ jobs: | |
uses: machulav/[email protected] | ||
with: | ||
mode: stop | ||
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }} | ||
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN_1 }} | ||
label: ${{ needs.start-kube-acceptance-test-runner.outputs.label }} | ||
ec2-instance-id: ${{ needs.start-kube-acceptance-test-runner.outputs.ec2-instance-id }} | ||
|
||
|
@@ -638,7 +639,7 @@ jobs: | |
ec2-image-id: ami-0c1a9bc22624339d8 | ||
aws-access-key-id: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }} | ||
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }} | ||
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN_1 }} | ||
kube-acceptance-test-v2: | ||
# In case of self-hosted EC2 errors, removed the `needs` line and switch back to running on ubuntu-latest. | ||
needs: start-kube-acceptance-test-runner-v2 # required to start the main job when the runner is ready | ||
|
@@ -735,6 +736,6 @@ jobs: | |
uses: machulav/[email protected] | ||
with: | ||
mode: stop | ||
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }} | ||
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN_1 }} | ||
label: ${{ needs.start-kube-acceptance-test-runner-v2.outputs.label }} | ||
ec2-instance-id: ${{ needs.start-kube-acceptance-test-runner-v2.outputs.ec2-instance-id }} |