From c1bea47bf5330c26b784f590cb7946d306c764fb Mon Sep 17 00:00:00 2001 From: Yam1x Date: Thu, 25 Sep 2025 14:46:23 +0500 Subject: [PATCH 01/13] test: remove user from dockerfile --- .github/workflows/prod-docker-publish.yml | 1 + Api/Dockerfile | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prod-docker-publish.yml b/.github/workflows/prod-docker-publish.yml index aeca20c..1883d51 100644 --- a/.github/workflows/prod-docker-publish.yml +++ b/.github/workflows/prod-docker-publish.yml @@ -4,6 +4,7 @@ on: push: branches: - master + - feature/* jobs: # this is needed to wait for the new docker image to be build and published to the registry diff --git a/Api/Dockerfile b/Api/Dockerfile index a71931d..65d3153 100644 --- a/Api/Dockerfile +++ b/Api/Dockerfile @@ -2,7 +2,6 @@ # This stage is used when running from VS in fast mode (Default for Debug configuration) FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base -USER $APP_UID WORKDIR /app EXPOSE 80 From 11d208ff799d712666cab1f25d4b60304d12ea2e Mon Sep 17 00:00:00 2001 From: Yam1x Date: Thu, 25 Sep 2025 15:05:53 +0500 Subject: [PATCH 02/13] test: return release name --- Api/ci/helmfile.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Api/ci/helmfile.yaml b/Api/ci/helmfile.yaml index 744ff12..3b2e993 100644 --- a/Api/ci/helmfile.yaml +++ b/Api/ci/helmfile.yaml @@ -3,9 +3,9 @@ repositories: url: https://charts.bitnami.com/bitnami releases: - - name: inner-circle-documents-api + - name: documents-api labels: - app: inner-circle-documents-api + app: documents-api wait: true chart: bitnami/aspnet-core version: 4.4.7 From 8ad31a5a71984f6d98d36016e6c3fb3f70690364 Mon Sep 17 00:00:00 2001 From: Yam1x Date: Thu, 25 Sep 2025 15:16:20 +0500 Subject: [PATCH 03/13] test: increase helm version --- .github/workflows/prod-docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prod-docker-publish.yml b/.github/workflows/prod-docker-publish.yml index 1883d51..dd1aad0 100644 --- a/.github/workflows/prod-docker-publish.yml +++ b/.github/workflows/prod-docker-publish.yml @@ -33,7 +33,7 @@ jobs: uses: helmfile/helmfile-action@v1.9.0 with: helmfile-version: 'v0.164.0' - helm-version: 'v3.14.4' + helm-version: 'v3.18.0' helmfile-args: > apply --namespace dev-inner-circle -f Api/ci/helmfile.yaml --state-values-set image.tag=sha-${{ github.sha }} From c65b991623b3a8c391f04d3ae88c514c8051981b Mon Sep 17 00:00:00 2001 From: Yam1x Date: Thu, 25 Sep 2025 15:31:49 +0500 Subject: [PATCH 04/13] ci: deploy prod only from master branch --- .github/workflows/prod-docker-publish.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/prod-docker-publish.yml b/.github/workflows/prod-docker-publish.yml index dd1aad0..70cfbf5 100644 --- a/.github/workflows/prod-docker-publish.yml +++ b/.github/workflows/prod-docker-publish.yml @@ -4,7 +4,6 @@ on: push: branches: - master - - feature/* jobs: # this is needed to wait for the new docker image to be build and published to the registry From 5ab78d1757ceb0e166f73166e148e83e9dbda65b Mon Sep 17 00:00:00 2001 From: Yam1x Date: Thu, 25 Sep 2025 15:36:21 +0500 Subject: [PATCH 05/13] ci: disable helm plugins --- .github/workflows/prod-docker-publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/prod-docker-publish.yml b/.github/workflows/prod-docker-publish.yml index 70cfbf5..471e7de 100644 --- a/.github/workflows/prod-docker-publish.yml +++ b/.github/workflows/prod-docker-publish.yml @@ -4,6 +4,7 @@ on: push: branches: - master + - feature/* jobs: # this is needed to wait for the new docker image to be build and published to the registry @@ -43,3 +44,4 @@ jobs: --state-values-set extraSecretEnvVars.InnerCircleServiceUrls__EmployeesServiceUrl=${{ secrets.SALARY_SERVICE_URL }} --state-values-set extraSecretEnvVars.InnerCircleServiceUrls__EmailSenderServiceUrl=${{ secrets.EMAIL_SENDER_SERVICE_URL }} helmfile-auto-init: "false" + skip-plugins: "true" \ No newline at end of file From 0876480af7cdc0984d762000453e1f3beca7b4b4 Mon Sep 17 00:00:00 2001 From: Yam1x Date: Thu, 25 Sep 2025 15:45:42 +0500 Subject: [PATCH 06/13] ci: disable helm plugins #2 --- .github/workflows/prod-docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prod-docker-publish.yml b/.github/workflows/prod-docker-publish.yml index 471e7de..9638564 100644 --- a/.github/workflows/prod-docker-publish.yml +++ b/.github/workflows/prod-docker-publish.yml @@ -44,4 +44,4 @@ jobs: --state-values-set extraSecretEnvVars.InnerCircleServiceUrls__EmployeesServiceUrl=${{ secrets.SALARY_SERVICE_URL }} --state-values-set extraSecretEnvVars.InnerCircleServiceUrls__EmailSenderServiceUrl=${{ secrets.EMAIL_SENDER_SERVICE_URL }} helmfile-auto-init: "false" - skip-plugins: "true" \ No newline at end of file + helm-plugins: > \ No newline at end of file From f6327dbe9b0a559bcf82d73abfae7ec117ce1bc9 Mon Sep 17 00:00:00 2001 From: Yam1x Date: Thu, 25 Sep 2025 16:51:24 +0500 Subject: [PATCH 07/13] ci: suppress helm diff output --- .github/workflows/prod-docker-publish.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/prod-docker-publish.yml b/.github/workflows/prod-docker-publish.yml index 9638564..23cda4a 100644 --- a/.github/workflows/prod-docker-publish.yml +++ b/.github/workflows/prod-docker-publish.yml @@ -35,7 +35,7 @@ jobs: helmfile-version: 'v0.164.0' helm-version: 'v3.18.0' helmfile-args: > - apply --namespace dev-inner-circle -f Api/ci/helmfile.yaml + apply --suppress-diff --namespace dev-inner-circle -f Api/ci/helmfile.yaml --state-values-set image.tag=sha-${{ github.sha }} --state-values-set ingress.enabled=true --state-values-set ingress.hostname=${{ secrets.HOST }} @@ -43,5 +43,4 @@ jobs: --state-values-set extraSecretEnvVars.AuthenticationOptions__PublicSigningKey=${{ secrets.PUBLIC_SIGNING_KEY }} --state-values-set extraSecretEnvVars.InnerCircleServiceUrls__EmployeesServiceUrl=${{ secrets.SALARY_SERVICE_URL }} --state-values-set extraSecretEnvVars.InnerCircleServiceUrls__EmailSenderServiceUrl=${{ secrets.EMAIL_SENDER_SERVICE_URL }} - helmfile-auto-init: "false" - helm-plugins: > \ No newline at end of file + helmfile-auto-init: "false" \ No newline at end of file From f73f65da1a60f32e67cf54bd486131642868c339 Mon Sep 17 00:00:00 2001 From: Yam1x Date: Thu, 25 Sep 2025 16:59:51 +0500 Subject: [PATCH 08/13] ci: deploy prod only from master branch --- .github/workflows/prod-docker-publish.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/prod-docker-publish.yml b/.github/workflows/prod-docker-publish.yml index 23cda4a..4689e33 100644 --- a/.github/workflows/prod-docker-publish.yml +++ b/.github/workflows/prod-docker-publish.yml @@ -4,7 +4,6 @@ on: push: branches: - master - - feature/* jobs: # this is needed to wait for the new docker image to be build and published to the registry From a3dc21a4ffb2ca278726b64ddccbd425879a5a71 Mon Sep 17 00:00:00 2001 From: Yam1x Date: Thu, 25 Sep 2025 17:36:49 +0500 Subject: [PATCH 09/13] fix: fix path to values-local-env in e2e tests in local env --- .github/workflows/karate-tests-on-pull-request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/karate-tests-on-pull-request.yml b/.github/workflows/karate-tests-on-pull-request.yml index 278183b..f61a365 100644 --- a/.github/workflows/karate-tests-on-pull-request.yml +++ b/.github/workflows/karate-tests-on-pull-request.yml @@ -64,10 +64,10 @@ jobs: # The -i flag is needed to write new image tag directly to values file sed -i "0,/tag:.*/s//tag: \"sha-${{ github.sha }}\"/" deploy/values-documents-api.yaml.gotmpl - # we need to override "latest" ref of service chart inside local-env to run tests against the current commit service chart version and not against latest from master + # we need to override "latest" ref of service chart inside local-env to run tests against the current commit service chart version and not against latest from master sed -i "0,/git+https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git?ref=.*/s//git+https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git?ref=${{ github.sha }}/" deploy/helmfile.yaml - sed -i "0,/git::https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git@\/ci\/values-local-env.yaml?ref=.*/s//git::https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git@\/ci\/values-local-env.yaml?ref=${{ github.sha }}/" deploy/helmfile.yaml + sed -i "0,/git::https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git@\/Api\/ci\/values-local-env.yaml?ref=.*/s//git::https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git@\/Api\/ci\/values-local-env.yaml?ref=${{ github.sha }}/" deploy/helmfile.yaml kind create cluster --name inner-circle --config kind-local-config.yaml --kubeconfig ./.inner-circle-cluster-kubeconfig # we need to properly expose KUBECONFIG as an absolute path, pwd prints current working directory path From adf05bd56cd2fd4e64c94ed35c093f0809eba5df Mon Sep 17 00:00:00 2001 From: Yam1x Date: Thu, 25 Sep 2025 17:59:34 +0500 Subject: [PATCH 10/13] test: cat helmfile and values files --- .github/workflows/karate-tests-on-pull-request.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/karate-tests-on-pull-request.yml b/.github/workflows/karate-tests-on-pull-request.yml index f61a365..3266c72 100644 --- a/.github/workflows/karate-tests-on-pull-request.yml +++ b/.github/workflows/karate-tests-on-pull-request.yml @@ -54,6 +54,12 @@ jobs: with: repository: TourmalineCore/inner-circle-local-env + - name: Cat values file + run: cat deploy/values-documents-api.yaml.gotmpl + + - name: Cat helmfile + run: cat deploy/helmfile.yaml + - name: Deploy Local Env to Kind k8s uses: devcontainers/ci@v0.3 with: @@ -69,6 +75,10 @@ jobs: sed -i "0,/git::https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git@\/Api\/ci\/values-local-env.yaml?ref=.*/s//git::https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git@\/Api\/ci\/values-local-env.yaml?ref=${{ github.sha }}/" deploy/helmfile.yaml + cat deploy/values-documents-api.yaml.gotmpl + + cat deploy/helmfile.yaml + kind create cluster --name inner-circle --config kind-local-config.yaml --kubeconfig ./.inner-circle-cluster-kubeconfig # we need to properly expose KUBECONFIG as an absolute path, pwd prints current working directory path export KUBECONFIG=$(pwd)/.inner-circle-cluster-kubeconfig From 961c513691665448aedaa3af13f2839cc34158e7 Mon Sep 17 00:00:00 2001 From: akovylyaeva Date: Fri, 26 Sep 2025 09:57:58 +0500 Subject: [PATCH 11/13] chore: remove cat helmfile and values files --- .github/workflows/karate-tests-on-pull-request.yml | 10 ---------- .github/workflows/prod-docker-publish.yml | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/karate-tests-on-pull-request.yml b/.github/workflows/karate-tests-on-pull-request.yml index 3266c72..f61a365 100644 --- a/.github/workflows/karate-tests-on-pull-request.yml +++ b/.github/workflows/karate-tests-on-pull-request.yml @@ -54,12 +54,6 @@ jobs: with: repository: TourmalineCore/inner-circle-local-env - - name: Cat values file - run: cat deploy/values-documents-api.yaml.gotmpl - - - name: Cat helmfile - run: cat deploy/helmfile.yaml - - name: Deploy Local Env to Kind k8s uses: devcontainers/ci@v0.3 with: @@ -75,10 +69,6 @@ jobs: sed -i "0,/git::https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git@\/Api\/ci\/values-local-env.yaml?ref=.*/s//git::https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git@\/Api\/ci\/values-local-env.yaml?ref=${{ github.sha }}/" deploy/helmfile.yaml - cat deploy/values-documents-api.yaml.gotmpl - - cat deploy/helmfile.yaml - kind create cluster --name inner-circle --config kind-local-config.yaml --kubeconfig ./.inner-circle-cluster-kubeconfig # we need to properly expose KUBECONFIG as an absolute path, pwd prints current working directory path export KUBECONFIG=$(pwd)/.inner-circle-cluster-kubeconfig diff --git a/.github/workflows/prod-docker-publish.yml b/.github/workflows/prod-docker-publish.yml index 4689e33..058d233 100644 --- a/.github/workflows/prod-docker-publish.yml +++ b/.github/workflows/prod-docker-publish.yml @@ -42,4 +42,4 @@ jobs: --state-values-set extraSecretEnvVars.AuthenticationOptions__PublicSigningKey=${{ secrets.PUBLIC_SIGNING_KEY }} --state-values-set extraSecretEnvVars.InnerCircleServiceUrls__EmployeesServiceUrl=${{ secrets.SALARY_SERVICE_URL }} --state-values-set extraSecretEnvVars.InnerCircleServiceUrls__EmailSenderServiceUrl=${{ secrets.EMAIL_SENDER_SERVICE_URL }} - helmfile-auto-init: "false" \ No newline at end of file + helmfile-auto-init: "false" \ No newline at end of file From 9f8f4d039f9fd836a6b2016e5cdf9308f1b0c562 Mon Sep 17 00:00:00 2001 From: akovylyaeva Date: Fri, 26 Sep 2025 11:11:58 +0500 Subject: [PATCH 12/13] refactor: replace ci folder to project root --- .github/workflows/karate-tests-on-pull-request.yml | 2 +- {Api/ci => ci}/helmfile.yaml | 0 {Api/ci => ci}/values-local-env.yaml | 0 {Api/ci => ci}/values.yaml | 0 4 files changed, 1 insertion(+), 1 deletion(-) rename {Api/ci => ci}/helmfile.yaml (100%) rename {Api/ci => ci}/values-local-env.yaml (100%) rename {Api/ci => ci}/values.yaml (100%) diff --git a/.github/workflows/karate-tests-on-pull-request.yml b/.github/workflows/karate-tests-on-pull-request.yml index f61a365..ec81193 100644 --- a/.github/workflows/karate-tests-on-pull-request.yml +++ b/.github/workflows/karate-tests-on-pull-request.yml @@ -67,7 +67,7 @@ jobs: # we need to override "latest" ref of service chart inside local-env to run tests against the current commit service chart version and not against latest from master sed -i "0,/git+https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git?ref=.*/s//git+https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git?ref=${{ github.sha }}/" deploy/helmfile.yaml - sed -i "0,/git::https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git@\/Api\/ci\/values-local-env.yaml?ref=.*/s//git::https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git@\/Api\/ci\/values-local-env.yaml?ref=${{ github.sha }}/" deploy/helmfile.yaml + sed -i "0,/git::https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git@\/ci\/values-local-env.yaml?ref=.*/s//git::https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git@\/ci\/values-local-env.yaml?ref=${{ github.sha }}/" deploy/helmfile.yaml kind create cluster --name inner-circle --config kind-local-config.yaml --kubeconfig ./.inner-circle-cluster-kubeconfig # we need to properly expose KUBECONFIG as an absolute path, pwd prints current working directory path diff --git a/Api/ci/helmfile.yaml b/ci/helmfile.yaml similarity index 100% rename from Api/ci/helmfile.yaml rename to ci/helmfile.yaml diff --git a/Api/ci/values-local-env.yaml b/ci/values-local-env.yaml similarity index 100% rename from Api/ci/values-local-env.yaml rename to ci/values-local-env.yaml diff --git a/Api/ci/values.yaml b/ci/values.yaml similarity index 100% rename from Api/ci/values.yaml rename to ci/values.yaml From d55fa54498d5d85691dfd995a09fc165e22994e8 Mon Sep 17 00:00:00 2001 From: Yam1x Date: Fri, 26 Sep 2025 11:56:15 +0500 Subject: [PATCH 13/13] Revert "refactor: replace ci folder to project root" This reverts commit 9f8f4d039f9fd836a6b2016e5cdf9308f1b0c562. --- .github/workflows/karate-tests-on-pull-request.yml | 2 +- {ci => Api/ci}/helmfile.yaml | 0 {ci => Api/ci}/values-local-env.yaml | 0 {ci => Api/ci}/values.yaml | 0 4 files changed, 1 insertion(+), 1 deletion(-) rename {ci => Api/ci}/helmfile.yaml (100%) rename {ci => Api/ci}/values-local-env.yaml (100%) rename {ci => Api/ci}/values.yaml (100%) diff --git a/.github/workflows/karate-tests-on-pull-request.yml b/.github/workflows/karate-tests-on-pull-request.yml index ec81193..f61a365 100644 --- a/.github/workflows/karate-tests-on-pull-request.yml +++ b/.github/workflows/karate-tests-on-pull-request.yml @@ -67,7 +67,7 @@ jobs: # we need to override "latest" ref of service chart inside local-env to run tests against the current commit service chart version and not against latest from master sed -i "0,/git+https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git?ref=.*/s//git+https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git?ref=${{ github.sha }}/" deploy/helmfile.yaml - sed -i "0,/git::https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git@\/ci\/values-local-env.yaml?ref=.*/s//git::https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git@\/ci\/values-local-env.yaml?ref=${{ github.sha }}/" deploy/helmfile.yaml + sed -i "0,/git::https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git@\/Api\/ci\/values-local-env.yaml?ref=.*/s//git::https:\/\/github.com\/TourmalineCore\/${{ github.event.repository.name }}.git@\/Api\/ci\/values-local-env.yaml?ref=${{ github.sha }}/" deploy/helmfile.yaml kind create cluster --name inner-circle --config kind-local-config.yaml --kubeconfig ./.inner-circle-cluster-kubeconfig # we need to properly expose KUBECONFIG as an absolute path, pwd prints current working directory path diff --git a/ci/helmfile.yaml b/Api/ci/helmfile.yaml similarity index 100% rename from ci/helmfile.yaml rename to Api/ci/helmfile.yaml diff --git a/ci/values-local-env.yaml b/Api/ci/values-local-env.yaml similarity index 100% rename from ci/values-local-env.yaml rename to Api/ci/values-local-env.yaml diff --git a/ci/values.yaml b/Api/ci/values.yaml similarity index 100% rename from ci/values.yaml rename to Api/ci/values.yaml