Skip to content

Commit

Permalink
AWX E2E Support MAX_PARALLEL
Browse files Browse the repository at this point in the history
Signed-off-by: James Talton <[email protected]>
  • Loading branch information
jamestalton committed Aug 26, 2024
1 parent f7c01af commit 24a783b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/awx-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ on:
TAGS:
type: string
required: false
MAX_PARALLEL:
type: number
required: true
default: 100
description: 'Maximum parallel jobs'
secrets:
AWX_PASSWORD:
required: true
Expand Down Expand Up @@ -94,7 +99,7 @@ jobs:
- awx-ui-image
- generate-matrix
strategy:
# max-parallel: 8
max-parallel: ${{ inputs.MAX_PARALLEL }}
fail-fast: false
matrix:
containers: ${{ contains(github.event.pull_request.labels.*.name, 'dashboard') && fromJson('[1,2,3,4]') || fromJson(needs.generate-matrix.outputs.MATRIX) }}
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/awx-update-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
required: true
default: false
description: 'Update server on success'
MAX_PARALLEL:
type: number
required: true
default: 100
description: 'Maximum parallel jobs'
schedule:
- cron: '0 8 * * *'

Expand All @@ -21,16 +26,19 @@ jobs:
outputs:
AWX_SERVER: ${{ steps.step1.outputs.AWX_SERVER }}
UPDATE_SERVER: ${{ steps.step1.outputs.UPDATE_SERVER }}
MAX_PARALLEL: ${{ steps.step1.outputs.MAX_PARALLEL }}
steps:
- id: step1
run: |
CURRENTDATE=$(date +'%Y%m%d')
if([ "${{ github.event_name }}" == "workflow_dispatch" ]); then
echo "AWX_SERVER=${{ github.event.inputs.AWX_SERVER || 'https://awx.ci-ui-${CURRENTDATE}.gcp.testing.ansible.com' }}" >> "$GITHUB_OUTPUT"
echo "UPDATE_SERVER=${{ github.event.inputs.UPDATE_SERVER }}" >> "$GITHUB_OUTPUT"
echo "MAX_PARALLEL=${{ github.event.inputs.MAX_PARALLEL }}" >> "$GITHUB_OUTPUT"
else
echo "AWX_SERVER=https://awx.ci-ui-${CURRENTDATE}.gcp.testing.ansible.com" >> "$GITHUB_OUTPUT"
echo "UPDATE_SERVER=true" >> "$GITHUB_OUTPUT"
echo "MAX_PARALLEL=100" >> "$GITHUB_OUTPUT"
fi
awx-e2e:
Expand All @@ -43,6 +51,7 @@ jobs:
AWX_PASSWORD: ${{ secrets.AWX_PASSWORD }}
AWX_PROJECT_ID: ${{ secrets.AWX_PROJECT_ID }}
AWX_RECORD_KEY: ${{ secrets.AWX_RECORD_KEY }}
MAX_PARALLEL: ${{ needs.setup.outputs.MAX_PARALLEL }}

awx-update-server:
name: AWX Update Server
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ jobs:
with:
AWX_SERVER: ${{ vars.AWX_SERVER }}
SKIP_JOB: ${{ needs.packages.outputs.awx != 'true' }}
MAX_PARALLEL: 100
secrets:
AWX_PASSWORD: ${{ secrets.AWX_PASSWORD }}
AWX_PROJECT_ID: ${{ secrets.AWX_PROJECT_ID }}
Expand Down

0 comments on commit 24a783b

Please sign in to comment.