Skip to content

Commit

Permalink
full candidate
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Kubica committed Sep 8, 2022
1 parent 866f218 commit f881f93
Show file tree
Hide file tree
Showing 27 changed files with 109 additions and 431 deletions.
146 changes: 0 additions & 146 deletions .github/actions/pending_check/action.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions .github/docs/workflow_architecture.svg

This file was deleted.

95 changes: 95 additions & 0 deletions .github/workflows/acceptance_tests_broker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Acceptance Tests (Broker)
on:
pull_request:
types: [ opened, labeled, synchronize ]
env:
MAVEN_VERSION: 3.6.3
MAVEN_SHA: c35a1803a6e70a126e80b2b3ae33eed961f83ed74d18fcd16909b2d44d7dada3203f1ffe726c17ef8dcca2dcaa9fca676987befeadc9b9f759967a8cb77181c0
BUILDIN_MODE: false
SERVICE_OFFERING_ENABLED: true
PR_NUMBER: "${{ github.event.pull_request.number }}"
DEPLOYMENT_NAME: "autoscaler-${{ github.event.pull_request.number }}"
SERVICE_BROKER_NAME: "autoscaler-${{ github.event.pull_request.number }}servicebroker"
SERVICE_NAME: "autoscaler-${{ github.event.pull_request.number }}"
BBL_STATE_PATH: "${{ github.workspace }}/bbl/bbl-state"
NAME_PREFIX: "autoscaler-${{ github.event.pull_request.number }}-TESTS"
GINKGO_OPTS: "--fail-fast"
NODES: 3
AUTOSCALER_DIR: "${{ github.workspace }}/app-autoscaler-release"
CI_DIR: "${{ github.workspace }}/app-autoscaler-release/ci"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
deploy_autoscaler:
# Determine if we require jobs for Acceptance Tests in this workflow by checking relevant events and labels.
# Verifcation job runs always.
if: |
( ( github.event.action == 'opened' || github.event.action == 'synchronize' )
&& ( contains(github.event.pull_request.labels.*.name, 'allow-acceptance-tests') || contains(github.event.pull_request.labels.*.name, 'dependencies') )
) ||
( ( github.event.action == 'labeled' )
&& ( github.event.label.name == 'allow-acceptance-tests' || github.event.label.name == 'dependencies' )
)
name: Deploy autoscaler
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: app-autoscaler-release
- uses: ./app-autoscaler-release/.github/actions/setup_acceptance
with:
ssh-key: ${{ secrets.BBL_SSH_KEY }}
- name: Deploy autoscaler
run: |
cd ${{ env.AUTOSCALER_DIR }}
make deployment
acceptance_tests:
needs: [ deploy_autoscaler ]
strategy:
matrix:
suite: [ API, APP, BROKER ]
runs-on: ubuntu-latest
name: ${{ matrix.suite }} test
steps:
- uses: actions/checkout@v3
with:
path: app-autoscaler-release
- uses: ./app-autoscaler-release/.github/actions/setup_acceptance
with:
ssh-key: ${{ secrets.BBL_SSH_KEY }}
- name: run acceptance test - ${{ matrix.suite }}
run: |
cd ${{ env.AUTOSCALER_DIR }}
# SUITES needs to be lowercase for ginkgo
mysuite="${{matrix.suite}}"
echo make acceptance-tests SUITES="${mysuite,,}"
acceptance_tests_verify:
needs: [ deploy_autoscaler, acceptance_tests ]
if: ${{ always() }}
name: Acceptance Tests Result (Buildin)
runs-on: ubuntu-latest
steps:
- uses: technote-space/workflow-conclusion-action@v3
- name: Conclude workflow run
run: if [ ${WORKFLOW_CONCLUSION} != 'success' ]; then exit 1; fi

deployment_cleanup:
needs: [ acceptance_tests ]
name: Deployment cleanup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: app-autoscaler-release
- uses: ./app-autoscaler-release/.github/actions/setup_acceptance
with:
ssh-key: ${{ secrets.BBL_SSH_KEY }}
- run: |
cd ${{ env.AUTOSCALER_DIR }}
make deployment-cleanup
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
path: app-autoscaler-release
ref: main
- uses: ./app-autoscaler-release/.github/actions/acceptance_tests_common
- uses: ./app-autoscaler-release/.github/actions/setup_acceptance
with:
ssh-key: ${{ secrets.BBL_SSH_KEY }}

