[GitHub Actions] Disable scale until runner key works
This commit is contained in:
248
.github/workflows/common.yml
vendored
248
.github/workflows/common.yml
vendored
@@ -95,70 +95,70 @@ jobs:
|
||||
matrix: ${{ env.matrix }}
|
||||
jdk_build: ${{ env.JDK_BUILD }}
|
||||
jre_version: ${{ env.JRE_DEFAULT }}
|
||||
scale-runners-up:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- parameters
|
||||
concurrency:
|
||||
group: stream-apps-gh-runners
|
||||
cancel-in-progress: false
|
||||
steps:
|
||||
- name: 'Configure: checkout stream-applications'
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: 'main'
|
||||
- name: 'Configure: checkout stream-applications'
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: 'main'
|
||||
- name: Ensure scripts are executable
|
||||
shell: bash
|
||||
run: find . -type f -name "*.sh" -exec chmod a+x '{}' \;
|
||||
- name: 'Configure: Configure provider for stream-apps-gh-runners'
|
||||
id: 'configure-runner-type'
|
||||
shell: bash
|
||||
run: |
|
||||
RUNNER_TYPE=$(./scripts/determine-provider.sh stream-apps-gh-runners)
|
||||
echo "RUNNER_TYPE=$RUNNER_TYPE"
|
||||
echo "RUNNER_TYPE=$RUNNER_TYPE" >> $GITHUB_ENV
|
||||
outputs:
|
||||
runner-type: '${{ env.RUNNER_TYPE }}'
|
||||
- name: 'Install: gcloud cli'
|
||||
if: ${{ env.RUNNER_TYPE == 'gke' }}
|
||||
uses: ./.github/actions/install-gcloud
|
||||
- name: 'Action: gcloud auth'
|
||||
if: ${{ env.RUNNER_TYPE == 'gke' }}
|
||||
id: auth_gcloud
|
||||
uses: 'google-github-actions/auth@v0'
|
||||
with:
|
||||
create_credentials_file: true
|
||||
credentials_json: ${{ secrets.GCP_CRED_JSON }}
|
||||
- name: 'Configure: Install TMC'
|
||||
if: ${{ env.RUNNER_TYPE == 'tmc' }}
|
||||
uses: ./.github/actions/install-tmc
|
||||
- name: 'Action: Login to TMC'
|
||||
if: ${{ env.RUNNER_TYPE == 'tmc' }}
|
||||
uses: ./.github/actions/auth-tmc
|
||||
with:
|
||||
tmc_api_token: ${{ secrets.TMC_API_TOKEN }}
|
||||
fail_on_error: false
|
||||
- name: 'Install: Groovy'
|
||||
uses: ./.github/actions/install-groovy
|
||||
with:
|
||||
version: 4.0.4
|
||||
- name: 'Action: Scale Runners Up by ${{ needs.parameters.outputs.max_parallel }}'
|
||||
uses: ./.github/actions/scale-runners-up
|
||||
timeout-minutes: 45
|
||||
with:
|
||||
verbose: ${{ inputs.verbose }}
|
||||
max_parallel: ${{ toJson(needs.parameters.outputs.max_parallel) }}
|
||||
GH_ARC_APP_ID: ${{ secrets.GH_ARC_APP_ID }}
|
||||
GH_ARC_INSTALLATION_ID: ${{ secrets.GH_ARC_INSTALLATION_ID }}
|
||||
GH_ARC_PRIVATE_KEY: ${{ secrets.GH_ARC_PRIVATE_KEY }}
|
||||
GH_ARC_PAT: ${{ secrets.GH_ARC_PAT }}
|
||||
core:
|
||||
# scale-runners-up:
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: 'stream-ci-large'
|
||||
# needs:
|
||||
# - parameters
|
||||
# concurrency:
|
||||
# group: stream-apps-gh-runners
|
||||
# cancel-in-progress: false
|
||||
# steps:
|
||||
# - name: 'Configure: checkout stream-applications'
|
||||
# uses: actions/checkout@v3
|
||||
# with:
|
||||
# ref: 'main'
|
||||
# - name: 'Configure: checkout stream-applications'
|
||||
# uses: actions/checkout@v3
|
||||
# with:
|
||||
# ref: 'main'
|
||||
# - name: Ensure scripts are executable
|
||||
# shell: bash
|
||||
# run: find . -type f -name "*.sh" -exec chmod a+x '{}' \;
|
||||
# - name: 'Configure: Configure provider for stream-apps-gh-runners'
|
||||
# id: 'configure-runner-type'
|
||||
# shell: bash
|
||||
# run: |
|
||||
# RUNNER_TYPE=$(./scripts/determine-provider.sh stream-apps-gh-runners)
|
||||
# echo "RUNNER_TYPE=$RUNNER_TYPE"
|
||||
# echo "RUNNER_TYPE=$RUNNER_TYPE" >> $GITHUB_ENV
|
||||
# outputs:
|
||||
# runner-type: '${{ env.RUNNER_TYPE }}'
|
||||
# - name: 'Install: gcloud cli'
|
||||
# if: ${{ env.RUNNER_TYPE == 'gke' }}
|
||||
# uses: ./.github/actions/install-gcloud
|
||||
# - name: 'Action: gcloud auth'
|
||||
# if: ${{ env.RUNNER_TYPE == 'gke' }}
|
||||
# id: auth_gcloud
|
||||
# uses: 'google-github-actions/auth@v0'
|
||||
# with:
|
||||
# create_credentials_file: true
|
||||
# credentials_json: ${{ secrets.GCP_CRED_JSON }}
|
||||
# - name: 'Configure: Install TMC'
|
||||
# if: ${{ env.RUNNER_TYPE == 'tmc' }}
|
||||
# uses: ./.github/actions/install-tmc
|
||||
# - name: 'Action: Login to TMC'
|
||||
# if: ${{ env.RUNNER_TYPE == 'tmc' }}
|
||||
# uses: ./.github/actions/auth-tmc
|
||||
# with:
|
||||
# tmc_api_token: ${{ secrets.TMC_API_TOKEN }}
|
||||
# fail_on_error: false
|
||||
# - name: 'Install: Groovy'
|
||||
# uses: ./.github/actions/install-groovy
|
||||
# with:
|
||||
# version: 4.0.4
|
||||
# - name: 'Action: Scale Runners Up by ${{ needs.parameters.outputs.max_parallel }}'
|
||||
# uses: ./.github/actions/scale-runners-up
|
||||
# timeout-minutes: 45
|
||||
# with:
|
||||
# verbose: ${{ inputs.verbose }}
|
||||
# max_parallel: ${{ toJson(needs.parameters.outputs.max_parallel) }}
|
||||
# GH_ARC_APP_ID: ${{ secrets.GH_ARC_APP_ID }}
|
||||
# GH_ARC_INSTALLATION_ID: ${{ secrets.GH_ARC_INSTALLATION_ID }}
|
||||
# GH_ARC_PRIVATE_KEY: ${{ secrets.GH_ARC_PRIVATE_KEY }}
|
||||
# GH_ARC_PAT: ${{ secrets.GH_ARC_PAT }}
|
||||
core:
|
||||
runs-on: ubuntu-latest
|
||||
# runs-on: 'stream-ci-large'
|
||||
needs:
|
||||
- parameters
|
||||
steps:
|
||||
@@ -218,14 +218,14 @@ jobs:
|
||||
needs:
|
||||
- core
|
||||
- parameters
|
||||
- scale-runners-up
|
||||
# - scale-runners-up
|
||||
strategy:
|
||||
fail-fast: false
|
||||
# max-parallel: 4
|
||||
max-parallel: 4
|
||||
matrix:
|
||||
app: ${{ fromJson(needs.parameters.outputs.processors) }}
|
||||
# runs-on: 'ubuntu-latest'
|
||||
runs-on: 'stream-ci'
|
||||
runs-on: 'ubuntu-latest'
|
||||
# runs-on: 'stream-ci'
|
||||
steps:
|
||||
- name: 'Configure: checkout stream-applications'
|
||||
uses: actions/checkout@v3
|
||||
@@ -280,14 +280,14 @@ jobs:
|
||||
needs:
|
||||
- core
|
||||
- parameters
|
||||
- scale-runners-up
|
||||
# - scale-runners-up
|
||||
strategy:
|
||||
# max-parallel: 4
|
||||
max-parallel: 4
|
||||
fail-fast: false
|
||||
matrix:
|
||||
app: ${{ fromJson(needs.parameters.outputs.sinks) }}
|
||||
# runs-on: 'ubuntu-latest'
|
||||
runs-on: 'stream-ci'
|
||||
runs-on: 'ubuntu-latest'
|
||||
# runs-on: 'stream-ci'
|
||||
steps:
|
||||
- name: 'Configure: checkout stream-applications'
|
||||
uses: actions/checkout@v3
|
||||
@@ -342,15 +342,15 @@ jobs:
|
||||
needs:
|
||||
- core
|
||||
- parameters
|
||||
- scale-runners-up
|
||||
# - scale-runners-up
|
||||
strategy:
|
||||
# max-parallel: 4
|
||||
max-parallel: 4
|
||||
fail-fast: false
|
||||
# will be removed when private runners are used.
|
||||
matrix:
|
||||
app: ${{ fromJson(needs.parameters.outputs.sources) }}
|
||||
# runs-on: 'ubuntu-latest'
|
||||
runs-on: 'stream-ci'
|
||||
runs-on: 'ubuntu-latest'
|
||||
# runs-on: 'stream-ci'
|
||||
steps:
|
||||
- name: 'Configure: checkout stream-applications'
|
||||
uses: actions/checkout@v3
|
||||
@@ -400,52 +400,52 @@ jobs:
|
||||
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
DEFAULT_JDK: ${{ needs.parameters.outputs.jre_version }}
|
||||
run: ./publish-app.sh "stream-applications" "applications/source/${{ matrix.app }}"
|
||||
scale-runners-down:
|
||||
if: ${{ success() }}
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- parameters
|
||||
- processors
|
||||
- sinks
|
||||
- sources
|
||||
concurrency:
|
||||
group: stream-apps-gh-runners
|
||||
cancel-in-progress: false
|
||||
steps:
|
||||
- name: 'Configure: checkout stream-applications'
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: 'main'
|
||||
- name: 'Action: Ensure scripts are executable'
|
||||
shell: bash
|
||||
run: find . -type f -name "*.sh" -exec chmod a+x '{}' \;
|
||||
- name: 'Configure: Runners Cluster provider'
|
||||
shell: bash
|
||||
run: |
|
||||
RUNNER_TYPE=$(./scripts/determine-provider.sh stream-apps-gh-runners)
|
||||
if [ "$RUNNER_TYPE" != "gke" ]; then
|
||||
RUNNER_TYPE=tmc
|
||||
fi
|
||||
echo "RUNNER_TYPE=$RUNNER_TYPE" >> $GITHUB_ENV
|
||||
- name: 'Install: gcloud cli'
|
||||
if: ${{ env.RUNNER_TYPE == 'gke' }}
|
||||
uses: ./.github/actions/install-gcloud
|
||||
- name: 'Action: gcloud auth'
|
||||
if: ${{ env.RUNNER_TYPE == 'gke' }}
|
||||
id: auth_gcloud
|
||||
uses: 'google-github-actions/auth@v0'
|
||||
with:
|
||||
create_credentials_file: true
|
||||
credentials_json: ${{ secrets.GCP_CRED_JSON }}
|
||||
- name: 'Configure: Install TMC'
|
||||
if: ${{ env.RUNNER_TYPE == 'tmc' }}
|
||||
uses: ./.github/actions/install-tmc
|
||||
- name: 'Action: Login to TMC'
|
||||
if: ${{ env.RUNNER_TYPE == 'tmc' }}
|
||||
uses: ./.github/actions/auth-tmc
|
||||
with:
|
||||
tmc_api_token: ${{ secrets.TMC_API_TOKEN }}
|
||||
- name: 'Action: Decrease runners with ${{ needs.parameters.outputs.max_parallel }}'
|
||||
uses: ./.github/actions/decrease-runners
|
||||
with:
|
||||
dec: ${{ needs.parameters.outputs.max_parallel }}
|
||||
# scale-runners-down:
|
||||
# if: ${{ success() }}
|
||||
# runs-on: ubuntu-latest
|
||||
# needs:
|
||||
# - parameters
|
||||
# - processors
|
||||
# - sinks
|
||||
# - sources
|
||||
# concurrency:
|
||||
# group: stream-apps-gh-runners
|
||||
# cancel-in-progress: false
|
||||
# steps:
|
||||
# - name: 'Configure: checkout stream-applications'
|
||||
# uses: actions/checkout@v3
|
||||
# with:
|
||||
# ref: 'main'
|
||||
# - name: 'Action: Ensure scripts are executable'
|
||||
# shell: bash
|
||||
# run: find . -type f -name "*.sh" -exec chmod a+x '{}' \;
|
||||
# - name: 'Configure: Runners Cluster provider'
|
||||
# shell: bash
|
||||
# run: |
|
||||
# RUNNER_TYPE=$(./scripts/determine-provider.sh stream-apps-gh-runners)
|
||||
# if [ "$RUNNER_TYPE" != "gke" ]; then
|
||||
# RUNNER_TYPE=tmc
|
||||
# fi
|
||||
# echo "RUNNER_TYPE=$RUNNER_TYPE" >> $GITHUB_ENV
|
||||
# - name: 'Install: gcloud cli'
|
||||
# if: ${{ env.RUNNER_TYPE == 'gke' }}
|
||||
# uses: ./.github/actions/install-gcloud
|
||||
# - name: 'Action: gcloud auth'
|
||||
# if: ${{ env.RUNNER_TYPE == 'gke' }}
|
||||
# id: auth_gcloud
|
||||
# uses: 'google-github-actions/auth@v0'
|
||||
# with:
|
||||
# create_credentials_file: true
|
||||
# credentials_json: ${{ secrets.GCP_CRED_JSON }}
|
||||
# - name: 'Configure: Install TMC'
|
||||
# if: ${{ env.RUNNER_TYPE == 'tmc' }}
|
||||
# uses: ./.github/actions/install-tmc
|
||||
# - name: 'Action: Login to TMC'
|
||||
# if: ${{ env.RUNNER_TYPE == 'tmc' }}
|
||||
# uses: ./.github/actions/auth-tmc
|
||||
# with:
|
||||
# tmc_api_token: ${{ secrets.TMC_API_TOKEN }}
|
||||
# - name: 'Action: Decrease runners with ${{ needs.parameters.outputs.max_parallel }}'
|
||||
# uses: ./.github/actions/decrease-runners
|
||||
# with:
|
||||
# dec: ${{ needs.parameters.outputs.max_parallel }}
|
||||
|
||||
Reference in New Issue
Block a user