Skip to content

Commit

Permalink
Merge branch 'mainline' into jericht/test_fixtures_update
Browse files Browse the repository at this point in the history
  • Loading branch information
jericht authored May 31, 2024
2 parents fb049ec + b541802 commit d4d4048
Show file tree
Hide file tree
Showing 14 changed files with 70 additions and 389 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,20 @@ name: Code Quality
on:
pull_request:
branches: [ mainline, feature_windows ]
workflow_call:
inputs:
branch:
required: false
type: string

jobs:
Test:
name: Code Quality
uses: ./.github/workflows/reuse_python_build.yml
secrets: inherit
name: Python
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.9', '3.10', '3.11']
uses: aws-deadline/.github/.github/workflows/reusable_python_build.yml@mainline
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
28 changes: 6 additions & 22 deletions .github/workflows/mainline_integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
name: Windows Integration Tests
runs-on: windows-latest
permissions:
id-token: write
contents: read
strategy:
matrix:
Expand All @@ -28,27 +27,12 @@ jobs:

MainlineIntegrationTest:
name: Integration Test
runs-on: ubuntu-latest
environment: mainline
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
with:
ref: mainline
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_CODEBUILD_MAINLINE_INTEG_ROLE }}
aws-region: us-west-2
mask-aws-account-id: true
- name: Run CodeBuild
uses: aws-actions/aws-codebuild-run-build@v1
with:
project-name: deadline-cloud-worker-agent-dev-IntegTest
hide-cloudwatch-logs: true
env-vars-for-codebuild: |
TEST_TYPE
env:
TEST_TYPE: WHEEL
uses: aws-deadline/.github/.github/workflows/reusable_integration_test.yml@mainline
secrets: inherit
with:
repository: ${{ github.event.repository.name }}
branch: mainline
environment: mainline
105 changes: 14 additions & 91 deletions .github/workflows/release_bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ on:
jobs:
UnitTests:
name: Unit Tests
uses: ./.github/workflows/reuse_python_build.yml
uses: ./.github/workflows/code_quality.yml
with:
commit: ${{ github.sha }}
secrets: inherit
branch: mainline

WindowsIntegrationTests:
needs: UnitTests
Expand All @@ -45,97 +44,21 @@ jobs:

IntegrationTests:
needs: UnitTests
name: Integration Tests
runs-on: ubuntu-latest
environment: release
name: Integration Test
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_CODEBUILD_RELEASE_INTEG_ROLE }}
aws-region: us-west-2
mask-aws-account-id: true

- name: Run CodeBuild
uses: aws-actions/aws-codebuild-run-build@v1
with:
project-name: deadline-cloud-worker-agent-IntegTest
hide-cloudwatch-logs: true
env-vars-for-codebuild: |
TEST_TYPE
env:
TEST_TYPE: WHEEL
uses: aws-deadline/.github/.github/workflows/reusable_integration_test.yml@mainline
secrets: inherit
with:
repository: ${{ github.event.repository.name }}
branch: mainline
environment: mainline

Bump:
needs: IntegrationTests
runs-on: ubuntu-latest
environment: release
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: mainline
fetch-depth: 0
token: ${{ secrets.CI_TOKEN }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: ConfigureGit
run: |
git config --local user.email "129794699+client-software-ci@users.noreply.github.com"
git config --local user.name "client-software-ci"
- name: Bump
run: |
BUMP_ARGS=""
if [[ "${{ inputs.force_version_bump }}" != "" ]]; then
BUMP_ARGS="$BUMP_ARGS --${{ inputs.force_version_bump }}"
fi
# Backup actual changelog to preserve its contents
touch CHANGELOG.md
cp CHANGELOG.md CHANGELOG.bak.md
# Run semantic-release to generate new changelog
pip install --upgrade hatch
hatch env create release
hatch run release:deps
NEXT_SEMVER=$(hatch run release:bump $BUMP_ARGS)
# Grab the new version's changelog and prepend it to the original changelog contents
python .github/scripts/get_latest_changelog.py > NEW_LOG.md
cat NEW_LOG.md CHANGELOG.bak.md > CHANGELOG.md
rm NEW_LOG.md
git checkout -b bump/$NEXT_SEMVER
git add CHANGELOG.md
git commit -sm "chore(release): $NEXT_SEMVER"
echo "NEXT_SEMVER=$NEXT_SEMVER" >> $GITHUB_ENV
{
echo 'RELEASE_NOTES<<EOF'
python .github/scripts/get_latest_changelog.py
echo EOF
} >> $GITHUB_ENV
- name: PushPR
env:
GH_TOKEN: ${{ secrets.CI_TOKEN }}
run: |
git push -u origin bump/$NEXT_SEMVER
# Needs "Allow GitHub Actions to create and approve pull requests" under Settings > Actions
gh pr create --base mainline --title "chore(release): $NEXT_SEMVER" --body "$RELEASE_NOTES"
name: Version Bump
uses: aws-deadline/.github/.github/workflows/reusable_bump.yml@mainline
secrets: inherit
with:
force_version_bump: ${{ inputs.force_version_bump }}
26 changes: 7 additions & 19 deletions .github/workflows/release_integration_canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
name: Windows Integration Tests
runs-on: windows-latest
permissions:
id-token: write
contents: read
strategy:
matrix:
Expand All @@ -26,24 +25,13 @@ jobs:
run: hatch run integ-windows

ReleaseIntegrationCanary:
runs-on: ubuntu-latest
environment: canary
name: Release Canary
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
with:
ref: release
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_CODEBUILD_RELEASE_CANARY_ROLE }}
aws-region: us-west-2
mask-aws-account-id: true
- name: Run CodeBuild
uses: aws-actions/aws-codebuild-run-build@v1
with:
project-name: deadline-cloud-worker-agent-Canary
source-version-override: release
hide-cloudwatch-logs: true
uses: aws-deadline/.github/.github/workflows/reusable_canary.yml@mainline
secrets: inherit
with:
repository: ${{ github.event.repository.name }}
branch: release
environment: canary
Loading

0 comments on commit d4d4048

Please sign in to comment.