Expand Down
32 changes: 12 additions & 20 deletions .github/workflows/acceptance_tests_buildin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ env:
MAVEN_SHA: c35a1803a6e70a126e80b2b3ae33eed961f83ed74d18fcd16909b2d44d7dada3203f1ffe726c17ef8dcca2dcaa9fca676987befeadc9b9f759967a8cb77181c0
BUILDIN_MODE: true
SERVICE_OFFERING_ENABLED: false
check_name: "acceptance-check-buildin"
PR_NUMBER: "${{ github.event.pull_request.number }}"
DEPLOYMENT_NAME: "autoscaler-${{ github.event.pull_request.number }}"
SERVICE_BROKER_NAME: "autoscaler-${{ github.event.pull_request.number }}servicebroker"
Expand All @@ -28,8 +27,8 @@ concurrency:

jobs:
deploy_autoscaler:
# Determine if we require to run Acceptance Tests jobs in this workflow by checking relevant events and labels.
# Finalisation job runs always since we use branch protection rule for acceptance tests.
# Determine if we require jobs for Acceptance Tests in this workflow by checking relevant events and labels.
# Verifcation job runs always.
if: |
( ( github.event.action == 'opened' || github.event.action == 'synchronize' )
&& ( contains(github.event.pull_request.labels.*.name, 'allow-acceptance-tests') || contains(github.event.pull_request.labels.*.name, 'dependencies') )
Expand All @@ -43,13 +42,11 @@ jobs:
- uses: actions/checkout@v3
with:
path: app-autoscaler-release
# TODO: unhashme
# - uses: ./app-autoscaler-release/.github/actions/acceptance_setup
# with:
# ssh-key: ${{ secrets.BBL_SSH_KEY }}
- uses: ./app-autoscaler-release/.github/actions/setup_acceptance
with:
ssh-key: ${{ secrets.BBL_SSH_KEY }}
- name: Deploy autoscaler
run: |
echo ">> WIP: exiting early"; exit 1
cd ${{ env.AUTOSCALER_DIR }}
make deployment
Expand All @@ -59,25 +56,22 @@ jobs:
matrix:
suite: [ API, APP ]
runs-on: ubuntu-latest
name: ${{ matrix.suite }}
name: ${{ matrix.suite }} test
steps:
- uses: actions/checkout@v3
with:
path: app-autoscaler-release
# TODO: unhashme
# - uses: ./app-autoscaler-release/.github/actions/acceptance_setup
# with:
# ssh-key: ${{ secrets.BBL_SSH_KEY }}
- uses: ./app-autoscaler-release/.github/actions/setup_acceptance
with:
ssh-key: ${{ secrets.BBL_SSH_KEY }}
- name: run acceptance test - ${{ matrix.suite }}
run: |
echo ">> WIP: exiting early"; exit 1
cd ${{ env.AUTOSCALER_DIR }}
# SUITES needs to be lowercase for ginkgo
mysuite="${{matrix.suite}}"
echo make acceptance-tests SUITES="${mysuite,,}"
acceptance_tests_verify:
# This job needs acceptance_tests as it needs to wait for tests to complete
needs: [ deploy_autoscaler, acceptance_tests ]
if: ${{ always() }}
name: Acceptance Tests Result (Buildin)
Expand All @@ -95,12 +89,10 @@ jobs:
- uses: actions/checkout@v3
with:
path: app-autoscaler-release
# # TODO: unhash me
# - uses: ./app-autoscaler-release/.github/actions/acceptance_setup
# with:
# ssh-key: ${{ secrets.BBL_SSH_KEY }}
- uses: ./app-autoscaler-release/.github/actions/setup_acceptance
with:
ssh-key: ${{ secrets.BBL_SSH_KEY }}
- run: |
echo ">> WIP: exiting early"; exit 0
cd ${{ env.AUTOSCALER_DIR }}
make deployment-cleanup
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
path: app-autoscaler-release
ref: main
- uses: ./app-autoscaler-release/.github/actions/acceptance_tests_common
- uses: ./app-autoscaler-release/.github/actions/setup_acceptance
with:
ssh-key: ${{ secrets.BBL_SSH_KEY }}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit f881f93

Please sign in to comment.