From d9e48df176dc11b27cb8643d2713699e7d8363a9 Mon Sep 17 00:00:00 2001 From: andhreljaKern Date: Mon, 1 Jul 2024 14:55:54 +0200 Subject: [PATCH 1/6] ci: add CODEOWNERS --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..b86f8a0 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +.github/ @code-kern-ai/devops-admin @code-kern-ai/dev-admin From a55147d6eb11e19a6778a81503606cf00e1327dc Mon Sep 17 00:00:00 2001 From: andhreljaKern Date: Mon, 1 Jul 2024 14:57:31 +0200 Subject: [PATCH 2/6] ci: add github actions --- .github/workflows/az_acr_push.yml | 15 +++++++++++++++ .github/workflows/k8s_deploy.yml | 22 ++++++++++++++++++++++ .github/workflows/k8s_test.yml | 19 +++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 .github/workflows/az_acr_push.yml create mode 100644 .github/workflows/k8s_deploy.yml create mode 100644 .github/workflows/k8s_test.yml diff --git a/.github/workflows/az_acr_push.yml b/.github/workflows/az_acr_push.yml new file mode 100644 index 0000000..379cd94 --- /dev/null +++ b/.github/workflows/az_acr_push.yml @@ -0,0 +1,15 @@ +name: 'ACR: Docker Push' + +on: + workflow_dispatch: + + push: + branches: + - "**" + tags-ignore: + - "**" + +jobs: + call-az-acr-push: + uses: code-kern-ai/cicd-deployment-scripts/.github/workflows/az_acr_push.yml@dev + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/k8s_deploy.yml b/.github/workflows/k8s_deploy.yml new file mode 100644 index 0000000..0c30865 --- /dev/null +++ b/.github/workflows/k8s_deploy.yml @@ -0,0 +1,22 @@ +name: 'K8: Prepare Deployment' # rename + +on: + # workflow_dispatch: + release: + types: [prereleased] + pull_request: + branches: + - dev + types: [closed] + +# Special permissions required for OIDC authentication +permissions: + id-token: write + contents: read + actions: read + +jobs: + call-k8-release: + uses: code-kern-ai/cicd-deployment-scripts/.github/workflows/k8s_release.yml@dev + if: github.event_name == 'pull_request' && github.event.pull_request.merged || github.event_name == 'release' + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/k8s_test.yml b/.github/workflows/k8s_test.yml new file mode 100644 index 0000000..0c39c07 --- /dev/null +++ b/.github/workflows/k8s_test.yml @@ -0,0 +1,19 @@ +name: 'K8: Test' + +on: + pull_request: + types: [opened, synchronize, reopened] + +# Special permissions required for OIDC authentication +permissions: + id-token: write + contents: read + actions: read + + +jobs: + call-k8-test: + uses: code-kern-ai/cicd-deployment-scripts/.github/workflows/k8s_test.yml@dev + secrets: inherit + with: + test_cmd: 'pytest' \ No newline at end of file From ae9877edccf053ec1aa77e3ba8f652ff23bad853 Mon Sep 17 00:00:00 2001 From: andhreljaKern Date: Mon, 1 Jul 2024 15:27:30 +0200 Subject: [PATCH 3/6] ci: remove k8s_test --- .github/workflows/k8s_test.yml | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 .github/workflows/k8s_test.yml diff --git a/.github/workflows/k8s_test.yml b/.github/workflows/k8s_test.yml deleted file mode 100644 index 0c39c07..0000000 --- a/.github/workflows/k8s_test.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: 'K8: Test' - -on: - pull_request: - types: [opened, synchronize, reopened] - -# Special permissions required for OIDC authentication -permissions: - id-token: write - contents: read - actions: read - - -jobs: - call-k8-test: - uses: code-kern-ai/cicd-deployment-scripts/.github/workflows/k8s_test.yml@dev - secrets: inherit - with: - test_cmd: 'pytest' \ No newline at end of file From b6217ed85f85ae0931a3624f8c0e24920602a5f0 Mon Sep 17 00:00:00 2001 From: andhreljaKern Date: Tue, 2 Jul 2024 15:25:36 +0200 Subject: [PATCH 4/6] ci: skip running az_acr_push on dev push --- .github/workflows/az_acr_push.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/az_acr_push.yml b/.github/workflows/az_acr_push.yml index 379cd94..964d765 100644 --- a/.github/workflows/az_acr_push.yml +++ b/.github/workflows/az_acr_push.yml @@ -6,6 +6,7 @@ on: push: branches: - "**" + - "!dev" tags-ignore: - "**" From 1a6c37c440d9b5be211b125b54803676f262578f Mon Sep 17 00:00:00 2001 From: andhreljaKern Date: Tue, 2 Jul 2024 21:59:36 +0200 Subject: [PATCH 5/6] ci: empty commit From 6963e76ff7e0a2909ec9dccf0ba957d85fdd3aee Mon Sep 17 00:00:00 2001 From: andhreljaKern Date: Fri, 5 Jul 2024 15:16:41 +0200 Subject: [PATCH 6/6] ci: run empty