This repository has been archived by the owner on Nov 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from neicnordic/refactoring
Refactoring
- Loading branch information
Showing
100 changed files
with
2,082 additions
and
1,518 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,94 @@ | ||
name: sda-pipeline deployment | ||
|
||
on: [push,pull_request] | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test: [sftp-inbox, s3-inbox] | ||
inbox: [posix, s3] | ||
deployment: [federated, standalone] | ||
cert: [issuer, manual] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ACTIONS_ALLOW_UNSECURE_COMMANDS | ||
id: ACTIONS_ALLOW_UNSECURE_COMMANDS | ||
run: echo 'ACTIONS_ALLOW_UNSECURE_COMMANDS=true' >> $GITHUB_ENV | ||
# Currently the sftp inbox test covers the standalone test, whereas the s3 test checks the federated topology | ||
- name: fixup env | ||
run: | | ||
if [ "${{ matrix.test }}" = "sftp-inbox" ]; then | ||
echo "SVCS=backup doa finalize inbox ingest intercept mapper verify download" >> "$GITHUB_ENV"; | ||
else | ||
echo "SVCS=auth backup doa finalize inbox ingest mapper verify download" >> "$GITHUB_ENV"; | ||
fi | ||
- uses: actions/checkout@v3 | ||
- name: Install kube dependencies | ||
run: bash ./dev_tools/scripts/install-kube-deps.sh | ||
- name: Initialise k3d | ||
run: bash ./dev_tools/scripts/init-k3d.sh | ||
- name: Wait for k3d to become ready | ||
run: bash ./dev_tools/scripts/wait-for-pods.sh metrics-server k8s-app kube-system | ||
- name: Install sda dependencies | ||
run: bash ./dev_tools/scripts/install-sda-deps.sh | ||
- name: Create certificates | ||
run: bash ./dev_tools/scripts/make-certs.sh | ||
- name: Create secrets | ||
run: bash ./dev_tools/scripts/create-secrets.sh | ||
- name: Set up services configuration | ||
run: bash ./dev_tools/scripts/svc-setup.sh | ||
- name: Deploy SDA database | ||
run: bash ./dev_tools/scripts/deploy-db.sh | ||
- name: Wait for database to become ready | ||
run: bash ./dev_tools/scripts/wait-for-pods.sh database | ||
- name: Deploy mock oidc server | ||
if: matrix.test == 's3-inbox' | ||
run: bash ./dev_tools/scripts/deploy-oidc.sh | ||
- name: Deploy minio | ||
if: matrix.test == 's3-inbox' | ||
run: bash ./dev_tools/scripts/deploy-minio.sh | ||
- name: Wait for minio to become ready | ||
if: matrix.test == 's3-inbox' | ||
run: bash ./dev_tools/scripts/wait-for-pods.sh minio app | ||
- name: Create s3 buckets | ||
if: matrix.test == 's3-inbox' | ||
run: bash ./dev_tools/scripts/create-s3-buckets.sh | ||
- name: Start CEGA services | ||
run: bash ./dev_tools/scripts/deploy-cega.sh | ||
- name: Wait for CEGA to become ready | ||
run: bash ./dev_tools/scripts/wait-for-pods.sh cega-mq app | ||
- name: Deploy SDA message broker | ||
run: bash ./dev_tools/scripts/deploy-mq.sh | ||
- name: Wait for broker to become ready | ||
run: bash ./dev_tools/scripts/wait-for-pods.sh broker | ||
- name: Deploy the SDA stack for posix | ||
if: matrix.test == 'sftp-inbox' | ||
run: | | ||
kubectl apply -f dev_tools/config/posix-volumes.yaml; | ||
bash ./dev_tools/scripts/sda/deploy-posix-standalone.sh "not-orchestrated"; | ||
- name: Deploy the SDA stack for s3 | ||
if: matrix.test == 's3-inbox' | ||
run: bash ./dev_tools/scripts/sda/deploy-s3-federated.sh | ||
- name: Wait for sda to become ready | ||
run: bash ./dev_tools/scripts/wait-for-pods.sh "${{ env.SVCS }}" | ||
- name: Run helm test | ||
run: bash ./dev_tools/scripts/run-helm-test.sh | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install kube dependencies | ||
run: bash ./dev_tools/scripts/install-kube-deps.sh | ||
|
||
- name: Initialise k3d | ||
run: bash ./dev_tools/scripts/init-k3d.sh | ||
|
||
- name: Wait for k3d to become ready | ||
run: bash ./dev_tools/scripts/wait-for-pods.sh metrics-server k8s-app kube-system | ||
|
||
- name: Install sda dependencies | ||
run: bash ./dev_tools/scripts/install-sda-deps.sh | ||
|
||
- name: Create certificates | ||
if: matrix.cert == 'manual' | ||
run: bash ./dev_tools/scripts/make-certs.sh | ||
|
||
- name: Create certificate issuer | ||
if: matrix.cert == 'issuer' | ||
run: bash ./dev_tools/scripts/deploy-cert-manager.sh | ||
|
||
- name: Create secrets | ||
run: bash ./dev_tools/scripts/create-secrets.sh | ||
|
||
- name: Set up services configuration | ||
if: matrix.cert == 'manual' | ||
run: bash ./dev_tools/scripts/svc-setup.sh | ||
|
||
- name: Deploy SDA database | ||
run: bash ./dev_tools/scripts/deploy-db.sh "${{ matrix.cert }}" | ||
|
||
- name: Wait for database to become ready | ||
run: bash ./dev_tools/scripts/wait-for-pods.sh database | ||
|
||
- name: Deploy mock oidc server | ||
if: matrix.inbox == 's3' | ||
run: bash ./dev_tools/scripts/deploy-oidc.sh | ||
|
||
- name: Deploy minio | ||
if: matrix.inbox == 's3' | ||
run: bash ./dev_tools/scripts/deploy-minio.sh "${{ matrix.cert }}" | ||
|
||
- name: Wait for minio to become ready | ||
if: matrix.inbox == 's3' | ||
run: bash ./dev_tools/scripts/wait-for-pods.sh minio app | ||
|
||
- name: Create s3 buckets | ||
if: matrix.inbox == 's3' | ||
run: bash ./dev_tools/scripts/create-s3-buckets.sh | ||
|
||
- name: Start CEGA services | ||
if: matrix.deployment == 'federated' | ||
run: bash ./dev_tools/scripts/deploy-cega.sh "${{ matrix.cert }}" | ||
|
||
- name: Wait for CEGA to become ready | ||
if: matrix.deployment == 'federated' | ||
run: bash ./dev_tools/scripts/wait-for-pods.sh cega-mq app | ||
|
||
- name: Deploy SDA message broker | ||
run: bash ./dev_tools/scripts/deploy-mq.sh "${{ matrix.deployment }}" "${{ matrix.cert }}" | ||
|
||
- name: Wait for broker to become ready | ||
run: bash ./dev_tools/scripts/wait-for-pods.sh broker | ||
|
||
- name: Deploy the SDA stack for posix | ||
if: matrix.inbox == 'posix' | ||
run: | | ||
kubectl apply -f dev_tools/config/posix-volumes.yaml; | ||
bash ./dev_tools/scripts/sda/deploy-posix.sh "${{ matrix.deployment }}" "${{ matrix.cert }}" | ||
- name: Deploy the SDA stack for s3 | ||
if: matrix.inbox == 's3' | ||
run: bash ./dev_tools/scripts/sda/deploy-s3.sh "${{ matrix.deployment }}" "${{ matrix.cert }}" | ||
|
||
- name: Wait for sda to become ready | ||
run: bash ./dev_tools/scripts/wait-for-pods.sh "${{ format('{0}_{1}_svc_list', matrix.deployment, matrix.inbox) }}" | ||
|
||
- name: Run helm test | ||
run: bash ./dev_tools/scripts/run-helm-test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.