Skip to content

Commit

Permalink
Merge pull request #707 from asfadmin/devel
Browse files Browse the repository at this point in the history
Merge to master
  • Loading branch information
reweeden authored Mar 2, 2023
2 parents 806c7af + 2e27d0f commit 2704c24
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 475 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ jobs:
with:
python-version: 3.8

- run: pip install -r requirements/requirements.txt

- uses: TrueBrain/actions-flake8@v2
with:
plugins: flake8-isort
flake8_version: 6.0.0
plugins: flake8-isort~=6.0

requirements:
runs-on: ubuntu-latest
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/re-status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ on:
# Optional
AWS_ROLE_ARN:
required: false
AWS_REGION:
required: false


jobs:
Expand All @@ -35,7 +33,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION || 'us-west-2' }}
AWS_DEFAULT_REGION: ${{ vars.AWS_REGION || 'us-west-2' }}

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -67,7 +65,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION || 'us-west-2' }}
AWS_DEFAULT_REGION: ${{ vars.AWS_REGION || 'us-west-2' }}

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/re-test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ on:
# Optional
AWS_ROLE_ARN:
required: false
AWS_REGION:
required: false
URS_CLIENT_ID:
required: false
EDL_APP_UID:
Expand All @@ -39,7 +37,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
AWS_DEFAULT_REGION: ${{ vars.AWS_REGION }}
DEPENDENCY_NAME: tea-dependencylayer-run.${{ github.run_id }}.zip
CODE_NAME: tea-code-run.${{ github.run_id }}.zip
YAML_NAME: tea-cloudformation-run.${{ github.run_id }}.yaml
Expand Down
35 changes: 4 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,14 @@ jobs:
with:
environment: prod

# The secrets context is not supported on job level `if`. So we need to hack around it:
# https://github.com/actions/runner/issues/520#issuecomment-907427748
check-tests:
runs-on: ubuntu-latest
outputs:
run-tests: ${{ steps.eval.outputs.val }}
steps:
- id: eval
env:
RUN_TESTS: ${{ secrets.RUN_TESTS }}
if: "${{ env.RUN_TESTS == 'true' }}"
run: echo "val=yes" >> $GITHUB_OUTPUT

test-e2e:
needs:
- build
- check-tests
if: needs.check-tests.outputs.run-tests == 'yes'
if: ${{ vars.RUN_TESTS }}
uses: ./.github/workflows/re-test-e2e.yml
with:
environment: test
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
AWS_REGION: ${{ secrets.AWS_REGION }}
URS_USERNAME: ${{ secrets.URS_USERNAME }}
URS_PASSWORD: ${{ secrets.URS_PASSWORD }}
URS_CLIENT_ID: ${{ secrets.URS_CLIENT_ID }}
EDL_APP_UID: ${{ secrets.EDL_APP_UID }}
EDL_APP_PASSWORD: ${{ secrets.EDL_APP_PASSWORD }}
secrets: inherit

publish:
runs-on: ubuntu-latest
Expand All @@ -57,7 +34,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION || 'us-west-2' }}
AWS_DEFAULT_REGION: ${{ vars.AWS_REGION || 'us-west-2' }}

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -137,8 +114,4 @@ jobs:
environment: prod
build_tag: ${{ needs.build.outputs.version }}
success: ${{ needs.build.result != 'failure' && needs.publish.result != 'failure' }}
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
AWS_REGION: ${{ secrets.AWS_REGION }}
secrets: inherit
36 changes: 3 additions & 33 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,14 @@ jobs:
with:
environment: prod

# The secrets context is not supported on job level `if`. So we need to hack around it:
# https://github.com/actions/runner/issues/520#issuecomment-907427748
check-tests:
runs-on: ubuntu-latest
outputs:
run-tests: ${{ steps.eval.outputs.val }}
steps:
- id: eval
env:
RUN_TESTS: ${{ secrets.RUN_TESTS }}
if: "${{ env.RUN_TESTS == 'true' }}"
run: echo "val=yes" >> $GITHUB_OUTPUT

test-e2e:
needs:
- build
- check-tests
if: needs.check-tests.outputs.run-tests == 'yes'
if: ${{ vars.RUN_TESTS }}
uses: ./.github/workflows/re-test-e2e.yml
with:
environment: test
# Reusable workflows + Environments behave very strangely
# https://github.com/AllanOricil/workflow-template-bug/blob/fc8ae4264938adb560fa6928cb19c69d110d8bbd/.github/workflows/workflow-inplementation.yml#L46
# Yea, seriously hope this gets fixed!!!!!
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
AWS_REGION: ${{ secrets.AWS_REGION }}
URS_USERNAME: ${{ secrets.URS_USERNAME }}
URS_PASSWORD: ${{ secrets.URS_PASSWORD }}
URS_CLIENT_ID: ${{ secrets.URS_CLIENT_ID }}
EDL_APP_UID: ${{ secrets.EDL_APP_UID }}
EDL_APP_PASSWORD: ${{ secrets.EDL_APP_PASSWORD }}
secrets: inherit

status:
if: always()
Expand All @@ -57,8 +31,4 @@ jobs:
environment: prod
build_tag: ${{ needs.build.outputs.version }}
success: ${{ needs.build.result != 'failure' && needs.test-e2e.result != 'failure' }}
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
AWS_REGION: ${{ secrets.AWS_REGION }}
secrets: inherit
Loading

0 comments on commit 2704c24

Please sign in to comment.