-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
1 addition
and
63 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 |
---|---|---|
|
@@ -94,39 +94,10 @@ jobs: | |
# - run: | | ||
# echo '${{ toJSON(needs) }}' | ||
|
||
# In case of self-hosted EC2 errors, remove this block. | ||
start-platform-build-runner: | ||
name: "Platform: Start Build EC2 Runner" | ||
needs: | ||
- changes | ||
# Because scheduled builds on main require us to skip the changes job. Use always() to force this to run on main. | ||
if: needs.changes.outputs.backend == 'true' || needs.changes.outputs.build == 'true' || (always() && github.ref == 'refs/heads/main') | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
outputs: | ||
label: ${{ steps.start-ec2-runner.outputs.label }} | ||
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }} | ||
steps: | ||
- name: Checkout Airbyte | ||
uses: actions/checkout@v3 | ||
- name: Check PAT rate limits | ||
run: | | ||
./tools/bin/find_non_rate_limited_PAT \ | ||
${{ secrets.GH_PAT_BUILD_RUNNER_OSS }} \ | ||
${{ secrets.GH_PAT_BUILD_RUNNER_BACKUP }} | ||
- name: Start AWS Runner | ||
id: start-ec2-runner | ||
uses: ./.github/actions/start-aws-runner | ||
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: ${{ env.PAT }} | ||
platform-build: | ||
name: "Platform: Build" | ||
# In case of self-hosted EC2 errors, remove the next two lines and uncomment the currently commented out `runs-on` line. | ||
needs: start-platform-build-runner # required to start the main job when the runner is ready | ||
runs-on: ${{ needs.start-platform-build-runner.outputs.label }} # run the job on the newly created runner | ||
timeout-minutes: 90 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Airbyte | ||
uses: actions/checkout@v3 | ||
|
@@ -187,39 +158,6 @@ jobs: | |
# - name: Get Docker Space | ||
# run: docker run --rm busybox df -h | ||
|
||
# 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 | ||
# Always is required to stop the runner even if the previous job has errors. However always() runs even if the previous step is skipped. | ||
# Thus, we check for skipped here. | ||
if: ${{ always() && needs.start-platform-build-runner.result != 'skipped'}} | ||
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: Checkout Airbyte | ||
uses: actions/checkout@v3 | ||
- name: Check PAT rate limits | ||
run: | | ||
./tools/bin/find_non_rate_limited_PAT \ | ||
${{ secrets.GH_PAT_BUILD_RUNNER_OSS }} \ | ||
${{ secrets.GH_PAT_BUILD_RUNNER_BACKUP }} | ||
- name: Stop EC2 runner | ||
uses: airbytehq/[email protected] | ||
with: | ||
mode: stop | ||
github-token: ${{ env.PAT }} | ||
label: ${{ needs.start-platform-build-runner.outputs.label }} | ||
ec2-instance-id: ${{ needs.start-platform-build-runner.outputs.ec2-instance-id }} | ||
|
||
notify-failure-slack-channel: | ||
name: "Notify Slack Channel on Build Failures" | ||
runs-on: ubuntu-latest | ||
|