From 676f9499bdb1b62d0729bf02418077792abb4d6a Mon Sep 17 00:00:00 2001 From: andhreljaKern Date: Mon, 1 Jul 2024 14:55:54 +0200 Subject: [PATCH 1/5] 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 9c57ca7274f163a7b1a64ec939a108a01f057e73 Mon Sep 17 00:00:00 2001 From: andhreljaKern Date: Mon, 1 Jul 2024 14:57:31 +0200 Subject: [PATCH 2/5] 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 d11f311ed7675ca565be267d22c3af76dd44f305 Mon Sep 17 00:00:00 2001 From: andhreljaKern Date: Tue, 2 Jul 2024 15:25:34 +0200 Subject: [PATCH 3/5] 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 82d4067ce4f6264de1288ef91b13c5888ba2498a Mon Sep 17 00:00:00 2001 From: andhreljaKern Date: Tue, 2 Jul 2024 22:38:39 +0200 Subject: [PATCH 4/5] ci: empty commit From 4ccad670937e23f30510870ec4f96604b6234d73 Mon Sep 17 00:00:00 2001 From: andhreljaKern Date: Fri, 5 Jul 2024 15:16:38 +0200 Subject: [PATCH 5/5] ci: run empty