From fab35ea35424b2cdccc11caeee67c9ba3c01ff27 Mon Sep 17 00:00:00 2001 From: vivet Date: Thu, 4 Jun 2026 18:33:55 +0200 Subject: [PATCH 01/33] Updated --- .github/workflows/build-and-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 130b0217..ce808150 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -7,7 +7,7 @@ on: branches: - master env: - VERSION: 10.0.0-rc1 + VERSION: 10.0.0 jobs: build-and-deploy: runs-on: ubuntu-latest From b718115c9811b0032f5b417115aa44d3aa51e741 Mon Sep 17 00:00:00 2001 From: vivet Date: Sat, 13 Jun 2026 17:57:49 +0200 Subject: [PATCH 02/33] Updated --- .github/workflows/build-and-deploy.yml | 1 + .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api.ApiClients/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api.Authorization/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api.Cookies/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api.CustomService/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 19 +++++++++------- Api.Data.Audit/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 19 +++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 19 +++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 19 +++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 19 +++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 19 +++++++++------- Api.Data.Identity/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api.Data.InMemory/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 19 +++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 19 +++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 19 +++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 19 +++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 19 +++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 19 +++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 19 +++++++++------- Api.Data.MySql/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 19 +++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 19 +++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 19 +++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 19 +++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 19 +++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api.Data.SqLite/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 19 +++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 19 +++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 19 +++++++++------- Api.Data.Triggers/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api.Documentation/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 18 +++++++++------ Api.ErrorHandling/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api.HealthChecks/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api.Hosting.Http/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 22 +++++++++++-------- Api.Hosting.Https/.kubernetes/deployment.yaml | 2 +- .../.kubernetes/httproute-443.yaml | 2 +- .../.kubernetes/httproute-80.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api.Localization/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api.Logging.NLog/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api.MultipartJson/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 22 +++++++++++-------- .../.kubernetes/deployment.yaml | 2 +- .../.kubernetes/httproute-443.yaml | 2 +- .../.kubernetes/httproute-80.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 22 +++++++++++-------- .../.kubernetes/deployment.yaml | 2 +- .../.kubernetes/httproute-443.yaml | 2 +- .../.kubernetes/httproute-80.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api.ResponseCache/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- .../.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api.Session/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api.StartupTasks/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api.StaticFiles/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api.Storage.Azure/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api.Storage.Local/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api.TimeZone/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api.Versioning/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api.VirusScan/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 20 ++++++++++------- Api._Blank/.kubernetes/deployment.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 22 +++++++++++-------- .../.kubernetes/cronjob.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 22 +++++++++++-------- .../.kubernetes/cronjob.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 22 +++++++++++-------- .../.kubernetes/cronjob.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 21 ++++++++++-------- Console.Data.MySql/.kubernetes/cronjob.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 21 ++++++++++-------- .../.kubernetes/cronjob.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 22 +++++++++++-------- Console.Data.SqLite/.kubernetes/cronjob.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 22 ++++++++++--------- .../.kubernetes/cronjob.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 22 +++++++++++-------- .../.kubernetes/cronjob.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 22 +++++++++++-------- .../.kubernetes/cronjob.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 22 +++++++++++-------- Console.Localization/.kubernetes/cronjob.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 22 +++++++++++-------- .../.kubernetes/cronjob.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 22 +++++++++++-------- .../.kubernetes/cronjob.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 22 +++++++++++-------- Console.Logging.NLog/.kubernetes/cronjob.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 22 +++++++++++-------- .../.kubernetes/cronjob.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 22 +++++++++++-------- Console.StartupTasks/.kubernetes/cronjob.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 22 +++++++++++-------- .../.kubernetes/cronjob.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 22 +++++++++++-------- .../.kubernetes/cronjob.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 22 +++++++++++-------- Console.Workers/.kubernetes/cronjob.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 22 +++++++++++-------- Console._Blank/.kubernetes/cronjob.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 22 +++++++++++-------- Web._Blank/.kubernetes/deployment.yaml | 2 +- 187 files changed, 1175 insertions(+), 839 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index ce808150..02847f09 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -28,6 +28,7 @@ jobs: name: "Release ${{ env.VERSION }}" body: | Version: ${{ env.VERSION }} + Build run: ${{ github.run_number }} Commit: ${{ github.sha }} token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml b/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml index 2e9dbcea..d0bfd8c2 100644 --- a/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.ApiClients.Audit/.kubernetes/deployment.yaml b/Api.ApiClients.Audit/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.ApiClients.Audit/.kubernetes/deployment.yaml +++ b/Api.ApiClients.Audit/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml b/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml index bec796fc..344a820b 100644 --- a/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.ApiClients.Entity/.kubernetes/deployment.yaml b/Api.ApiClients.Entity/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.ApiClients.Entity/.kubernetes/deployment.yaml +++ b/Api.ApiClients.Entity/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml b/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml index 1fa27e27..a430e3e7 100644 --- a/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.ApiClients.RootLogIn/.kubernetes/deployment.yaml b/Api.ApiClients.RootLogIn/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.ApiClients.RootLogIn/.kubernetes/deployment.yaml +++ b/Api.ApiClients.RootLogIn/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.ApiClients/.github/workflows/build-and-deploy.yml b/Api.ApiClients/.github/workflows/build-and-deploy.yml index f97c3744..7c382b36 100644 --- a/Api.ApiClients/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.ApiClients/.kubernetes/deployment.yaml b/Api.ApiClients/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.ApiClients/.kubernetes/deployment.yaml +++ b/Api.ApiClients/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml b/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml index 1b1ae5fa..0d20f495 100644 --- a/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml +++ b/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -87,13 +87,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -108,8 +106,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -129,6 +129,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/auth-jwt-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-jwt-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-jwt-secret.tmp.yaml; if ($LastExitCode -ne 0) @@ -173,6 +175,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Auth.External.Custom/.kubernetes/deployment.yaml b/Api.Auth.External.Custom/.kubernetes/deployment.yaml index aca5889f..85976888 100644 --- a/Api.Auth.External.Custom/.kubernetes/deployment.yaml +++ b/Api.Auth.External.Custom/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml b/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml index b33ac0de..2afe476e 100644 --- a/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml +++ b/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -87,13 +87,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -108,8 +106,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -129,6 +129,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/auth-jwt-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-jwt-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-jwt-secret.tmp.yaml; if ($LastExitCode -ne 0) @@ -173,6 +175,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Auth.RootLogin/.kubernetes/deployment.yaml b/Api.Auth.RootLogin/.kubernetes/deployment.yaml index aca5889f..85976888 100644 --- a/Api.Auth.RootLogin/.kubernetes/deployment.yaml +++ b/Api.Auth.RootLogin/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Authorization/.github/workflows/build-and-deploy.yml b/Api.Authorization/.github/workflows/build-and-deploy.yml index 27a37e6b..1d16b4ad 100644 --- a/Api.Authorization/.github/workflows/build-and-deploy.yml +++ b/Api.Authorization/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -87,13 +87,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -108,8 +106,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -129,6 +129,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/auth-jwt-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-jwt-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-jwt-secret.tmp.yaml; if ($LastExitCode -ne 0) @@ -173,6 +175,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Authorization/.kubernetes/deployment.yaml b/Api.Authorization/.kubernetes/deployment.yaml index aca5889f..85976888 100644 --- a/Api.Authorization/.kubernetes/deployment.yaml +++ b/Api.Authorization/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml b/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml index 2b200b6d..80054b21 100644 --- a/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml +++ b/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.ContentNegotiation/.kubernetes/deployment.yaml b/Api.ContentNegotiation/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.ContentNegotiation/.kubernetes/deployment.yaml +++ b/Api.ContentNegotiation/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Cookies/.github/workflows/build-and-deploy.yml b/Api.Cookies/.github/workflows/build-and-deploy.yml index 3a341c47..3076bcb2 100644 --- a/Api.Cookies/.github/workflows/build-and-deploy.yml +++ b/Api.Cookies/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Cookies/.kubernetes/deployment.yaml b/Api.Cookies/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.Cookies/.kubernetes/deployment.yaml +++ b/Api.Cookies/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml b/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml index add53801..1f818ee1 100644 --- a/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml +++ b/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.CustomConfigSection/.kubernetes/deployment.yaml b/Api.CustomConfigSection/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.CustomConfigSection/.kubernetes/deployment.yaml +++ b/Api.CustomConfigSection/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml b/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml index b1ae72ca..bbf6e050 100644 --- a/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml +++ b/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.CustomMiddleware/.kubernetes/deployment.yaml b/Api.CustomMiddleware/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.CustomMiddleware/.kubernetes/deployment.yaml +++ b/Api.CustomMiddleware/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.CustomService/.github/workflows/build-and-deploy.yml b/Api.CustomService/.github/workflows/build-and-deploy.yml index 4cb38d5a..95835325 100644 --- a/Api.CustomService/.github/workflows/build-and-deploy.yml +++ b/Api.CustomService/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.CustomService/.kubernetes/deployment.yaml b/Api.CustomService/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.CustomService/.kubernetes/deployment.yaml +++ b/Api.CustomService/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.Audit/.github/workflows/build-and-deploy.yml b/Api.Data.Audit/.github/workflows/build-and-deploy.yml index e8e13f4a..d92102d3 100644 --- a/Api.Data.Audit/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Audit/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -89,13 +89,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -110,8 +108,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -174,6 +174,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -220,6 +221,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.Audit/.kubernetes/deployment.yaml b/Api.Data.Audit/.kubernetes/deployment.yaml index 7e8688ef..1579cedc 100644 --- a/Api.Data.Audit/.kubernetes/deployment.yaml +++ b/Api.Data.Audit/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml b/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml index ab07e819..26a104d5 100644 --- a/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml +++ b/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -89,13 +89,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -110,8 +108,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -174,6 +174,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -220,6 +221,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.EntityEvents/.kubernetes/deployment.yaml b/Api.Data.EntityEvents/.kubernetes/deployment.yaml index ddbdae40..d5cc6c4a 100644 --- a/Api.Data.EntityEvents/.kubernetes/deployment.yaml +++ b/Api.Data.EntityEvents/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml index e43c9804..974c23a2 100644 --- a/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -92,13 +92,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -113,8 +111,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -177,6 +177,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -237,6 +238,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.Identity.Auth.ApiKey/.kubernetes/deployment.yaml b/Api.Data.Identity.Auth.ApiKey/.kubernetes/deployment.yaml index c8c3659c..11c29b0b 100644 --- a/Api.Data.Identity.Auth.ApiKey/.kubernetes/deployment.yaml +++ b/Api.Data.Identity.Auth.ApiKey/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml index 49b0d6db..c9fc5c39 100644 --- a/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -91,13 +91,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -112,8 +110,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -176,6 +176,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -229,6 +230,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.Identity.Auth.External.Custom/.kubernetes/deployment.yaml b/Api.Data.Identity.Auth.External.Custom/.kubernetes/deployment.yaml index f615e1a7..17856230 100644 --- a/Api.Data.Identity.Auth.External.Custom/.kubernetes/deployment.yaml +++ b/Api.Data.Identity.Auth.External.Custom/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml index 7141f0f2..422f9bdc 100644 --- a/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -91,13 +91,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -112,8 +110,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -176,6 +176,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -229,6 +230,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.Identity.Auth.Jwt/.kubernetes/deployment.yaml b/Api.Data.Identity.Auth.Jwt/.kubernetes/deployment.yaml index f615e1a7..17856230 100644 --- a/Api.Data.Identity.Auth.Jwt/.kubernetes/deployment.yaml +++ b/Api.Data.Identity.Auth.Jwt/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.Identity/.github/workflows/build-and-deploy.yml b/Api.Data.Identity/.github/workflows/build-and-deploy.yml index ec82c6b7..8e8f9df4 100644 --- a/Api.Data.Identity/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -89,13 +89,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -110,8 +108,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -174,6 +174,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -220,6 +221,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.Identity/.kubernetes/deployment.yaml b/Api.Data.Identity/.kubernetes/deployment.yaml index 7e8688ef..1579cedc 100644 --- a/Api.Data.Identity/.kubernetes/deployment.yaml +++ b/Api.Data.Identity/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.InMemory/.github/workflows/build-and-deploy.yml b/Api.Data.InMemory/.github/workflows/build-and-deploy.yml index 50a2894a..01944445 100644 --- a/Api.Data.InMemory/.github/workflows/build-and-deploy.yml +++ b/Api.Data.InMemory/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.InMemory/.kubernetes/deployment.yaml b/Api.Data.InMemory/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.Data.InMemory/.kubernetes/deployment.yaml +++ b/Api.Data.InMemory/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml b/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml index 2d8de195..33c0be0f 100644 --- a/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml +++ b/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -89,13 +89,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -110,8 +108,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -174,6 +174,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -220,6 +221,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.LazyLoading/.kubernetes/deployment.yaml b/Api.Data.LazyLoading/.kubernetes/deployment.yaml index 7e8688ef..1579cedc 100644 --- a/Api.Data.LazyLoading/.kubernetes/deployment.yaml +++ b/Api.Data.LazyLoading/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml index 530f1d65..bfa21e4a 100644 --- a/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -89,13 +89,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -110,8 +108,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -174,6 +174,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -220,6 +221,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.MySql.Collation/.kubernetes/deployment.yaml b/Api.Data.MySql.Collation/.kubernetes/deployment.yaml index 7e8688ef..1579cedc 100644 --- a/Api.Data.MySql.Collation/.kubernetes/deployment.yaml +++ b/Api.Data.MySql.Collation/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml index 4e0460d8..2b260691 100644 --- a/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -89,13 +89,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -110,8 +108,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -174,6 +174,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -220,6 +221,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.MySql.Mappings/.kubernetes/deployment.yaml b/Api.Data.MySql.Mappings/.kubernetes/deployment.yaml index 7e8688ef..1579cedc 100644 --- a/Api.Data.MySql.Mappings/.kubernetes/deployment.yaml +++ b/Api.Data.MySql.Mappings/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml index 956aec17..072bb1db 100644 --- a/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -89,13 +89,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -110,8 +108,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -174,6 +174,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -220,6 +221,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.MySql.Spatial/.kubernetes/deployment.yaml b/Api.Data.MySql.Spatial/.kubernetes/deployment.yaml index 7e8688ef..1579cedc 100644 --- a/Api.Data.MySql.Spatial/.kubernetes/deployment.yaml +++ b/Api.Data.MySql.Spatial/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml index d7056b63..9550d36c 100644 --- a/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -89,13 +89,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -110,8 +108,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -174,6 +174,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -220,6 +221,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.MySql.StoredProcedures/.kubernetes/deployment.yaml b/Api.Data.MySql.StoredProcedures/.kubernetes/deployment.yaml index 7e8688ef..1579cedc 100644 --- a/Api.Data.MySql.StoredProcedures/.kubernetes/deployment.yaml +++ b/Api.Data.MySql.StoredProcedures/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml index 2466d7bf..f9953c7f 100644 --- a/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -89,13 +89,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -110,8 +108,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -174,6 +174,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -220,6 +221,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.MySql.Views/.kubernetes/deployment.yaml b/Api.Data.MySql.Views/.kubernetes/deployment.yaml index 7e8688ef..1579cedc 100644 --- a/Api.Data.MySql.Views/.kubernetes/deployment.yaml +++ b/Api.Data.MySql.Views/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.MySql/.github/workflows/build-and-deploy.yml b/Api.Data.MySql/.github/workflows/build-and-deploy.yml index cba9bb65..b69ecda3 100644 --- a/Api.Data.MySql/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -89,13 +89,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -110,8 +108,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -174,6 +174,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -220,6 +221,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.MySql/.kubernetes/deployment.yaml b/Api.Data.MySql/.kubernetes/deployment.yaml index 7e8688ef..1579cedc 100644 --- a/Api.Data.MySql/.kubernetes/deployment.yaml +++ b/Api.Data.MySql/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml index 070e0c51..a955f50e 100644 --- a/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -89,13 +89,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -110,8 +108,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -182,6 +182,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Host=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Username=$env:SQL_USER;Password=$env:SQL_PASSWORD;SSL Mode=Prefer;Trust Server Certificate=true"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -228,6 +229,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.PostgreSQL.Spatial/.kubernetes/deployment.yaml b/Api.Data.PostgreSQL.Spatial/.kubernetes/deployment.yaml index 7e8688ef..1579cedc 100644 --- a/Api.Data.PostgreSQL.Spatial/.kubernetes/deployment.yaml +++ b/Api.Data.PostgreSQL.Spatial/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml b/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml index 2e82e0f1..1691b88b 100644 --- a/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml +++ b/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -89,13 +89,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -110,8 +108,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -182,6 +182,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Host=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Username=$env:SQL_USER;Password=$env:SQL_PASSWORD;SSL Mode=Prefer;Trust Server Certificate=true"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -228,6 +229,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.PostgreSQL/.kubernetes/deployment.yaml b/Api.Data.PostgreSQL/.kubernetes/deployment.yaml index 7e8688ef..1579cedc 100644 --- a/Api.Data.PostgreSQL/.kubernetes/deployment.yaml +++ b/Api.Data.PostgreSQL/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml b/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml index cac9c331..0f63e4f9 100644 --- a/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -89,13 +89,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -110,8 +108,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -174,6 +174,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -220,6 +221,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.Repository.AutoSave/.kubernetes/deployment.yaml b/Api.Data.Repository.AutoSave/.kubernetes/deployment.yaml index 7e8688ef..1579cedc 100644 --- a/Api.Data.Repository.AutoSave/.kubernetes/deployment.yaml +++ b/Api.Data.Repository.AutoSave/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml b/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml index 8638dea7..86639d00 100644 --- a/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -89,13 +89,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -110,8 +108,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -174,6 +174,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -220,6 +221,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.Repository.Includes/.kubernetes/deployment.yaml b/Api.Data.Repository.Includes/.kubernetes/deployment.yaml index 7e8688ef..1579cedc 100644 --- a/Api.Data.Repository.Includes/.kubernetes/deployment.yaml +++ b/Api.Data.Repository.Includes/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml b/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml index 957cec57..bdc76aea 100644 --- a/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -89,13 +89,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -110,8 +108,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -174,6 +174,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -220,6 +221,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.SoftDelete/.kubernetes/deployment.yaml b/Api.Data.SoftDelete/.kubernetes/deployment.yaml index 7e8688ef..1579cedc 100644 --- a/Api.Data.SoftDelete/.kubernetes/deployment.yaml +++ b/Api.Data.SoftDelete/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.SqLite/.github/workflows/build-and-deploy.yml b/Api.Data.SqLite/.github/workflows/build-and-deploy.yml index 98ad1455..dd482244 100644 --- a/Api.Data.SqLite/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SqLite/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -88,13 +88,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -109,8 +107,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -143,6 +143,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/data-storageclass.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/data-storageclass.tmp.yaml; kubectl apply -f .kubernetes/data-storageclass.tmp.yaml; if ($LastExitCode -ne 0) @@ -194,6 +196,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.SqLite/.kubernetes/deployment.yaml b/Api.Data.SqLite/.kubernetes/deployment.yaml index 354c85fb..145e1a6a 100644 --- a/Api.Data.SqLite/.kubernetes/deployment.yaml +++ b/Api.Data.SqLite/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml index e7532a1d..dc5aaedf 100644 --- a/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -89,13 +89,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -110,8 +108,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -193,6 +193,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST,$env:SQL_PORT;Database=$env:SQL_NAME;User Id=$env:SQL_USER;Password=$env:SQL_PASSWORD;Encrypt=True;TrustServerCertificate=True;"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -239,6 +240,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.SqlServer.Spatial/.kubernetes/deployment.yaml b/Api.Data.SqlServer.Spatial/.kubernetes/deployment.yaml index 7e8688ef..1579cedc 100644 --- a/Api.Data.SqlServer.Spatial/.kubernetes/deployment.yaml +++ b/Api.Data.SqlServer.Spatial/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml b/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml index 370b8153..f6fe7aa4 100644 --- a/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -89,13 +89,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -110,8 +108,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -193,6 +193,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST,$env:SQL_PORT;Database=$env:SQL_NAME;User Id=$env:SQL_USER;Password=$env:SQL_PASSWORD;Encrypt=True;TrustServerCertificate=True;"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -239,6 +240,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.SqlServer/.kubernetes/deployment.yaml b/Api.Data.SqlServer/.kubernetes/deployment.yaml index 7e8688ef..1579cedc 100644 --- a/Api.Data.SqlServer/.kubernetes/deployment.yaml +++ b/Api.Data.SqlServer/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Data.Triggers/.github/workflows/build-and-deploy.yml b/Api.Data.Triggers/.github/workflows/build-and-deploy.yml index 0cbf7483..7048c8ba 100644 --- a/Api.Data.Triggers/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Triggers/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -89,13 +89,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -110,8 +108,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -174,6 +174,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -220,6 +221,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Data.Triggers/.kubernetes/deployment.yaml b/Api.Data.Triggers/.kubernetes/deployment.yaml index 7e8688ef..1579cedc 100644 --- a/Api.Data.Triggers/.kubernetes/deployment.yaml +++ b/Api.Data.Triggers/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml b/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml index 00b3b84b..7233df14 100644 --- a/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml +++ b/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml @@ -28,7 +28,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -87,13 +87,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -108,8 +106,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -129,6 +129,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $zoneNames = az network dns zone list -g $env:AZURE_GROUP_DNS --query [].name; $env:ROUTE_HOST_NAMES = @( @@ -181,6 +183,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Documentation.Csp/.kubernetes/deployment.yaml b/Api.Documentation.Csp/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.Documentation.Csp/.kubernetes/deployment.yaml +++ b/Api.Documentation.Csp/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Documentation/.github/workflows/build-and-deploy.yml b/Api.Documentation/.github/workflows/build-and-deploy.yml index 87545d98..23c801be 100644 --- a/Api.Documentation/.github/workflows/build-and-deploy.yml +++ b/Api.Documentation/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Documentation/.kubernetes/deployment.yaml b/Api.Documentation/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.Documentation/.kubernetes/deployment.yaml +++ b/Api.Documentation/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.ErrorHandling/.github/workflows/build-and-deploy.yml b/Api.ErrorHandling/.github/workflows/build-and-deploy.yml index 012b1be2..3d28ffb0 100644 --- a/Api.ErrorHandling/.github/workflows/build-and-deploy.yml +++ b/Api.ErrorHandling/.github/workflows/build-and-deploy.yml @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.ErrorHandling/.kubernetes/deployment.yaml b/Api.ErrorHandling/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.ErrorHandling/.kubernetes/deployment.yaml +++ b/Api.ErrorHandling/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml b/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml index e4a92c54..498d7291 100644 --- a/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml +++ b/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Eventing.RabbitMq/.kubernetes/deployment.yaml b/Api.Eventing.RabbitMq/.kubernetes/deployment.yaml index c8e22634..284c0444 100644 --- a/Api.Eventing.RabbitMq/.kubernetes/deployment.yaml +++ b/Api.Eventing.RabbitMq/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.HealthChecks/.github/workflows/build-and-deploy.yml b/Api.HealthChecks/.github/workflows/build-and-deploy.yml index e09d6b24..738fe77c 100644 --- a/Api.HealthChecks/.github/workflows/build-and-deploy.yml +++ b/Api.HealthChecks/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -150,13 +150,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -171,8 +169,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -192,6 +192,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -229,6 +231,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.HealthChecks/.kubernetes/deployment.yaml b/Api.HealthChecks/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.HealthChecks/.kubernetes/deployment.yaml +++ b/Api.HealthChecks/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Hosting.Http/.github/workflows/build-and-deploy.yml b/Api.Hosting.Http/.github/workflows/build-and-deploy.yml index 730be7cd..bba8202e 100644 --- a/Api.Hosting.Http/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.Http/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Hosting.Http/.kubernetes/deployment.yaml b/Api.Hosting.Http/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.Hosting.Http/.kubernetes/deployment.yaml +++ b/Api.Hosting.Http/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Hosting.Https/.github/workflows/build-and-deploy.yml b/Api.Hosting.Https/.github/workflows/build-and-deploy.yml index 629d9c6f..37fa4f46 100644 --- a/Api.Hosting.Https/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.Https/.github/workflows/build-and-deploy.yml @@ -28,7 +28,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -87,13 +87,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -108,8 +106,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -129,6 +129,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $zoneNames = az network dns zone list -g $env:AZURE_GROUP_DNS --query "[].name" -o json | ConvertFrom-Json $env:ROUTE_HOST_NAMES = ( @@ -137,7 +139,7 @@ jobs: } ) -join "`n" - $env:GATEWAY_NAME = kubectl get gateway -n apps -o jsonpath='{.items[0].metadata.name}' + $env:GATEWAY_NAME = kubectl get gateway -n $env:KUBERNETES_NAMESPACE -o jsonpath='{.items[0].metadata.name}' Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; @@ -190,6 +192,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Hosting.Https/.kubernetes/deployment.yaml b/Api.Hosting.Https/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.Hosting.Https/.kubernetes/deployment.yaml +++ b/Api.Hosting.Https/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Hosting.Https/.kubernetes/httproute-443.yaml b/Api.Hosting.Https/.kubernetes/httproute-443.yaml index 65b97a51..25060955 100644 --- a/Api.Hosting.Https/.kubernetes/httproute-443.yaml +++ b/Api.Hosting.Https/.kubernetes/httproute-443.yaml @@ -1,7 +1,7 @@ apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: - name: %SERVICE_NAME%-route + name: %SERVICE_NAME%-route-443 namespace: %KUBERNETES_NAMESPACE% spec: parentRefs: diff --git a/Api.Hosting.Https/.kubernetes/httproute-80.yaml b/Api.Hosting.Https/.kubernetes/httproute-80.yaml index f29775aa..e743bb46 100644 --- a/Api.Hosting.Https/.kubernetes/httproute-80.yaml +++ b/Api.Hosting.Https/.kubernetes/httproute-80.yaml @@ -1,7 +1,7 @@ apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: - name: %APP_NAME%-route-80 + name: %SERVICE_NAME%-route-80 namespace: %KUBERNETES_NAMESPACE% spec: parentRefs: diff --git a/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml b/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml index 4ca38002..48e87ab0 100644 --- a/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Hosting.MultipartLimits/.kubernetes/deployment.yaml b/Api.Hosting.MultipartLimits/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.Hosting.MultipartLimits/.kubernetes/deployment.yaml +++ b/Api.Hosting.MultipartLimits/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Localization/.github/workflows/build-and-deploy.yml b/Api.Localization/.github/workflows/build-and-deploy.yml index 5e3244b5..5dcacc8b 100644 --- a/Api.Localization/.github/workflows/build-and-deploy.yml +++ b/Api.Localization/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Localization/.kubernetes/deployment.yaml b/Api.Localization/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.Localization/.kubernetes/deployment.yaml +++ b/Api.Localization/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml b/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml index 51e37842..79f9fd13 100644 --- a/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Logging.Log4Net/.kubernetes/deployment.yaml b/Api.Logging.Log4Net/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.Logging.Log4Net/.kubernetes/deployment.yaml +++ b/Api.Logging.Log4Net/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml b/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml index c4343328..1c64d5bc 100644 --- a/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Logging.Microsoft/.kubernetes/deployment.yaml b/Api.Logging.Microsoft/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.Logging.Microsoft/.kubernetes/deployment.yaml +++ b/Api.Logging.Microsoft/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Logging.NLog/.github/workflows/build-and-deploy.yml b/Api.Logging.NLog/.github/workflows/build-and-deploy.yml index 16faef4c..ca1eb6f9 100644 --- a/Api.Logging.NLog/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.NLog/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Logging.NLog/.kubernetes/deployment.yaml b/Api.Logging.NLog/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.Logging.NLog/.kubernetes/deployment.yaml +++ b/Api.Logging.NLog/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml b/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml index c26ccdfb..6d16c603 100644 --- a/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Logging.Serilog/.kubernetes/deployment.yaml b/Api.Logging.Serilog/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.Logging.Serilog/.kubernetes/deployment.yaml +++ b/Api.Logging.Serilog/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.MultipartJson/.github/workflows/build-and-deploy.yml b/Api.MultipartJson/.github/workflows/build-and-deploy.yml index 8f3918cf..56ff8678 100644 --- a/Api.MultipartJson/.github/workflows/build-and-deploy.yml +++ b/Api.MultipartJson/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.MultipartJson/.kubernetes/deployment.yaml b/Api.MultipartJson/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.MultipartJson/.kubernetes/deployment.yaml +++ b/Api.MultipartJson/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml index c97c19fa..81da360d 100644 --- a/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml @@ -28,7 +28,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -87,13 +87,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -108,8 +106,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -129,6 +129,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $zoneNames = az network dns zone list -g $env:AZURE_GROUP_DNS --query "[].name" -o json | ConvertFrom-Json $env:ROUTE_HOST_NAMES = ( @@ -137,7 +139,7 @@ jobs: } ) -join "`n" - $env:GATEWAY_NAME = kubectl get gateway -n apps -o jsonpath='{.items[0].metadata.name}' + $env:GATEWAY_NAME = kubectl get gateway -n $env:KUBERNETES_NAMESPACE -o jsonpath='{.items[0].metadata.name}' Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f service.tmp.yaml; @@ -190,6 +192,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.PolicyHeaders.ContentSecurityPolicy/.kubernetes/deployment.yaml b/Api.PolicyHeaders.ContentSecurityPolicy/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.PolicyHeaders.ContentSecurityPolicy/.kubernetes/deployment.yaml +++ b/Api.PolicyHeaders.ContentSecurityPolicy/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.PolicyHeaders.ContentSecurityPolicy/.kubernetes/httproute-443.yaml b/Api.PolicyHeaders.ContentSecurityPolicy/.kubernetes/httproute-443.yaml index 65b97a51..25060955 100644 --- a/Api.PolicyHeaders.ContentSecurityPolicy/.kubernetes/httproute-443.yaml +++ b/Api.PolicyHeaders.ContentSecurityPolicy/.kubernetes/httproute-443.yaml @@ -1,7 +1,7 @@ apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: - name: %SERVICE_NAME%-route + name: %SERVICE_NAME%-route-443 namespace: %KUBERNETES_NAMESPACE% spec: parentRefs: diff --git a/Api.PolicyHeaders.ContentSecurityPolicy/.kubernetes/httproute-80.yaml b/Api.PolicyHeaders.ContentSecurityPolicy/.kubernetes/httproute-80.yaml index f29775aa..e743bb46 100644 --- a/Api.PolicyHeaders.ContentSecurityPolicy/.kubernetes/httproute-80.yaml +++ b/Api.PolicyHeaders.ContentSecurityPolicy/.kubernetes/httproute-80.yaml @@ -1,7 +1,7 @@ apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: - name: %APP_NAME%-route-80 + name: %SERVICE_NAME%-route-80 namespace: %KUBERNETES_NAMESPACE% spec: parentRefs: diff --git a/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml index 4010720a..cd648d8b 100644 --- a/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.PolicyHeaders.ContentTypeOptions/.kubernetes/deployment.yaml b/Api.PolicyHeaders.ContentTypeOptions/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.PolicyHeaders.ContentTypeOptions/.kubernetes/deployment.yaml +++ b/Api.PolicyHeaders.ContentTypeOptions/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml index e53037ec..72ed1c79 100644 --- a/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.PolicyHeaders.Cors/.kubernetes/deployment.yaml b/Api.PolicyHeaders.Cors/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.PolicyHeaders.Cors/.kubernetes/deployment.yaml +++ b/Api.PolicyHeaders.Cors/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml index 2d9f7da3..93fd4b81 100644 --- a/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.PolicyHeaders.ForwardedHeaders/.kubernetes/deployment.yaml b/Api.PolicyHeaders.ForwardedHeaders/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.PolicyHeaders.ForwardedHeaders/.kubernetes/deployment.yaml +++ b/Api.PolicyHeaders.ForwardedHeaders/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml index 504d5a7e..4cfceb58 100644 --- a/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.PolicyHeaders.FrameOptions/.kubernetes/deployment.yaml b/Api.PolicyHeaders.FrameOptions/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.PolicyHeaders.FrameOptions/.kubernetes/deployment.yaml +++ b/Api.PolicyHeaders.FrameOptions/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml index 2a01df3e..b46500f5 100644 --- a/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml @@ -28,7 +28,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -87,13 +87,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -108,8 +106,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -129,6 +129,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $zoneNames = az network dns zone list -g $env:AZURE_GROUP_DNS --query "[].name" -o json | ConvertFrom-Json $env:ROUTE_HOST_NAMES = ( @@ -137,7 +139,7 @@ jobs: } ) -join "`n" - $env:GATEWAY_NAME = kubectl get gateway -n apps -o jsonpath='{.items[0].metadata.name}' + $env:GATEWAY_NAME = kubectl get gateway -n $env:KUBERNETES_NAMESPACE -o jsonpath='{.items[0].metadata.name}' Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f service.tmp.yaml; @@ -190,6 +192,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.PolicyHeaders.Hsts/.kubernetes/deployment.yaml b/Api.PolicyHeaders.Hsts/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.PolicyHeaders.Hsts/.kubernetes/deployment.yaml +++ b/Api.PolicyHeaders.Hsts/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.PolicyHeaders.Hsts/.kubernetes/httproute-443.yaml b/Api.PolicyHeaders.Hsts/.kubernetes/httproute-443.yaml index 65b97a51..25060955 100644 --- a/Api.PolicyHeaders.Hsts/.kubernetes/httproute-443.yaml +++ b/Api.PolicyHeaders.Hsts/.kubernetes/httproute-443.yaml @@ -1,7 +1,7 @@ apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: - name: %SERVICE_NAME%-route + name: %SERVICE_NAME%-route-443 namespace: %KUBERNETES_NAMESPACE% spec: parentRefs: diff --git a/Api.PolicyHeaders.Hsts/.kubernetes/httproute-80.yaml b/Api.PolicyHeaders.Hsts/.kubernetes/httproute-80.yaml index f29775aa..e743bb46 100644 --- a/Api.PolicyHeaders.Hsts/.kubernetes/httproute-80.yaml +++ b/Api.PolicyHeaders.Hsts/.kubernetes/httproute-80.yaml @@ -1,7 +1,7 @@ apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: - name: %APP_NAME%-route-80 + name: %SERVICE_NAME%-route-80 namespace: %KUBERNETES_NAMESPACE% spec: parentRefs: diff --git a/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml index 9ae23278..42ec0bb1 100644 --- a/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.PolicyHeaders.ReferrerPolicy/.kubernetes/deployment.yaml b/Api.PolicyHeaders.ReferrerPolicy/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.PolicyHeaders.ReferrerPolicy/.kubernetes/deployment.yaml +++ b/Api.PolicyHeaders.ReferrerPolicy/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml index 3699c699..509ff0bb 100644 --- a/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.PolicyHeaders.Robots/.kubernetes/deployment.yaml b/Api.PolicyHeaders.Robots/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.PolicyHeaders.Robots/.kubernetes/deployment.yaml +++ b/Api.PolicyHeaders.Robots/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml index 8673f1f9..90c7a6c5 100644 --- a/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.PolicyHeaders.XssProtection/.kubernetes/deployment.yaml b/Api.PolicyHeaders.XssProtection/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.PolicyHeaders.XssProtection/.kubernetes/deployment.yaml +++ b/Api.PolicyHeaders.XssProtection/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.RequestTracing/.github/workflows/build-and-deploy.yml b/Api.RequestTracing/.github/workflows/build-and-deploy.yml index 0f92a439..ed0cee82 100644 --- a/Api.RequestTracing/.github/workflows/build-and-deploy.yml +++ b/Api.RequestTracing/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.RequestTracing/.kubernetes/deployment.yaml b/Api.RequestTracing/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.RequestTracing/.kubernetes/deployment.yaml +++ b/Api.RequestTracing/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.ResponseCache/.github/workflows/build-and-deploy.yml b/Api.ResponseCache/.github/workflows/build-and-deploy.yml index b01ba103..38045203 100644 --- a/Api.ResponseCache/.github/workflows/build-and-deploy.yml +++ b/Api.ResponseCache/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.ResponseCache/.kubernetes/deployment.yaml b/Api.ResponseCache/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.ResponseCache/.kubernetes/deployment.yaml +++ b/Api.ResponseCache/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.ResponseCompression/.github/workflows/build-and-deploy.yml b/Api.ResponseCompression/.github/workflows/build-and-deploy.yml index 5006980a..7824189b 100644 --- a/Api.ResponseCompression/.github/workflows/build-and-deploy.yml +++ b/Api.ResponseCompression/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.ResponseCompression/.kubernetes/deployment.yaml b/Api.ResponseCompression/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.ResponseCompression/.kubernetes/deployment.yaml +++ b/Api.ResponseCompression/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Session/.github/workflows/build-and-deploy.yml b/Api.Session/.github/workflows/build-and-deploy.yml index 37ef11b0..7f9d8e88 100644 --- a/Api.Session/.github/workflows/build-and-deploy.yml +++ b/Api.Session/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Session/.kubernetes/deployment.yaml b/Api.Session/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.Session/.kubernetes/deployment.yaml +++ b/Api.Session/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.StartupTasks/.github/workflows/build-and-deploy.yml b/Api.StartupTasks/.github/workflows/build-and-deploy.yml index 07fe4bdc..18a9ab0e 100644 --- a/Api.StartupTasks/.github/workflows/build-and-deploy.yml +++ b/Api.StartupTasks/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.StartupTasks/.kubernetes/deployment.yaml b/Api.StartupTasks/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.StartupTasks/.kubernetes/deployment.yaml +++ b/Api.StartupTasks/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.StaticFiles/.github/workflows/build-and-deploy.yml b/Api.StaticFiles/.github/workflows/build-and-deploy.yml index cdc4dcb8..d0e48fd3 100644 --- a/Api.StaticFiles/.github/workflows/build-and-deploy.yml +++ b/Api.StaticFiles/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.StaticFiles/.kubernetes/deployment.yaml b/Api.StaticFiles/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.StaticFiles/.kubernetes/deployment.yaml +++ b/Api.StaticFiles/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml index 2b882124..c6186901 100644 --- a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -28,7 +28,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -129,13 +129,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -150,8 +148,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -171,6 +171,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/storage-pv.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/storage-pv.tmp.yaml; kubectl apply -f .kubernetes/storage-pv.tmp.yaml; if ($LastExitCode -ne 0) @@ -222,6 +224,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Storage.Azure/.kubernetes/deployment.yaml b/Api.Storage.Azure/.kubernetes/deployment.yaml index 9eb44e22..642aaef3 100644 --- a/Api.Storage.Azure/.kubernetes/deployment.yaml +++ b/Api.Storage.Azure/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Storage.Local/.github/workflows/build-and-deploy.yml b/Api.Storage.Local/.github/workflows/build-and-deploy.yml index 3044ba11..21bbc7d1 100644 --- a/Api.Storage.Local/.github/workflows/build-and-deploy.yml +++ b/Api.Storage.Local/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -86,13 +86,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -107,8 +105,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -128,6 +128,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/storage-storageclass.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/storage-storageclass.tmp.yaml; kubectl apply -f .kubernetes/storage-storageclass.tmp.yaml; if ($LastExitCode -ne 0) @@ -179,6 +181,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Storage.Local/.kubernetes/deployment.yaml b/Api.Storage.Local/.kubernetes/deployment.yaml index eb1c9093..9b84b2ba 100644 --- a/Api.Storage.Local/.kubernetes/deployment.yaml +++ b/Api.Storage.Local/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.TimeZone/.github/workflows/build-and-deploy.yml b/Api.TimeZone/.github/workflows/build-and-deploy.yml index edbde0d8..52cb0864 100644 --- a/Api.TimeZone/.github/workflows/build-and-deploy.yml +++ b/Api.TimeZone/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.TimeZone/.kubernetes/deployment.yaml b/Api.TimeZone/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.TimeZone/.kubernetes/deployment.yaml +++ b/Api.TimeZone/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.Versioning/.github/workflows/build-and-deploy.yml b/Api.Versioning/.github/workflows/build-and-deploy.yml index 3a01b8e4..ecc7fb65 100644 --- a/Api.Versioning/.github/workflows/build-and-deploy.yml +++ b/Api.Versioning/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.Versioning/.kubernetes/deployment.yaml b/Api.Versioning/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.Versioning/.kubernetes/deployment.yaml +++ b/Api.Versioning/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api.VirusScan/.github/workflows/build-and-deploy.yml b/Api.VirusScan/.github/workflows/build-and-deploy.yml index 0e0eb79a..db2bbe57 100644 --- a/Api.VirusScan/.github/workflows/build-and-deploy.yml +++ b/Api.VirusScan/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api.VirusScan/.kubernetes/deployment.yaml b/Api.VirusScan/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Api.VirusScan/.kubernetes/deployment.yaml +++ b/Api.VirusScan/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Api._Blank/.github/workflows/build-and-deploy.yml b/Api._Blank/.github/workflows/build-and-deploy.yml index 11902a3d..356d7eaf 100644 --- a/Api._Blank/.github/workflows/build-and-deploy.yml +++ b/Api._Blank/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,6 +127,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Api._Blank/.kubernetes/deployment.yaml b/Api._Blank/.kubernetes/deployment.yaml index b15e7e29..7c10b6cd 100644 --- a/Api._Blank/.kubernetes/deployment.yaml +++ b/Api._Blank/.kubernetes/deployment.yaml @@ -34,7 +34,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always diff --git a/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml b/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml index 930c99ac..0c519fe9 100644 --- a/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml +++ b/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 KUBERNETES_MEMORY_REQUEST: 256Mi KUBERNETES_MEMORY_LIMIT: 768Mi @@ -82,13 +82,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION - + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -103,8 +101,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -113,6 +113,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) @@ -136,6 +138,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Console.CustomConfigSection/.kubernetes/cronjob.yaml b/Console.CustomConfigSection/.kubernetes/cronjob.yaml index 32007e73..83bc0cce 100644 --- a/Console.CustomConfigSection/.kubernetes/cronjob.yaml +++ b/Console.CustomConfigSection/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: diff --git a/Console.CustomService/.github/workflows/build-and-deploy.yml b/Console.CustomService/.github/workflows/build-and-deploy.yml index 784ed671..abecb0b9 100644 --- a/Console.CustomService/.github/workflows/build-and-deploy.yml +++ b/Console.CustomService/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 KUBERNETES_MEMORY_REQUEST: 256Mi KUBERNETES_MEMORY_LIMIT: 768Mi @@ -82,13 +82,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION - + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -103,8 +101,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -113,6 +113,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) @@ -136,6 +138,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Console.CustomService/.kubernetes/cronjob.yaml b/Console.CustomService/.kubernetes/cronjob.yaml index 32007e73..83bc0cce 100644 --- a/Console.CustomService/.kubernetes/cronjob.yaml +++ b/Console.CustomService/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: diff --git a/Console.Data.InMemory/.github/workflows/build-and-deploy.yml b/Console.Data.InMemory/.github/workflows/build-and-deploy.yml index 9733b697..23ba6009 100644 --- a/Console.Data.InMemory/.github/workflows/build-and-deploy.yml +++ b/Console.Data.InMemory/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/Nano-Core/Nano.Template.Console KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 KUBERNETES_MEMORY_REQUEST: 256Mi KUBERNETES_MEMORY_LIMIT: 768Mi @@ -82,13 +82,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION - + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -103,8 +101,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -113,6 +113,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) @@ -136,6 +138,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Console.Data.InMemory/.kubernetes/cronjob.yaml b/Console.Data.InMemory/.kubernetes/cronjob.yaml index 71ff564c..5300eb6c 100644 --- a/Console.Data.InMemory/.kubernetes/cronjob.yaml +++ b/Console.Data.InMemory/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: diff --git a/Console.Data.MySql/.github/workflows/build-and-deploy.yml b/Console.Data.MySql/.github/workflows/build-and-deploy.yml index 7e45a90a..22974985 100644 --- a/Console.Data.MySql/.github/workflows/build-and-deploy.yml +++ b/Console.Data.MySql/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/Nano-Core/Nano.Template.Console KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 KUBERNETES_MEMORY_REQUEST: 256Mi KUBERNETES_MEMORY_LIMIT: 768Mi @@ -86,13 +86,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION - + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -107,8 +105,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -160,6 +160,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/sql-auth-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/sql-auth-secret.tmp.yaml; @@ -192,6 +193,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Console.Data.MySql/.kubernetes/cronjob.yaml b/Console.Data.MySql/.kubernetes/cronjob.yaml index 9ae388c3..c6710b9b 100644 --- a/Console.Data.MySql/.kubernetes/cronjob.yaml +++ b/Console.Data.MySql/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% imagePullPolicy: Always env: - name: Data__ConnectionString diff --git a/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml b/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml index 8e9abbbf..8ea03053 100644 --- a/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml +++ b/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/Nano-Core/Nano.Template.Console KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 KUBERNETES_MEMORY_REQUEST: 256Mi KUBERNETES_MEMORY_LIMIT: 768Mi @@ -86,13 +86,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION - + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -107,8 +105,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -168,6 +168,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -200,6 +201,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Console.Data.PostgreSQL/.kubernetes/cronjob.yaml b/Console.Data.PostgreSQL/.kubernetes/cronjob.yaml index 9ae388c3..c6710b9b 100644 --- a/Console.Data.PostgreSQL/.kubernetes/cronjob.yaml +++ b/Console.Data.PostgreSQL/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% imagePullPolicy: Always env: - name: Data__ConnectionString diff --git a/Console.Data.SqLite/.github/workflows/build-and-deploy.yml b/Console.Data.SqLite/.github/workflows/build-and-deploy.yml index 86a7f66c..6808b4b7 100644 --- a/Console.Data.SqLite/.github/workflows/build-and-deploy.yml +++ b/Console.Data.SqLite/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/Nano-Core/Nano.Template.Console KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 KUBERNETES_MEMORY_REQUEST: 256Mi KUBERNETES_MEMORY_LIMIT: 768Mi @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION - + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -129,6 +129,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/data-storageclass.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/data-storageclass.tmp.yaml; kubectl apply -f .kubernetes/data-storageclass.tmp.yaml; if ($LastExitCode -ne 0) @@ -166,6 +168,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Console.Data.SqLite/.kubernetes/cronjob.yaml b/Console.Data.SqLite/.kubernetes/cronjob.yaml index aa4f8991..53bb5333 100644 --- a/Console.Data.SqLite/.kubernetes/cronjob.yaml +++ b/Console.Data.SqLite/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: diff --git a/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml b/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml index 054564d4..e67e1525 100644 --- a/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml +++ b/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 KUBERNETES_MEMORY_REQUEST: 256Mi KUBERNETES_MEMORY_LIMIT: 768Mi @@ -86,13 +86,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION - + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -107,14 +105,15 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Database Migration & User shell: pwsh run: | @@ -180,6 +179,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST,$env:SQL_PORT;Database=$env:SQL_NAME;User Id=$env:SQL_USER;Password=$env:SQL_PASSWORD;Encrypt=True;TrustServerCertificate=True;"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; @@ -212,6 +212,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Console.Data.SqlServer/.kubernetes/cronjob.yaml b/Console.Data.SqlServer/.kubernetes/cronjob.yaml index 9ae388c3..c6710b9b 100644 --- a/Console.Data.SqlServer/.kubernetes/cronjob.yaml +++ b/Console.Data.SqlServer/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% imagePullPolicy: Always env: - name: Data__ConnectionString diff --git a/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml b/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml index 0233cbe7..7aa433f6 100644 --- a/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml +++ b/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 KUBERNETES_MEMORY_REQUEST: 256Mi KUBERNETES_MEMORY_LIMIT: 768Mi @@ -82,13 +82,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION - + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -103,8 +101,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -113,6 +113,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) @@ -136,6 +138,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Console.Eventing.RabbitMq/.kubernetes/cronjob.yaml b/Console.Eventing.RabbitMq/.kubernetes/cronjob.yaml index 44ab91fe..f0e901cb 100644 --- a/Console.Eventing.RabbitMq/.kubernetes/cronjob.yaml +++ b/Console.Eventing.RabbitMq/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% imagePullPolicy: Always env: - name: Eventing__Credentials__Id diff --git a/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml b/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml index 0ad7df32..f6831af9 100644 --- a/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml +++ b/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml @@ -25,7 +25,7 @@ env: CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 KUBERNETES_MEMORY_REQUEST: 256Mi KUBERNETES_MEMORY_LIMIT: 768Mi @@ -81,13 +81,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION - + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -102,8 +100,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -112,6 +112,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) @@ -135,6 +137,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Console.ExceptionHandling/.kubernetes/cronjob.yaml b/Console.ExceptionHandling/.kubernetes/cronjob.yaml index 32007e73..83bc0cce 100644 --- a/Console.ExceptionHandling/.kubernetes/cronjob.yaml +++ b/Console.ExceptionHandling/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: diff --git a/Console.Localization/.github/workflows/build-and-deploy.yml b/Console.Localization/.github/workflows/build-and-deploy.yml index aacf89be..913254d8 100644 --- a/Console.Localization/.github/workflows/build-and-deploy.yml +++ b/Console.Localization/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 KUBERNETES_MEMORY_REQUEST: 256Mi KUBERNETES_MEMORY_LIMIT: 768Mi @@ -82,13 +82,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION - + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -103,8 +101,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -113,6 +113,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) @@ -136,6 +138,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Console.Localization/.kubernetes/cronjob.yaml b/Console.Localization/.kubernetes/cronjob.yaml index 32007e73..83bc0cce 100644 --- a/Console.Localization/.kubernetes/cronjob.yaml +++ b/Console.Localization/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: diff --git a/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml b/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml index 4dc97976..c26e4a2c 100644 --- a/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 KUBERNETES_MEMORY_REQUEST: 256Mi KUBERNETES_MEMORY_LIMIT: 768Mi @@ -82,13 +82,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION - + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -103,8 +101,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -113,6 +113,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) @@ -136,6 +138,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Console.Logging.Log4Net/.kubernetes/cronjob.yaml b/Console.Logging.Log4Net/.kubernetes/cronjob.yaml index 32007e73..83bc0cce 100644 --- a/Console.Logging.Log4Net/.kubernetes/cronjob.yaml +++ b/Console.Logging.Log4Net/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: diff --git a/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml b/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml index 1c105bb3..9395a691 100644 --- a/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 KUBERNETES_MEMORY_REQUEST: 256Mi KUBERNETES_MEMORY_LIMIT: 768Mi @@ -82,13 +82,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION - + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -103,8 +101,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -113,6 +113,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) @@ -136,6 +138,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Console.Logging.Microsoft/.kubernetes/cronjob.yaml b/Console.Logging.Microsoft/.kubernetes/cronjob.yaml index 32007e73..83bc0cce 100644 --- a/Console.Logging.Microsoft/.kubernetes/cronjob.yaml +++ b/Console.Logging.Microsoft/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: diff --git a/Console.Logging.NLog/.github/workflows/build-and-deploy.yml b/Console.Logging.NLog/.github/workflows/build-and-deploy.yml index 01436524..1bd34670 100644 --- a/Console.Logging.NLog/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.NLog/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 KUBERNETES_MEMORY_REQUEST: 256Mi KUBERNETES_MEMORY_LIMIT: 768Mi @@ -82,13 +82,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION - + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -103,8 +101,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -113,6 +113,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) @@ -136,6 +138,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Console.Logging.NLog/.kubernetes/cronjob.yaml b/Console.Logging.NLog/.kubernetes/cronjob.yaml index 32007e73..83bc0cce 100644 --- a/Console.Logging.NLog/.kubernetes/cronjob.yaml +++ b/Console.Logging.NLog/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: diff --git a/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml b/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml index fb5412b5..04171e10 100644 --- a/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 KUBERNETES_MEMORY_REQUEST: 256Mi KUBERNETES_MEMORY_LIMIT: 768Mi @@ -82,13 +82,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION - + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -103,8 +101,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -113,6 +113,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) @@ -136,6 +138,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Console.Logging.Serilog/.kubernetes/cronjob.yaml b/Console.Logging.Serilog/.kubernetes/cronjob.yaml index 32007e73..83bc0cce 100644 --- a/Console.Logging.Serilog/.kubernetes/cronjob.yaml +++ b/Console.Logging.Serilog/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: diff --git a/Console.StartupTasks/.github/workflows/build-and-deploy.yml b/Console.StartupTasks/.github/workflows/build-and-deploy.yml index 80e559e4..4f01a543 100644 --- a/Console.StartupTasks/.github/workflows/build-and-deploy.yml +++ b/Console.StartupTasks/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 KUBERNETES_MEMORY_REQUEST: 256Mi KUBERNETES_MEMORY_LIMIT: 768Mi @@ -82,13 +82,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION - + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -103,8 +101,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -113,6 +113,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) @@ -136,6 +138,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Console.StartupTasks/.kubernetes/cronjob.yaml b/Console.StartupTasks/.kubernetes/cronjob.yaml index 32007e73..83bc0cce 100644 --- a/Console.StartupTasks/.kubernetes/cronjob.yaml +++ b/Console.StartupTasks/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: diff --git a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml index 140653e8..27dcd795 100644 --- a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -28,7 +28,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 KUBERNETES_MEMORY_REQUEST: 256Mi KUBERNETES_MEMORY_LIMIT: 768Mi @@ -126,13 +126,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION - + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -147,8 +145,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -157,6 +157,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/storage-pv.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/storage-pv.tmp.yaml; kubectl apply -f .kubernetes/storage-pv.tmp.yaml; if ($LastExitCode -ne 0) @@ -194,6 +196,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Console.Storage.Azure/.kubernetes/cronjob.yaml b/Console.Storage.Azure/.kubernetes/cronjob.yaml index ea18271f..1187e8a5 100644 --- a/Console.Storage.Azure/.kubernetes/cronjob.yaml +++ b/Console.Storage.Azure/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: diff --git a/Console.Storage.Local/.github/workflows/build-and-deploy.yml b/Console.Storage.Local/.github/workflows/build-and-deploy.yml index 236021f4..3dc224cc 100644 --- a/Console.Storage.Local/.github/workflows/build-and-deploy.yml +++ b/Console.Storage.Local/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 KUBERNETES_MEMORY_REQUEST: 256Mi KUBERNETES_MEMORY_LIMIT: 768Mi @@ -84,13 +84,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION - + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -105,8 +103,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -115,6 +115,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/storage-storageclass.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/storage-storageclass.tmp.yaml; kubectl apply -f .kubernetes/storage-storageclass.tmp.yaml; if ($LastExitCode -ne 0) @@ -152,6 +154,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Console.Storage.Local/.kubernetes/cronjob.yaml b/Console.Storage.Local/.kubernetes/cronjob.yaml index 0604cbad..ccff35ee 100644 --- a/Console.Storage.Local/.kubernetes/cronjob.yaml +++ b/Console.Storage.Local/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: diff --git a/Console.Workers/.github/workflows/build-and-deploy.yml b/Console.Workers/.github/workflows/build-and-deploy.yml index 16aadd83..f77acc08 100644 --- a/Console.Workers/.github/workflows/build-and-deploy.yml +++ b/Console.Workers/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 KUBERNETES_MEMORY_REQUEST: 256Mi KUBERNETES_MEMORY_LIMIT: 768Mi @@ -82,13 +82,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION - + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -103,8 +101,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -113,6 +113,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) @@ -136,6 +138,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Console.Workers/.kubernetes/cronjob.yaml b/Console.Workers/.kubernetes/cronjob.yaml index 503cd99a..f5bc52ed 100644 --- a/Console.Workers/.kubernetes/cronjob.yaml +++ b/Console.Workers/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: diff --git a/Console._Blank/.github/workflows/build-and-deploy.yml b/Console._Blank/.github/workflows/build-and-deploy.yml index 4a3c8b1d..c00ca0be 100644 --- a/Console._Blank/.github/workflows/build-and-deploy.yml +++ b/Console._Blank/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 KUBERNETES_MEMORY_REQUEST: 256Mi KUBERNETES_MEMORY_LIMIT: 768Mi @@ -82,13 +82,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION - + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -103,8 +101,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -113,6 +113,8 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) @@ -136,6 +138,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Console._Blank/.kubernetes/cronjob.yaml b/Console._Blank/.kubernetes/cronjob.yaml index 71ff564c..5300eb6c 100644 --- a/Console._Blank/.kubernetes/cronjob.yaml +++ b/Console._Blank/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: diff --git a/Web._Blank/.github/workflows/build-and-deploy.yml b/Web._Blank/.github/workflows/build-and-deploy.yml index ec5d0318..5ac9b425 100644 --- a/Web._Blank/.github/workflows/build-and-deploy.yml +++ b/Web._Blank/.github/workflows/build-and-deploy.yml @@ -26,7 +26,7 @@ env: CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu - KUBERNETES_NAMESPACE: apps + KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 @@ -85,13 +85,11 @@ jobs: - name: Publish Image shell: pwsh run: | - $registryHost = $env:CONTAINER_REGISTRY_HOST.ToLower() - $imageLatestTag = $registryHost + "/" + $env:IMAGE_NAME + ":latest"; - $imageVersionTag = $registryHost + "/" + $env:IMAGE_NAME + ":" + $env:VERSION + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; docker build ` - -t $imageLatestTag ` - -t $imageVersionTag ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` @@ -106,8 +104,10 @@ jobs: }; echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - docker push $imageLatestTag; - docker push $imageVersionTag; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + if ($LastExitCode -ne 0) { throw "error"; @@ -127,7 +127,9 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) { @@ -164,6 +166,8 @@ jobs: body: | Version: ${{ env.VERSION }} Commit: ${{ github.sha }} + Build run: ${{ github.run_number }} + Image: ${{ env.CONTAINER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} artifacts: "nupkgs/*" token: ${{ secrets.GITHUB_TOKEN }} draft: false diff --git a/Web._Blank/.kubernetes/deployment.yaml b/Web._Blank/.kubernetes/deployment.yaml index 02882c56..bc4322a4 100644 --- a/Web._Blank/.kubernetes/deployment.yaml +++ b/Web._Blank/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% + image: %FULL_IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always From 20831abe9696850af10ad057267e136d85b37b93 Mon Sep 17 00:00:00 2001 From: vivet Date: Sun, 14 Jun 2026 08:50:19 +0200 Subject: [PATCH 03/33] Updated --- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 170 +++++++++--------- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 121 +++++++------ .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 44 +++-- .../.github/workflows/build-and-deploy.yml | 46 ++--- .../.github/workflows/build-and-deploy.yml | 47 ++--- .../.github/workflows/build-and-deploy.yml | 47 ++--- .../.github/workflows/build-and-deploy.yml | 47 ++--- .../.github/workflows/build-and-deploy.yml | 47 ++--- .../.github/workflows/build-and-deploy.yml | 50 +++--- .../.github/workflows/build-and-deploy.yml | 47 ++--- .../.github/workflows/build-and-deploy.yml | 50 +++--- .../.github/workflows/build-and-deploy.yml | 47 ++--- .../.github/workflows/build-and-deploy.yml | 47 ++--- .../.github/workflows/build-and-deploy.yml | 47 ++--- .../.github/workflows/build-and-deploy.yml | 47 ++--- .../.github/workflows/build-and-deploy.yml | 47 ++--- .../.github/workflows/build-and-deploy.yml | 47 ++--- .../.github/workflows/build-and-deploy.yml | 47 ++--- .../.github/workflows/build-and-deploy.yml | 47 ++--- .../.github/workflows/build-and-deploy.yml | 105 +++++------ .../.github/workflows/build-and-deploy.yml | 47 ++--- .../.github/workflows/build-and-deploy.yml | 47 ++--- .../.github/workflows/build-and-deploy.yml | 47 ++--- .../.github/workflows/build-and-deploy.yml | 3 + 89 files changed, 2352 insertions(+), 1849 deletions(-) diff --git a/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml b/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml index d0bfd8c2..a1173665 100644 --- a/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml b/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml index 344a820b..06451280 100644 --- a/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml b/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml index a430e3e7..16709d07 100644 --- a/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.ApiClients/.github/workflows/build-and-deploy.yml b/Api.ApiClients/.github/workflows/build-and-deploy.yml index 7c382b36..9e761860 100644 --- a/Api.ApiClients/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml b/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml index 0d20f495..d2012f94 100644 --- a/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml +++ b/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml @@ -39,31 +39,18 @@ env: AUTH_JWT_PUBLIC_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PUBLIC_KEY || secrets.STAGING_AUTH_JWT_PUBLIC_KEY }} AUTH_JWT_PRIVATE_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PRIVATE_KEY || secrets.STAGING_AUTH_JWT_PRIVATE_KEY }} ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -79,6 +66,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -121,10 +109,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml b/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml index 2afe476e..1426a59d 100644 --- a/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml +++ b/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml @@ -39,31 +39,18 @@ env: AUTH_JWT_PUBLIC_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PUBLIC_KEY || secrets.STAGING_AUTH_JWT_PUBLIC_KEY }} AUTH_JWT_PRIVATE_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PRIVATE_KEY || secrets.STAGING_AUTH_JWT_PRIVATE_KEY }} ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -79,6 +66,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -121,10 +109,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.Authorization/.github/workflows/build-and-deploy.yml b/Api.Authorization/.github/workflows/build-and-deploy.yml index 1d16b4ad..9f717349 100644 --- a/Api.Authorization/.github/workflows/build-and-deploy.yml +++ b/Api.Authorization/.github/workflows/build-and-deploy.yml @@ -39,31 +39,18 @@ env: AUTH_JWT_PUBLIC_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PUBLIC_KEY || secrets.STAGING_AUTH_JWT_PUBLIC_KEY }} AUTH_JWT_PRIVATE_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PRIVATE_KEY || secrets.STAGING_AUTH_JWT_PRIVATE_KEY }} ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -79,6 +66,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -121,10 +109,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml b/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml index 80054b21..202c403c 100644 --- a/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml +++ b/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.Cookies/.github/workflows/build-and-deploy.yml b/Api.Cookies/.github/workflows/build-and-deploy.yml index 3076bcb2..7ab4de30 100644 --- a/Api.Cookies/.github/workflows/build-and-deploy.yml +++ b/Api.Cookies/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml b/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml index 1f818ee1..1198c190 100644 --- a/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml +++ b/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml b/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml index bbf6e050..7909ce69 100644 --- a/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml +++ b/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.CustomService/.github/workflows/build-and-deploy.yml b/Api.CustomService/.github/workflows/build-and-deploy.yml index 95835325..cc22f1ae 100644 --- a/Api.CustomService/.github/workflows/build-and-deploy.yml +++ b/Api.CustomService/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.Data.Audit/.github/workflows/build-and-deploy.yml b/Api.Data.Audit/.github/workflows/build-and-deploy.yml index d92102d3..bb81d0ae 100644 --- a/Api.Data.Audit/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Audit/.github/workflows/build-and-deploy.yml @@ -41,31 +41,18 @@ env: SQL_USER: api-data-mysql-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -81,6 +68,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -123,10 +111,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh diff --git a/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml b/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml index 26a104d5..3bd1c04c 100644 --- a/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml +++ b/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml @@ -41,31 +41,18 @@ env: SQL_USER: api-data-mysql-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -81,6 +68,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -123,10 +111,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh diff --git a/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml index 974c23a2..8a92a306 100644 --- a/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml @@ -44,31 +44,18 @@ env: AUTH_JWT_PRIVATE_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PRIVATE_KEY || secrets.STAGING_AUTH_JWT_PRIVATE_KEY }} AUTH_API_KEY_SECRET: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_API_KEY_SECRET || secrets.STAGING_AUTH_API_KEY_SECRET }} ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -84,6 +71,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -126,10 +114,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh diff --git a/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml index c9fc5c39..f131c8c0 100644 --- a/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml @@ -43,31 +43,18 @@ env: AUTH_JWT_PUBLIC_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PUBLIC_KEY || secrets.STAGING_AUTH_JWT_PUBLIC_KEY }} AUTH_JWT_PRIVATE_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PRIVATE_KEY || secrets.STAGING_AUTH_JWT_PRIVATE_KEY }} ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -83,6 +70,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -125,10 +113,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh diff --git a/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml index 422f9bdc..84fc3f3f 100644 --- a/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml @@ -43,31 +43,18 @@ env: AUTH_JWT_PUBLIC_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PUBLIC_KEY || secrets.STAGING_AUTH_JWT_PUBLIC_KEY }} AUTH_JWT_PRIVATE_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PRIVATE_KEY || secrets.STAGING_AUTH_JWT_PRIVATE_KEY }} ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -83,6 +70,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -125,10 +113,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh diff --git a/Api.Data.Identity/.github/workflows/build-and-deploy.yml b/Api.Data.Identity/.github/workflows/build-and-deploy.yml index 8e8f9df4..b667a529 100644 --- a/Api.Data.Identity/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity/.github/workflows/build-and-deploy.yml @@ -41,31 +41,18 @@ env: SQL_USER: api-data-mysql-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -81,6 +68,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -123,10 +111,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh diff --git a/Api.Data.InMemory/.github/workflows/build-and-deploy.yml b/Api.Data.InMemory/.github/workflows/build-and-deploy.yml index 01944445..716f2ef7 100644 --- a/Api.Data.InMemory/.github/workflows/build-and-deploy.yml +++ b/Api.Data.InMemory/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml b/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml index 33c0be0f..09763d91 100644 --- a/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml +++ b/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml @@ -41,31 +41,18 @@ env: SQL_USER: api-data-mysql-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -81,6 +68,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -123,10 +111,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh diff --git a/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml index 2b260691..f72b9b87 100644 --- a/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml @@ -41,31 +41,18 @@ env: SQL_USER: api-data-mysql-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -81,6 +68,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -123,10 +111,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh diff --git a/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml index 072bb1db..55159957 100644 --- a/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml @@ -41,31 +41,18 @@ env: SQL_USER: api-data-mysql-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -81,6 +68,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -123,10 +111,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh diff --git a/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml index 9550d36c..34d47899 100644 --- a/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml @@ -41,31 +41,18 @@ env: SQL_USER: api-data-mysql-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -81,6 +68,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -123,10 +111,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh diff --git a/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml index f9953c7f..28c9b0f3 100644 --- a/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml @@ -41,31 +41,18 @@ env: SQL_USER: api-data-mysql-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -81,6 +68,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -123,10 +111,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh diff --git a/Api.Data.MySql/.github/workflows/build-and-deploy.yml b/Api.Data.MySql/.github/workflows/build-and-deploy.yml index b69ecda3..2a59f6ea 100644 --- a/Api.Data.MySql/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql/.github/workflows/build-and-deploy.yml @@ -41,31 +41,18 @@ env: SQL_USER: api-data-mysql-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -81,6 +68,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -123,10 +111,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh diff --git a/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml index a955f50e..e9b0144f 100644 --- a/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml @@ -41,31 +41,18 @@ env: SQL_USER: api-data-postgres-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -81,6 +68,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -123,10 +111,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh diff --git a/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml b/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml index 1691b88b..9bb4a34f 100644 --- a/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml +++ b/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml @@ -41,31 +41,18 @@ env: SQL_USER: api-data-postgres-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -81,6 +68,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -123,10 +111,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh diff --git a/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml b/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml index 0f63e4f9..8350c397 100644 --- a/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml @@ -41,31 +41,18 @@ env: SQL_USER: api-data-mysql-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -81,6 +68,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -123,10 +111,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh diff --git a/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml b/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml index 86639d00..821d02f7 100644 --- a/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml @@ -41,31 +41,18 @@ env: SQL_USER: api-data-mysql-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -81,6 +68,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -123,10 +111,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh diff --git a/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml b/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml index bdc76aea..ce08022d 100644 --- a/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml @@ -41,31 +41,18 @@ env: SQL_USER: api-data-mysql-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -81,6 +68,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -123,10 +111,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh diff --git a/Api.Data.SqLite/.github/workflows/build-and-deploy.yml b/Api.Data.SqLite/.github/workflows/build-and-deploy.yml index dd482244..8aec36e8 100644 --- a/Api.Data.SqLite/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SqLite/.github/workflows/build-and-deploy.yml @@ -40,31 +40,18 @@ env: SQL_NAME: nanoDb SQL_SIZE: 10Gi SQL_MIGRATION_CONNECTIONSTRING: "Data Source=/mnt/data/{{ env.SQL_NAME }}.sqlite" +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -80,6 +67,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -122,10 +110,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration shell: pwsh diff --git a/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml index dc5aaedf..6bfec695 100644 --- a/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml @@ -41,31 +41,18 @@ env: SQL_USER: api-data-sqlserver-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -81,6 +68,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -123,10 +111,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh diff --git a/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml b/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml index f6fe7aa4..f817e4f0 100644 --- a/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml @@ -41,31 +41,18 @@ env: SQL_USER: api-data-sqlserver-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -81,6 +68,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -123,10 +111,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh diff --git a/Api.Data.Triggers/.github/workflows/build-and-deploy.yml b/Api.Data.Triggers/.github/workflows/build-and-deploy.yml index 7048c8ba..783d01a1 100644 --- a/Api.Data.Triggers/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Triggers/.github/workflows/build-and-deploy.yml @@ -41,31 +41,18 @@ env: SQL_USER: api-data-mysql-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -81,6 +68,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -123,10 +111,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh diff --git a/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml b/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml index 7233df14..9edeb335 100644 --- a/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml +++ b/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml @@ -39,31 +39,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -79,6 +66,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -121,10 +109,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.Documentation/.github/workflows/build-and-deploy.yml b/Api.Documentation/.github/workflows/build-and-deploy.yml index 23c801be..58c9b8af 100644 --- a/Api.Documentation/.github/workflows/build-and-deploy.yml +++ b/Api.Documentation/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.ErrorHandling/.github/workflows/build-and-deploy.yml b/Api.ErrorHandling/.github/workflows/build-and-deploy.yml index 3d28ffb0..387adb97 100644 --- a/Api.ErrorHandling/.github/workflows/build-and-deploy.yml +++ b/Api.ErrorHandling/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml b/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml index 498d7291..1cd5e962 100644 --- a/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml +++ b/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.HealthChecks/.github/workflows/build-and-deploy.yml b/Api.HealthChecks/.github/workflows/build-and-deploy.yml index 738fe77c..2c91d574 100644 --- a/Api.HealthChecks/.github/workflows/build-and-deploy.yml +++ b/Api.HealthChecks/.github/workflows/build-and-deploy.yml @@ -39,31 +39,18 @@ env: ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} AVAILABILITY_URI: ${{ github.ref == 'refs/heads/master' && format('https://{0}/healthz', secrets.PRODUCTION_HOST) || format('https://{0}/healthz', secrets.STAGING_HOST) }} AVAILABILITY_CHECK_FREQUENCY: 300 +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -79,72 +66,10 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - - name: Add Availability Check - id: add-availability-check - shell: pwsh - run: | - az extension add -n application-insights; - - $env:SERVICE_NAME_INSIGTHS = $env:SERVICE_NAME + "-insights"; - $env:APPLICATION_INSIGHT_ID = az monitor app-insights component show --query "[?contains(name, '$env:SERVICE_NAME_INSIGTHS')].[id]" -o tsv; - - if ([string]::IsNullOrEmpty($env:APPLICATION_INSIGHT_ID)) - { - $env:WORKSPACE_ID = az monitor log-analytics workspace list --query "[?contains(name, 'log-analytics')].[id]" -o tsv; - - if (-not [string]::IsNullOrEmpty($env:WORKSPACE_ID)) - { - $env:APPLICATION_INSIGHT_ID = az monitor app-insights component create ` - -a $env:SERVICE_NAME_INSIGTHS ` - -l $env:AZURE_LOCATION ` - -g $env:AZURE_GROUP ` - --workspace $env:WORKSPACE_ID ` - --query "[id]" -o tsv; - if ($LastExitCode -ne 0) - { - throw "error"; - }; - } - }; - - $env:SERVICE_NAME_AVAILABILITY = $env:SERVICE_NAME + '-availability-' + $env:ASPNETCORE_ENVIRONMENT.ToLower(); - $env:AVAILABILITY_ID = az monitor app-insights web-test list -g $env:AZURE_GROUP --query "[?contains(name, '$env:SERVICE_NAME_AVAILABILITY')].[id]" -o tsv; - - if ([string]::IsNullOrEmpty($env:AVAILABILITY_ID)) - { - $env:APPLICATION_INSIGHT_HIDDEN_LINK = 'hidden-link:' + $env:APPLICATION_INSIGHT_ID + '=Resource'; - az monitor app-insights web-test create ` - -n $env:SERVICE_NAME_AVAILABILITY ` - --defined-web-test-name $env:SERVICE_NAME_AVAILABILITY ` - -g $env:AZURE_GROUP ` - -l $env:AZURE_LOCATION ` - --kind multistep ` - --web-test-kind standard ` - --frequency $env:AVAILABILITY_CHECK_FREQUENCY ` - --enabled true ` - --retry-enabled true ` - --ssl-check true ` - --ssl-lifetime-check 30 ` - --http-verb GET ` - --request-url $env:AVAILABILITY_URI ` - --expected-status-code 200 ` - --content-validation content-match='\"status\":\"unhealthy\"' ignore-case=true pass-if-text-found=false ` - --tags $env:APPLICATION_INSIGHT_HIDDEN_LINK ` - --locations Id='us-ca-sjc-azr' ` - --locations Id='us-va-ash-azr' ` - --locations Id='emea-gb-db3-azr' ` - --locations Id='emea-nl-ams-azr' ` - --locations Id='apac-hk-hkn-azr'; - }; if ($LastExitCode -ne 0) { - throw "error"; + throw "error"; }; - name: Publish Image @@ -184,10 +109,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh @@ -222,6 +165,69 @@ jobs: throw "error"; }; + - name: Add Availability Check + shell: pwsh + run: | + az extension add -n application-insights; + + $env:SERVICE_NAME_INSIGTHS = $env:SERVICE_NAME + "-insights"; + $env:APPLICATION_INSIGHT_ID = az monitor app-insights component show --query "[?contains(name, '$env:SERVICE_NAME_INSIGTHS')].[id]" -o tsv; + + if ([string]::IsNullOrEmpty($env:APPLICATION_INSIGHT_ID)) + { + $env:WORKSPACE_ID = az monitor log-analytics workspace list --query "[?contains(name, 'log-analytics')].[id]" -o tsv; + + if (-not [string]::IsNullOrEmpty($env:WORKSPACE_ID)) + { + $env:APPLICATION_INSIGHT_ID = az monitor app-insights component create ` + -a $env:SERVICE_NAME_INSIGTHS ` + -l $env:AZURE_LOCATION ` + -g $env:AZURE_GROUP ` + --workspace $env:WORKSPACE_ID ` + --query "[id]" -o tsv; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; + } + }; + + $env:SERVICE_NAME_AVAILABILITY = $env:SERVICE_NAME + '-availability-' + $env:ASPNETCORE_ENVIRONMENT.ToLower(); + $env:AVAILABILITY_ID = az monitor app-insights web-test list -g $env:AZURE_GROUP --query "[?contains(name, '$env:SERVICE_NAME_AVAILABILITY')].[id]" -o tsv; + + if ([string]::IsNullOrEmpty($env:AVAILABILITY_ID)) + { + $env:APPLICATION_INSIGHT_HIDDEN_LINK = 'hidden-link:' + $env:APPLICATION_INSIGHT_ID + '=Resource'; + az monitor app-insights web-test create ` + -n $env:SERVICE_NAME_AVAILABILITY ` + --defined-web-test-name $env:SERVICE_NAME_AVAILABILITY ` + -g $env:AZURE_GROUP ` + -l $env:AZURE_LOCATION ` + --kind multistep ` + --web-test-kind standard ` + --frequency $env:AVAILABILITY_CHECK_FREQUENCY ` + --enabled true ` + --retry-enabled true ` + --ssl-check true ` + --ssl-lifetime-check 30 ` + --http-verb GET ` + --request-url $env:AVAILABILITY_URI ` + --expected-status-code 200 ` + --content-validation content-match='\"status\":\"unhealthy\"' ignore-case=true pass-if-text-found=false ` + --tags $env:APPLICATION_INSIGHT_HIDDEN_LINK ` + --locations Id='us-ca-sjc-azr' ` + --locations Id='us-va-ash-azr' ` + --locations Id='emea-gb-db3-azr' ` + --locations Id='emea-nl-ams-azr' ` + --locations Id='apac-hk-hkn-azr'; + }; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; + - name: GitHub Release if: github.ref == 'refs/heads/master' uses: ncipollo/release-action@v1 diff --git a/Api.Hosting.Http/.github/workflows/build-and-deploy.yml b/Api.Hosting.Http/.github/workflows/build-and-deploy.yml index bba8202e..ae0246b9 100644 --- a/Api.Hosting.Http/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.Http/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.Hosting.Https/.github/workflows/build-and-deploy.yml b/Api.Hosting.Https/.github/workflows/build-and-deploy.yml index 37fa4f46..c304c2cd 100644 --- a/Api.Hosting.Https/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.Https/.github/workflows/build-and-deploy.yml @@ -39,31 +39,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -79,6 +66,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -121,10 +109,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml b/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml index 48e87ab0..7df67792 100644 --- a/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.Localization/.github/workflows/build-and-deploy.yml b/Api.Localization/.github/workflows/build-and-deploy.yml index 5dcacc8b..f02057b3 100644 --- a/Api.Localization/.github/workflows/build-and-deploy.yml +++ b/Api.Localization/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml b/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml index 79f9fd13..18718716 100644 --- a/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml b/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml index 1c64d5bc..9dc9234b 100644 --- a/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.Logging.NLog/.github/workflows/build-and-deploy.yml b/Api.Logging.NLog/.github/workflows/build-and-deploy.yml index ca1eb6f9..7ef641d7 100644 --- a/Api.Logging.NLog/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.NLog/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml b/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml index 6d16c603..65071acd 100644 --- a/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.MultipartJson/.github/workflows/build-and-deploy.yml b/Api.MultipartJson/.github/workflows/build-and-deploy.yml index 56ff8678..b9033687 100644 --- a/Api.MultipartJson/.github/workflows/build-and-deploy.yml +++ b/Api.MultipartJson/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml index 81da360d..9dfd7f32 100644 --- a/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml @@ -39,31 +39,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -79,6 +66,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -121,10 +109,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml index cd648d8b..8f02cbcc 100644 --- a/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml index 72ed1c79..9bfe18cb 100644 --- a/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml index 93fd4b81..a03ddcc3 100644 --- a/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml index 4cfceb58..77b16747 100644 --- a/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml index b46500f5..ec1c23cd 100644 --- a/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml @@ -39,31 +39,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -79,6 +66,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -121,10 +109,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml index 42ec0bb1..3ce97752 100644 --- a/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml index 509ff0bb..fd30e569 100644 --- a/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml index 90c7a6c5..bd1e34a2 100644 --- a/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.RequestTracing/.github/workflows/build-and-deploy.yml b/Api.RequestTracing/.github/workflows/build-and-deploy.yml index ed0cee82..4f5a558e 100644 --- a/Api.RequestTracing/.github/workflows/build-and-deploy.yml +++ b/Api.RequestTracing/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.ResponseCache/.github/workflows/build-and-deploy.yml b/Api.ResponseCache/.github/workflows/build-and-deploy.yml index 38045203..cf3c74f4 100644 --- a/Api.ResponseCache/.github/workflows/build-and-deploy.yml +++ b/Api.ResponseCache/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.ResponseCompression/.github/workflows/build-and-deploy.yml b/Api.ResponseCompression/.github/workflows/build-and-deploy.yml index 7824189b..59c7987c 100644 --- a/Api.ResponseCompression/.github/workflows/build-and-deploy.yml +++ b/Api.ResponseCompression/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.Session/.github/workflows/build-and-deploy.yml b/Api.Session/.github/workflows/build-and-deploy.yml index 7f9d8e88..52d7b63a 100644 --- a/Api.Session/.github/workflows/build-and-deploy.yml +++ b/Api.Session/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.StartupTasks/.github/workflows/build-and-deploy.yml b/Api.StartupTasks/.github/workflows/build-and-deploy.yml index 18a9ab0e..ce8d2f6e 100644 --- a/Api.StartupTasks/.github/workflows/build-and-deploy.yml +++ b/Api.StartupTasks/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.StaticFiles/.github/workflows/build-and-deploy.yml b/Api.StaticFiles/.github/workflows/build-and-deploy.yml index d0e48fd3..7c4c56ab 100644 --- a/Api.StaticFiles/.github/workflows/build-and-deploy.yml +++ b/Api.StaticFiles/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml index c6186901..f0ba5d2d 100644 --- a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -42,30 +42,14 @@ env: STORAGE_SHARE_NAME: nano-storage-azure ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -81,51 +65,12 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Create Fileshare - shell: pwsh - run: | - $env:STORAGE_ACCOUNT_NAME = az storage account list -g $env:AZURE_GROUP_STORAGE --query [0].name -o tsv; - - $env:FILE_SHARE_EXISTS = az storage share-rm exists ` - -g $env:AZURE_GROUP_STORAGE ` - -n $env:STORAGE_SHARE_NAME ` - --storage-account $env:STORAGE_ACCOUNT_NAME ` - --query exists; - - if ($env:FILE_SHARE_EXISTS -eq "false") - { - az storage share-rm create ` - -g $env:AZURE_GROUP_STORAGE ` - -n $env:STORAGE_SHARE_NAME ` - --storage-account $env:STORAGE_ACCOUNT_NAME ` - --access-tier TransactionOptimized ` - --quota $env:STORAGE_SIZE; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - $env:BACKUP_VAULT_NAME = az backup vault list -g $env:AZURE_GROUP_BACKUP --query [0].name -o tsv; - - az backup protection enable-for-azurefileshare ` - -g $env:AZURE_GROUP_BACKUP ` - -v $env:BACKUP_VAULT_NAME ` - -p $env:STORAGE_ACCOUNT_NAME-backup-policy ` - --storage-account $env:STORAGE_ACCOUNT_NAME ` - --azure-file-share $env:STORAGE_SHARE_NAME; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - } - - name: Publish Image shell: pwsh run: | @@ -163,10 +108,68 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + + - name: Create Fileshare + shell: pwsh + run: | + $env:STORAGE_ACCOUNT_NAME = az storage account list -g $env:AZURE_GROUP_STORAGE --query [0].name -o tsv; + + $env:FILE_SHARE_EXISTS = az storage share-rm exists ` + -g $env:AZURE_GROUP_STORAGE ` + -n $env:STORAGE_SHARE_NAME ` + --storage-account $env:STORAGE_ACCOUNT_NAME ` + --query exists; + + if ($env:FILE_SHARE_EXISTS -eq "false") + { + az storage share-rm create ` + -g $env:AZURE_GROUP_STORAGE ` + -n $env:STORAGE_SHARE_NAME ` + --storage-account $env:STORAGE_ACCOUNT_NAME ` + --access-tier TransactionOptimized ` + --quota $env:STORAGE_SIZE; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; + + $env:BACKUP_VAULT_NAME = az backup vault list -g $env:AZURE_GROUP_BACKUP --query [0].name -o tsv; + + az backup protection enable-for-azurefileshare ` + -g $env:AZURE_GROUP_BACKUP ` + -v $env:BACKUP_VAULT_NAME ` + -p $env:STORAGE_ACCOUNT_NAME-backup-policy ` + --storage-account $env:STORAGE_ACCOUNT_NAME ` + --azure-file-share $env:STORAGE_SHARE_NAME; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; + } - name: Kubernetes Deploy shell: pwsh diff --git a/Api.Storage.Local/.github/workflows/build-and-deploy.yml b/Api.Storage.Local/.github/workflows/build-and-deploy.yml index 21bbc7d1..05c06da9 100644 --- a/Api.Storage.Local/.github/workflows/build-and-deploy.yml +++ b/Api.Storage.Local/.github/workflows/build-and-deploy.yml @@ -38,31 +38,18 @@ env: STORAGE_SIZE: 1000 STORAGE_SHARE_NAME: nano-storage-local ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -78,6 +65,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -120,10 +108,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.TimeZone/.github/workflows/build-and-deploy.yml b/Api.TimeZone/.github/workflows/build-and-deploy.yml index 52cb0864..55963326 100644 --- a/Api.TimeZone/.github/workflows/build-and-deploy.yml +++ b/Api.TimeZone/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.Versioning/.github/workflows/build-and-deploy.yml b/Api.Versioning/.github/workflows/build-and-deploy.yml index ecc7fb65..0595853e 100644 --- a/Api.Versioning/.github/workflows/build-and-deploy.yml +++ b/Api.Versioning/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api.VirusScan/.github/workflows/build-and-deploy.yml b/Api.VirusScan/.github/workflows/build-and-deploy.yml index db2bbe57..f86e9f0d 100644 --- a/Api.VirusScan/.github/workflows/build-and-deploy.yml +++ b/Api.VirusScan/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Api._Blank/.github/workflows/build-and-deploy.yml b/Api._Blank/.github/workflows/build-and-deploy.yml index 356d7eaf..848d3366 100644 --- a/Api._Blank/.github/workflows/build-and-deploy.yml +++ b/Api._Blank/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,6 +64,7 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; @@ -119,10 +107,28 @@ jobs: $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + if ($LastExitCode -ne 0) { throw "error"; - }; + }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml b/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml index 0c519fe9..6f72f6e0 100644 --- a/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml +++ b/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml @@ -34,31 +34,18 @@ env: KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -74,9 +61,10 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { - throw "error"; + throw "error"; }; - name: Publish Image @@ -108,7 +96,24 @@ jobs: if ($LastExitCode -ne 0) { throw "error"; - }; + }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Console.CustomService/.github/workflows/build-and-deploy.yml b/Console.CustomService/.github/workflows/build-and-deploy.yml index abecb0b9..77124fb2 100644 --- a/Console.CustomService/.github/workflows/build-and-deploy.yml +++ b/Console.CustomService/.github/workflows/build-and-deploy.yml @@ -34,31 +34,18 @@ env: KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -74,9 +61,10 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { - throw "error"; + throw "error"; }; - name: Publish Image @@ -108,7 +96,24 @@ jobs: if ($LastExitCode -ne 0) { throw "error"; - }; + }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Console.Data.InMemory/.github/workflows/build-and-deploy.yml b/Console.Data.InMemory/.github/workflows/build-and-deploy.yml index 23ba6009..b366b0a1 100644 --- a/Console.Data.InMemory/.github/workflows/build-and-deploy.yml +++ b/Console.Data.InMemory/.github/workflows/build-and-deploy.yml @@ -34,31 +34,18 @@ env: KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -74,9 +61,10 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { - throw "error"; + throw "error"; }; - name: Publish Image @@ -108,7 +96,24 @@ jobs: if ($LastExitCode -ne 0) { throw "error"; - }; + }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Console.Data.MySql/.github/workflows/build-and-deploy.yml b/Console.Data.MySql/.github/workflows/build-and-deploy.yml index 22974985..9008120f 100644 --- a/Console.Data.MySql/.github/workflows/build-and-deploy.yml +++ b/Console.Data.MySql/.github/workflows/build-and-deploy.yml @@ -38,31 +38,18 @@ env: SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -78,9 +65,10 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { - throw "error"; + throw "error"; }; - name: Publish Image @@ -112,8 +100,25 @@ jobs: if ($LastExitCode -ne 0) { throw "error"; - }; + }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + - name: Database Migration & User shell: pwsh run: | diff --git a/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml b/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml index 8ea03053..5511c577 100644 --- a/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml +++ b/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml @@ -38,31 +38,18 @@ env: SQL_USER: api-data-mysql-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -78,9 +65,10 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { - throw "error"; + throw "error"; }; - name: Publish Image @@ -112,7 +100,24 @@ jobs: if ($LastExitCode -ne 0) { throw "error"; - }; + }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -131,9 +136,6 @@ jobs: { throw "error"; }; - - apt-get update - apt-get install -y postgresql-client $userExists = psql "$env:SQL_MIGRATION_CONNECTIONSTRING" ` -tAc "SELECT 1 FROM pg_roles WHERE rolname='$env:SQL_USER';" diff --git a/Console.Data.SqLite/.github/workflows/build-and-deploy.yml b/Console.Data.SqLite/.github/workflows/build-and-deploy.yml index 6808b4b7..95df4311 100644 --- a/Console.Data.SqLite/.github/workflows/build-and-deploy.yml +++ b/Console.Data.SqLite/.github/workflows/build-and-deploy.yml @@ -37,31 +37,18 @@ env: SQL_SIZE: 10Gi SQL_CONNECTIONSTRING: "Data Source=/mnt/data/{{ env.SQL_NAME }}.sqlite" DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -77,9 +64,10 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { - throw "error"; + throw "error"; }; - name: Publish Image @@ -111,7 +99,24 @@ jobs: if ($LastExitCode -ne 0) { throw "error"; - }; + }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration shell: pwsh diff --git a/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml b/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml index e67e1525..f6c9fdd1 100644 --- a/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml +++ b/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml @@ -38,31 +38,18 @@ env: SQL_USER: api-data-sqlserver-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -78,9 +65,10 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { - throw "error"; + throw "error"; }; - name: Publish Image @@ -112,7 +100,24 @@ jobs: if ($LastExitCode -ne 0) { throw "error"; - }; + }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -131,9 +136,6 @@ jobs: { throw "error"; }; - - apt-get update - apt-get install -y mssql-tools unixodbc-dev $loginExists = sqlcmd ` -S "$env:SQL_HOST,$env:SQL_PORT" ` diff --git a/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml b/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml index 7aa433f6..d7d6b216 100644 --- a/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml +++ b/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml @@ -34,31 +34,18 @@ env: KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -74,9 +61,10 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { - throw "error"; + throw "error"; }; - name: Publish Image @@ -108,7 +96,24 @@ jobs: if ($LastExitCode -ne 0) { throw "error"; - }; + }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml b/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml index f6831af9..b7b01951 100644 --- a/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml +++ b/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml @@ -33,31 +33,18 @@ env: KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -73,9 +60,10 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { - throw "error"; + throw "error"; }; - name: Publish Image @@ -107,7 +95,24 @@ jobs: if ($LastExitCode -ne 0) { throw "error"; - }; + }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Console.Localization/.github/workflows/build-and-deploy.yml b/Console.Localization/.github/workflows/build-and-deploy.yml index 913254d8..ce210d21 100644 --- a/Console.Localization/.github/workflows/build-and-deploy.yml +++ b/Console.Localization/.github/workflows/build-and-deploy.yml @@ -34,31 +34,18 @@ env: KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -74,9 +61,10 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { - throw "error"; + throw "error"; }; - name: Publish Image @@ -108,7 +96,24 @@ jobs: if ($LastExitCode -ne 0) { throw "error"; - }; + }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml b/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml index c26e4a2c..6aa41a98 100644 --- a/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml @@ -34,31 +34,18 @@ env: KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -74,9 +61,10 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { - throw "error"; + throw "error"; }; - name: Publish Image @@ -108,7 +96,24 @@ jobs: if ($LastExitCode -ne 0) { throw "error"; - }; + }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml b/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml index 9395a691..9f8e3c7b 100644 --- a/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml @@ -34,31 +34,18 @@ env: KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -74,9 +61,10 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { - throw "error"; + throw "error"; }; - name: Publish Image @@ -108,7 +96,24 @@ jobs: if ($LastExitCode -ne 0) { throw "error"; - }; + }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Console.Logging.NLog/.github/workflows/build-and-deploy.yml b/Console.Logging.NLog/.github/workflows/build-and-deploy.yml index 1bd34670..2ca1bd17 100644 --- a/Console.Logging.NLog/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.NLog/.github/workflows/build-and-deploy.yml @@ -34,31 +34,18 @@ env: KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -74,9 +61,10 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { - throw "error"; + throw "error"; }; - name: Publish Image @@ -108,7 +96,24 @@ jobs: if ($LastExitCode -ne 0) { throw "error"; - }; + }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml b/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml index 04171e10..d8e8b268 100644 --- a/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml @@ -34,31 +34,18 @@ env: KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -74,9 +61,10 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { - throw "error"; + throw "error"; }; - name: Publish Image @@ -108,7 +96,24 @@ jobs: if ($LastExitCode -ne 0) { throw "error"; - }; + }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Console.StartupTasks/.github/workflows/build-and-deploy.yml b/Console.StartupTasks/.github/workflows/build-and-deploy.yml index 4f01a543..6235e622 100644 --- a/Console.StartupTasks/.github/workflows/build-and-deploy.yml +++ b/Console.StartupTasks/.github/workflows/build-and-deploy.yml @@ -34,31 +34,18 @@ env: KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -74,9 +61,10 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { - throw "error"; + throw "error"; }; - name: Publish Image @@ -108,7 +96,24 @@ jobs: if ($LastExitCode -ne 0) { throw "error"; - }; + }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml index 27dcd795..7186eded 100644 --- a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -38,31 +38,18 @@ env: STORAGE_SIZE: 1000 STORAGE_SHARE_NAME: nano-storage-azure DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -78,11 +65,60 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) + { + throw "error"; + }; + + - name: Publish Image + shell: pwsh + run: | + $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + + docker build ` + -t "$($env:FULL_IMAGE_NAME):latest" ` + -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./; + + if ($LastExitCode -ne 0) { throw "error"; }; + echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; + + docker push "$($env:FULL_IMAGE_NAME):latest"; + docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + - name: Create Fileshare shell: pwsh run: | @@ -123,37 +159,6 @@ jobs: }; } - - name: Publish Image - shell: pwsh - run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - name: Kubernetes Deploy shell: pwsh run: | diff --git a/Console.Storage.Local/.github/workflows/build-and-deploy.yml b/Console.Storage.Local/.github/workflows/build-and-deploy.yml index 3dc224cc..2f3e51d6 100644 --- a/Console.Storage.Local/.github/workflows/build-and-deploy.yml +++ b/Console.Storage.Local/.github/workflows/build-and-deploy.yml @@ -36,31 +36,18 @@ env: STORAGE_SIZE: 1000 STORAGE_SHARE_NAME: nano-storage-local DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -76,9 +63,10 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { - throw "error"; + throw "error"; }; - name: Publish Image @@ -110,7 +98,24 @@ jobs: if ($LastExitCode -ne 0) { throw "error"; - }; + }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Console.Workers/.github/workflows/build-and-deploy.yml b/Console.Workers/.github/workflows/build-and-deploy.yml index f77acc08..551a9df0 100644 --- a/Console.Workers/.github/workflows/build-and-deploy.yml +++ b/Console.Workers/.github/workflows/build-and-deploy.yml @@ -34,31 +34,18 @@ env: KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -74,9 +61,10 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { - throw "error"; + throw "error"; }; - name: Publish Image @@ -108,7 +96,24 @@ jobs: if ($LastExitCode -ne 0) { throw "error"; - }; + }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Console._Blank/.github/workflows/build-and-deploy.yml b/Console._Blank/.github/workflows/build-and-deploy.yml index c00ca0be..e5f52961 100644 --- a/Console._Blank/.github/workflows/build-and-deploy.yml +++ b/Console._Blank/.github/workflows/build-and-deploy.yml @@ -34,31 +34,18 @@ env: KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: - build-and-deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + build: + runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - uses: actions/checkout@v6 - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build shell: pwsh run: | @@ -74,9 +61,10 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { - throw "error"; + throw "error"; }; - name: Publish Image @@ -108,7 +96,24 @@ jobs: if ($LastExitCode -ne 0) { throw "error"; - }; + }; + deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + needs: build + permissions: + contents: write + steps: + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh diff --git a/Web._Blank/.github/workflows/build-and-deploy.yml b/Web._Blank/.github/workflows/build-and-deploy.yml index 5ac9b425..68cf918d 100644 --- a/Web._Blank/.github/workflows/build-and-deploy.yml +++ b/Web._Blank/.github/workflows/build-and-deploy.yml @@ -37,6 +37,9 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} +concurrency: + group: ${{ github.workflow }}-${{ github.repository }} + cancel-in-progress: true jobs: build-and-deploy: runs-on: From 760f06d2bed6da4233526640c5af766006de062b Mon Sep 17 00:00:00 2001 From: vivet Date: Wed, 17 Jun 2026 16:30:11 +0200 Subject: [PATCH 04/33] Updated --- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.ApiClients/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.Authorization/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.Cookies/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.CustomService/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.Data.Audit/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.Data.Identity/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.Data.InMemory/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 60 +++++-------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.Data.MySql/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.Data.SqLite/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.Data.Triggers/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 90 ++++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 88 ++++++++---------- Api.Documentation/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.ErrorHandling/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.HealthChecks/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.Hosting.Http/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 5 +- Api.Hosting.Https/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.Localization/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.Logging.NLog/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.MultipartJson/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.ResponseCache/.kubernetes/deployment.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- .../.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.Session/.kubernetes/deployment.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.StartupTasks/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.StaticFiles/.kubernetes/deployment.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.Storage.Azure/.kubernetes/deployment.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.Storage.Local/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.TimeZone/.kubernetes/deployment.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.Versioning/.kubernetes/deployment.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 87 +++++++----------- Api.VirusScan/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 90 ++++++++----------- Api._Blank/.kubernetes/deployment.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 72 ++++++--------- .../.kubernetes/cronjob.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 72 ++++++--------- .../.kubernetes/cronjob.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 72 ++++++--------- .../.kubernetes/cronjob.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 72 ++++++--------- Console.Data.MySql/.kubernetes/cronjob.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 72 ++++++--------- .../.kubernetes/cronjob.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 72 ++++++--------- Console.Data.SqLite/.kubernetes/cronjob.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 72 ++++++--------- .../.kubernetes/cronjob.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 72 ++++++--------- .../.kubernetes/cronjob.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 71 ++++++--------- .../.kubernetes/cronjob.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 72 ++++++--------- Console.Localization/.kubernetes/cronjob.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 72 ++++++--------- .../.kubernetes/cronjob.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 72 ++++++--------- .../.kubernetes/cronjob.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 72 ++++++--------- Console.Logging.NLog/.kubernetes/cronjob.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 72 ++++++--------- .../.kubernetes/cronjob.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 72 ++++++--------- Console.StartupTasks/.kubernetes/cronjob.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 72 ++++++--------- .../.kubernetes/cronjob.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 72 ++++++--------- .../.kubernetes/cronjob.yaml | 5 +- .../.github/workflows/build-and-deploy.yml | 72 ++++++--------- Console.Workers/.kubernetes/cronjob.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 72 ++++++--------- Console._Blank/.kubernetes/cronjob.yaml | 4 +- .../.github/workflows/build-and-deploy.yml | 60 +++++-------- Web._Blank/.kubernetes/deployment.yaml | 4 +- 180 files changed, 2944 insertions(+), 4892 deletions(-) diff --git a/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml b/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml index a1173665..9be3ea91 100644 --- a/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.ApiClients.Audit/.kubernetes/deployment.yaml b/Api.ApiClients.Audit/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.ApiClients.Audit/.kubernetes/deployment.yaml +++ b/Api.ApiClients.Audit/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml b/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml index 06451280..74e9df07 100644 --- a/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.ApiClients.Entity/.kubernetes/deployment.yaml b/Api.ApiClients.Entity/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.ApiClients.Entity/.kubernetes/deployment.yaml +++ b/Api.ApiClients.Entity/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml b/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml index 16709d07..77ac619f 100644 --- a/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.ApiClients.RootLogIn/.kubernetes/deployment.yaml b/Api.ApiClients.RootLogIn/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.ApiClients.RootLogIn/.kubernetes/deployment.yaml +++ b/Api.ApiClients.RootLogIn/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.ApiClients/.github/workflows/build-and-deploy.yml b/Api.ApiClients/.github/workflows/build-and-deploy.yml index 9e761860..88643fb2 100644 --- a/Api.ApiClients/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.ApiClients/.kubernetes/deployment.yaml b/Api.ApiClients/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.ApiClients/.kubernetes/deployment.yaml +++ b/Api.ApiClients/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml b/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml index d2012f94..52323b39 100644 --- a/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml +++ b/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -43,13 +40,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -72,70 +79,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/auth-jwt-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-jwt-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-jwt-secret.tmp.yaml; diff --git a/Api.Auth.External.Custom/.kubernetes/deployment.yaml b/Api.Auth.External.Custom/.kubernetes/deployment.yaml index 85976888..6ea6a615 100644 --- a/Api.Auth.External.Custom/.kubernetes/deployment.yaml +++ b/Api.Auth.External.Custom/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -84,6 +84,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml b/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml index 1426a59d..f9bc4d11 100644 --- a/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml +++ b/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -43,13 +40,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -72,70 +79,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/auth-jwt-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-jwt-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-jwt-secret.tmp.yaml; diff --git a/Api.Auth.RootLogin/.kubernetes/deployment.yaml b/Api.Auth.RootLogin/.kubernetes/deployment.yaml index 85976888..6ea6a615 100644 --- a/Api.Auth.RootLogin/.kubernetes/deployment.yaml +++ b/Api.Auth.RootLogin/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -84,6 +84,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Authorization/.github/workflows/build-and-deploy.yml b/Api.Authorization/.github/workflows/build-and-deploy.yml index 9f717349..9fc17a3f 100644 --- a/Api.Authorization/.github/workflows/build-and-deploy.yml +++ b/Api.Authorization/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -43,13 +40,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -72,70 +79,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/auth-jwt-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-jwt-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-jwt-secret.tmp.yaml; diff --git a/Api.Authorization/.kubernetes/deployment.yaml b/Api.Authorization/.kubernetes/deployment.yaml index 85976888..6ea6a615 100644 --- a/Api.Authorization/.kubernetes/deployment.yaml +++ b/Api.Authorization/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -84,6 +84,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml b/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml index 202c403c..4d263e57 100644 --- a/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml +++ b/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.ContentNegotiation/.kubernetes/deployment.yaml b/Api.ContentNegotiation/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.ContentNegotiation/.kubernetes/deployment.yaml +++ b/Api.ContentNegotiation/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Cookies/.github/workflows/build-and-deploy.yml b/Api.Cookies/.github/workflows/build-and-deploy.yml index 7ab4de30..fda76d41 100644 --- a/Api.Cookies/.github/workflows/build-and-deploy.yml +++ b/Api.Cookies/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.Cookies/.kubernetes/deployment.yaml b/Api.Cookies/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.Cookies/.kubernetes/deployment.yaml +++ b/Api.Cookies/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml b/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml index 1198c190..4426b3bd 100644 --- a/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml +++ b/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.CustomConfigSection/.kubernetes/deployment.yaml b/Api.CustomConfigSection/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.CustomConfigSection/.kubernetes/deployment.yaml +++ b/Api.CustomConfigSection/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml b/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml index 7909ce69..be326bf6 100644 --- a/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml +++ b/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.CustomMiddleware/.kubernetes/deployment.yaml b/Api.CustomMiddleware/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.CustomMiddleware/.kubernetes/deployment.yaml +++ b/Api.CustomMiddleware/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.CustomService/.github/workflows/build-and-deploy.yml b/Api.CustomService/.github/workflows/build-and-deploy.yml index cc22f1ae..84641eff 100644 --- a/Api.CustomService/.github/workflows/build-and-deploy.yml +++ b/Api.CustomService/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.CustomService/.kubernetes/deployment.yaml b/Api.CustomService/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.CustomService/.kubernetes/deployment.yaml +++ b/Api.CustomService/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Data.Audit/.github/workflows/build-and-deploy.yml b/Api.Data.Audit/.github/workflows/build-and-deploy.yml index bb81d0ae..f555af81 100644 --- a/Api.Data.Audit/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Audit/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -45,13 +42,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -74,65 +81,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -180,7 +161,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Audit/.kubernetes/deployment.yaml b/Api.Data.Audit/.kubernetes/deployment.yaml index 1579cedc..a6f04b0f 100644 --- a/Api.Data.Audit/.kubernetes/deployment.yaml +++ b/Api.Data.Audit/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -79,6 +79,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml b/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml index 3bd1c04c..5f253b98 100644 --- a/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml +++ b/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -45,13 +42,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -74,65 +81,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -180,7 +161,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.EntityEvents/.kubernetes/deployment.yaml b/Api.Data.EntityEvents/.kubernetes/deployment.yaml index d5cc6c4a..759afb02 100644 --- a/Api.Data.EntityEvents/.kubernetes/deployment.yaml +++ b/Api.Data.EntityEvents/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -90,6 +90,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml index 8a92a306..e5d7412f 100644 --- a/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -48,13 +45,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -77,65 +84,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -183,7 +164,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Identity.Auth.ApiKey/.kubernetes/deployment.yaml b/Api.Data.Identity.Auth.ApiKey/.kubernetes/deployment.yaml index 11c29b0b..3824a48e 100644 --- a/Api.Data.Identity.Auth.ApiKey/.kubernetes/deployment.yaml +++ b/Api.Data.Identity.Auth.ApiKey/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -94,6 +94,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml index f131c8c0..eb639a60 100644 --- a/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -47,13 +44,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -76,65 +83,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -182,7 +163,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Identity.Auth.External.Custom/.kubernetes/deployment.yaml b/Api.Data.Identity.Auth.External.Custom/.kubernetes/deployment.yaml index 17856230..7b7d2e61 100644 --- a/Api.Data.Identity.Auth.External.Custom/.kubernetes/deployment.yaml +++ b/Api.Data.Identity.Auth.External.Custom/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -89,6 +89,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml index 84fc3f3f..db8d8fec 100644 --- a/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -47,13 +44,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -76,65 +83,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -182,7 +163,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Identity.Auth.Jwt/.kubernetes/deployment.yaml b/Api.Data.Identity.Auth.Jwt/.kubernetes/deployment.yaml index 17856230..7b7d2e61 100644 --- a/Api.Data.Identity.Auth.Jwt/.kubernetes/deployment.yaml +++ b/Api.Data.Identity.Auth.Jwt/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -89,6 +89,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Data.Identity/.github/workflows/build-and-deploy.yml b/Api.Data.Identity/.github/workflows/build-and-deploy.yml index b667a529..5ab11ee3 100644 --- a/Api.Data.Identity/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -45,13 +42,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -74,65 +81,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -180,7 +161,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Identity/.kubernetes/deployment.yaml b/Api.Data.Identity/.kubernetes/deployment.yaml index 1579cedc..a6f04b0f 100644 --- a/Api.Data.Identity/.kubernetes/deployment.yaml +++ b/Api.Data.Identity/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -79,6 +79,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Data.InMemory/.github/workflows/build-and-deploy.yml b/Api.Data.InMemory/.github/workflows/build-and-deploy.yml index 716f2ef7..14191c8d 100644 --- a/Api.Data.InMemory/.github/workflows/build-and-deploy.yml +++ b/Api.Data.InMemory/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.Data.InMemory/.kubernetes/deployment.yaml b/Api.Data.InMemory/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.Data.InMemory/.kubernetes/deployment.yaml +++ b/Api.Data.InMemory/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml b/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml index 09763d91..b4740ce7 100644 --- a/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml +++ b/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -45,13 +42,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -74,65 +81,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -180,7 +161,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.LazyLoading/.kubernetes/deployment.yaml b/Api.Data.LazyLoading/.kubernetes/deployment.yaml index 1579cedc..a6f04b0f 100644 --- a/Api.Data.LazyLoading/.kubernetes/deployment.yaml +++ b/Api.Data.LazyLoading/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -79,6 +79,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml index bfa21e4a..bc513b16 100644 --- a/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -50,13 +47,7 @@ jobs: permissions: contents: write packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - - uses: actions/checkout@v6 - - name: Azure Login shell: pwsh run: | @@ -81,48 +72,41 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ + if ($LastExitCode -ne 0) { throw "error"; @@ -174,7 +158,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.MySql.Collation/.kubernetes/deployment.yaml b/Api.Data.MySql.Collation/.kubernetes/deployment.yaml index 1579cedc..a6f04b0f 100644 --- a/Api.Data.MySql.Collation/.kubernetes/deployment.yaml +++ b/Api.Data.MySql.Collation/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -79,6 +79,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml index f72b9b87..417bef7e 100644 --- a/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -45,13 +42,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -74,65 +81,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -180,7 +161,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.MySql.Mappings/.kubernetes/deployment.yaml b/Api.Data.MySql.Mappings/.kubernetes/deployment.yaml index 1579cedc..a6f04b0f 100644 --- a/Api.Data.MySql.Mappings/.kubernetes/deployment.yaml +++ b/Api.Data.MySql.Mappings/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -79,6 +79,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml index 55159957..77d2b35b 100644 --- a/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -45,13 +42,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -74,65 +81,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -180,7 +161,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.MySql.Spatial/.kubernetes/deployment.yaml b/Api.Data.MySql.Spatial/.kubernetes/deployment.yaml index 1579cedc..d910429c 100644 --- a/Api.Data.MySql.Spatial/.kubernetes/deployment.yaml +++ b/Api.Data.MySql.Spatial/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -79,6 +79,4 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret diff --git a/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml index 34d47899..c1723266 100644 --- a/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -45,13 +42,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -74,65 +81,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -180,7 +161,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.MySql.StoredProcedures/.kubernetes/deployment.yaml b/Api.Data.MySql.StoredProcedures/.kubernetes/deployment.yaml index 1579cedc..a6f04b0f 100644 --- a/Api.Data.MySql.StoredProcedures/.kubernetes/deployment.yaml +++ b/Api.Data.MySql.StoredProcedures/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -79,6 +79,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml index 28c9b0f3..5b45ccc4 100644 --- a/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -45,13 +42,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -74,65 +81,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -180,7 +161,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.MySql.Views/.kubernetes/deployment.yaml b/Api.Data.MySql.Views/.kubernetes/deployment.yaml index 1579cedc..a6f04b0f 100644 --- a/Api.Data.MySql.Views/.kubernetes/deployment.yaml +++ b/Api.Data.MySql.Views/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -79,6 +79,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Data.MySql/.github/workflows/build-and-deploy.yml b/Api.Data.MySql/.github/workflows/build-and-deploy.yml index 2a59f6ea..0eae5e02 100644 --- a/Api.Data.MySql/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -45,13 +42,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -74,65 +81,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -180,7 +161,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.MySql/.kubernetes/deployment.yaml b/Api.Data.MySql/.kubernetes/deployment.yaml index 1579cedc..a6f04b0f 100644 --- a/Api.Data.MySql/.kubernetes/deployment.yaml +++ b/Api.Data.MySql/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -79,6 +79,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml index e9b0144f..c493b03d 100644 --- a/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -45,13 +42,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -74,65 +81,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -188,7 +169,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Host=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Username=$env:SQL_USER;Password=$env:SQL_PASSWORD;SSL Mode=Prefer;Trust Server Certificate=true"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.PostgreSQL.Spatial/.kubernetes/deployment.yaml b/Api.Data.PostgreSQL.Spatial/.kubernetes/deployment.yaml index 1579cedc..a6f04b0f 100644 --- a/Api.Data.PostgreSQL.Spatial/.kubernetes/deployment.yaml +++ b/Api.Data.PostgreSQL.Spatial/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -79,6 +79,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml b/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml index 9bb4a34f..27580d47 100644 --- a/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml +++ b/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -45,13 +42,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -74,65 +81,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -188,7 +169,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Host=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Username=$env:SQL_USER;Password=$env:SQL_PASSWORD;SSL Mode=Prefer;Trust Server Certificate=true"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.PostgreSQL/.kubernetes/deployment.yaml b/Api.Data.PostgreSQL/.kubernetes/deployment.yaml index 1579cedc..d910429c 100644 --- a/Api.Data.PostgreSQL/.kubernetes/deployment.yaml +++ b/Api.Data.PostgreSQL/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -79,6 +79,4 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret diff --git a/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml b/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml index 8350c397..cf19e989 100644 --- a/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -45,13 +42,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -74,65 +81,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -180,7 +161,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Repository.AutoSave/.kubernetes/deployment.yaml b/Api.Data.Repository.AutoSave/.kubernetes/deployment.yaml index 1579cedc..a6f04b0f 100644 --- a/Api.Data.Repository.AutoSave/.kubernetes/deployment.yaml +++ b/Api.Data.Repository.AutoSave/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -79,6 +79,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml b/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml index 821d02f7..fbe93a1f 100644 --- a/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -45,13 +42,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -74,65 +81,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -180,7 +161,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Repository.Includes/.kubernetes/deployment.yaml b/Api.Data.Repository.Includes/.kubernetes/deployment.yaml index 1579cedc..a6f04b0f 100644 --- a/Api.Data.Repository.Includes/.kubernetes/deployment.yaml +++ b/Api.Data.Repository.Includes/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -79,6 +79,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml b/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml index ce08022d..61f9de28 100644 --- a/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -45,13 +42,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -74,65 +81,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -180,7 +161,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.SoftDelete/.kubernetes/deployment.yaml b/Api.Data.SoftDelete/.kubernetes/deployment.yaml index 1579cedc..a6f04b0f 100644 --- a/Api.Data.SoftDelete/.kubernetes/deployment.yaml +++ b/Api.Data.SoftDelete/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -79,6 +79,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Data.SqLite/.github/workflows/build-and-deploy.yml b/Api.Data.SqLite/.github/workflows/build-and-deploy.yml index 8aec36e8..68e219ab 100644 --- a/Api.Data.SqLite/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SqLite/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -44,13 +41,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -73,65 +80,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration shell: pwsh @@ -149,7 +130,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/data-storageclass.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/data-storageclass.tmp.yaml; kubectl apply -f .kubernetes/data-storageclass.tmp.yaml; diff --git a/Api.Data.SqLite/.kubernetes/deployment.yaml b/Api.Data.SqLite/.kubernetes/deployment.yaml index 145e1a6a..fd8b1951 100644 --- a/Api.Data.SqLite/.kubernetes/deployment.yaml +++ b/Api.Data.SqLite/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -80,6 +80,3 @@ spec: - name: %SERVICE_NAME%-volume persistentVolumeClaim: claimName: %SERVICE_NAME%-pvc - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml index 6bfec695..36a24e44 100644 --- a/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -45,13 +42,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -74,65 +81,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -199,7 +180,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST,$env:SQL_PORT;Database=$env:SQL_NAME;User Id=$env:SQL_USER;Password=$env:SQL_PASSWORD;Encrypt=True;TrustServerCertificate=True;"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.SqlServer.Spatial/.kubernetes/deployment.yaml b/Api.Data.SqlServer.Spatial/.kubernetes/deployment.yaml index 1579cedc..a6f04b0f 100644 --- a/Api.Data.SqlServer.Spatial/.kubernetes/deployment.yaml +++ b/Api.Data.SqlServer.Spatial/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -79,6 +79,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml b/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml index f817e4f0..b5928536 100644 --- a/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -45,13 +42,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -74,65 +81,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -199,7 +180,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST,$env:SQL_PORT;Database=$env:SQL_NAME;User Id=$env:SQL_USER;Password=$env:SQL_PASSWORD;Encrypt=True;TrustServerCertificate=True;"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.SqlServer/.kubernetes/deployment.yaml b/Api.Data.SqlServer/.kubernetes/deployment.yaml index 1579cedc..a6f04b0f 100644 --- a/Api.Data.SqlServer/.kubernetes/deployment.yaml +++ b/Api.Data.SqlServer/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -79,6 +79,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Data.Triggers/.github/workflows/build-and-deploy.yml b/Api.Data.Triggers/.github/workflows/build-and-deploy.yml index 783d01a1..1c2f1d6f 100644 --- a/Api.Data.Triggers/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Triggers/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_KUBERNETES_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -45,13 +42,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -74,65 +81,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Database Migration & User shell: pwsh @@ -180,7 +161,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Triggers/.kubernetes/deployment.yaml b/Api.Data.Triggers/.kubernetes/deployment.yaml index 1579cedc..a6f04b0f 100644 --- a/Api.Data.Triggers/.kubernetes/deployment.yaml +++ b/Api.Data.Triggers/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -79,6 +79,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml b/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml index 9edeb335..7b3fdaea 100644 --- a/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml +++ b/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml @@ -15,6 +15,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_GROUP_DNS: ${{ vars.AZURE_RESOURCE_GROUP_DNS }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -23,10 +24,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -43,13 +40,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -72,70 +79,45 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + $env:GATEWAY_NAME = kubectl get gateway -n apps -o jsonpath='{.items[0].metadata.name}' $zoneNames = az network dns zone list -g $env:AZURE_GROUP_DNS --query [].name; @@ -147,8 +129,6 @@ jobs: } ) -join "`n"; - $env:GATEWAY_NAME = kubectl get gateway -n apps -o jsonpath='{.items[0].metadata.name}' - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; Get-Content .kubernetes/deployment.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/deployment.tmp.yaml; diff --git a/Api.Documentation.Csp/.kubernetes/deployment.yaml b/Api.Documentation.Csp/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.Documentation.Csp/.kubernetes/deployment.yaml +++ b/Api.Documentation.Csp/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Documentation/.github/workflows/build-and-deploy.yml b/Api.Documentation/.github/workflows/build-and-deploy.yml index 58c9b8af..9ff73d4a 100644 --- a/Api.Documentation/.github/workflows/build-and-deploy.yml +++ b/Api.Documentation/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,45 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.Documentation/.kubernetes/deployment.yaml b/Api.Documentation/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.Documentation/.kubernetes/deployment.yaml +++ b/Api.Documentation/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.ErrorHandling/.github/workflows/build-and-deploy.yml b/Api.ErrorHandling/.github/workflows/build-and-deploy.yml index 387adb97..5e92bb65 100644 --- a/Api.ErrorHandling/.github/workflows/build-and-deploy.yml +++ b/Api.ErrorHandling/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: apps KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.ErrorHandling/.kubernetes/deployment.yaml b/Api.ErrorHandling/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.ErrorHandling/.kubernetes/deployment.yaml +++ b/Api.ErrorHandling/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml b/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml index 1cd5e962..b6e6d5aa 100644 --- a/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml +++ b/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.Eventing.RabbitMq/.kubernetes/deployment.yaml b/Api.Eventing.RabbitMq/.kubernetes/deployment.yaml index 284c0444..c38046ad 100644 --- a/Api.Eventing.RabbitMq/.kubernetes/deployment.yaml +++ b/Api.Eventing.RabbitMq/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -85,6 +85,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.HealthChecks/.github/workflows/build-and-deploy.yml b/Api.HealthChecks/.github/workflows/build-and-deploy.yml index 2c91d574..b796728e 100644 --- a/Api.HealthChecks/.github/workflows/build-and-deploy.yml +++ b/Api.HealthChecks/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -43,13 +40,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -72,70 +79,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.HealthChecks/.kubernetes/deployment.yaml b/Api.HealthChecks/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.HealthChecks/.kubernetes/deployment.yaml +++ b/Api.HealthChecks/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Hosting.Http/.github/workflows/build-and-deploy.yml b/Api.Hosting.Http/.github/workflows/build-and-deploy.yml index ae0246b9..9d2f8666 100644 --- a/Api.Hosting.Http/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.Http/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.Hosting.Http/.kubernetes/deployment.yaml b/Api.Hosting.Http/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.Hosting.Http/.kubernetes/deployment.yaml +++ b/Api.Hosting.Http/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Hosting.Https/.github/workflows/build-and-deploy.yml b/Api.Hosting.Https/.github/workflows/build-and-deploy.yml index c304c2cd..2ce8bd7f 100644 --- a/Api.Hosting.Https/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.Https/.github/workflows/build-and-deploy.yml @@ -16,6 +16,7 @@ env: DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DNS: ${{ vars.AZURE_RESOURCE_GROUP_DNS }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -23,10 +24,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} diff --git a/Api.Hosting.Https/.kubernetes/deployment.yaml b/Api.Hosting.Https/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.Hosting.Https/.kubernetes/deployment.yaml +++ b/Api.Hosting.Https/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml b/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml index 7df67792..b88ec1d0 100644 --- a/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.Hosting.MultipartLimits/.kubernetes/deployment.yaml b/Api.Hosting.MultipartLimits/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.Hosting.MultipartLimits/.kubernetes/deployment.yaml +++ b/Api.Hosting.MultipartLimits/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Localization/.github/workflows/build-and-deploy.yml b/Api.Localization/.github/workflows/build-and-deploy.yml index f02057b3..5d09e9f9 100644 --- a/Api.Localization/.github/workflows/build-and-deploy.yml +++ b/Api.Localization/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.Localization/.kubernetes/deployment.yaml b/Api.Localization/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.Localization/.kubernetes/deployment.yaml +++ b/Api.Localization/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml b/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml index 18718716..ae867356 100644 --- a/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.Logging.Log4Net/.kubernetes/deployment.yaml b/Api.Logging.Log4Net/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.Logging.Log4Net/.kubernetes/deployment.yaml +++ b/Api.Logging.Log4Net/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml b/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml index 9dc9234b..79aa9597 100644 --- a/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.Logging.Microsoft/.kubernetes/deployment.yaml b/Api.Logging.Microsoft/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.Logging.Microsoft/.kubernetes/deployment.yaml +++ b/Api.Logging.Microsoft/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Logging.NLog/.github/workflows/build-and-deploy.yml b/Api.Logging.NLog/.github/workflows/build-and-deploy.yml index 7ef641d7..56e3adb6 100644 --- a/Api.Logging.NLog/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.NLog/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.Logging.NLog/.kubernetes/deployment.yaml b/Api.Logging.NLog/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.Logging.NLog/.kubernetes/deployment.yaml +++ b/Api.Logging.NLog/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml b/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml index 65071acd..fd9f33b8 100644 --- a/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.Logging.Serilog/.kubernetes/deployment.yaml b/Api.Logging.Serilog/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.Logging.Serilog/.kubernetes/deployment.yaml +++ b/Api.Logging.Serilog/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.MultipartJson/.github/workflows/build-and-deploy.yml b/Api.MultipartJson/.github/workflows/build-and-deploy.yml index b9033687..53860cae 100644 --- a/Api.MultipartJson/.github/workflows/build-and-deploy.yml +++ b/Api.MultipartJson/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.MultipartJson/.kubernetes/deployment.yaml b/Api.MultipartJson/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.MultipartJson/.kubernetes/deployment.yaml +++ b/Api.MultipartJson/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml index 9dfd7f32..d1036abb 100644 --- a/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml @@ -16,6 +16,7 @@ env: DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_DNS: ${{ vars.AZURE_RESOURCE_GROUP_DNS }} AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -23,10 +24,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -43,13 +40,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -72,70 +79,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $zoneNames = az network dns zone list -g $env:AZURE_GROUP_DNS --query "[].name" -o json | ConvertFrom-Json diff --git a/Api.PolicyHeaders.ContentSecurityPolicy/.kubernetes/deployment.yaml b/Api.PolicyHeaders.ContentSecurityPolicy/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.PolicyHeaders.ContentSecurityPolicy/.kubernetes/deployment.yaml +++ b/Api.PolicyHeaders.ContentSecurityPolicy/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml index 8f02cbcc..78b18f89 100644 --- a/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.PolicyHeaders.ContentTypeOptions/.kubernetes/deployment.yaml b/Api.PolicyHeaders.ContentTypeOptions/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.PolicyHeaders.ContentTypeOptions/.kubernetes/deployment.yaml +++ b/Api.PolicyHeaders.ContentTypeOptions/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml index 9bfe18cb..9d4e8692 100644 --- a/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.PolicyHeaders.Cors/.kubernetes/deployment.yaml b/Api.PolicyHeaders.Cors/.kubernetes/deployment.yaml index bc4322a4..00eb67cf 100644 --- a/Api.PolicyHeaders.Cors/.kubernetes/deployment.yaml +++ b/Api.PolicyHeaders.Cors/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,4 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret diff --git a/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml index a03ddcc3..30c7c525 100644 --- a/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.PolicyHeaders.ForwardedHeaders/.kubernetes/deployment.yaml b/Api.PolicyHeaders.ForwardedHeaders/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.PolicyHeaders.ForwardedHeaders/.kubernetes/deployment.yaml +++ b/Api.PolicyHeaders.ForwardedHeaders/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml index 77b16747..ace23a01 100644 --- a/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.PolicyHeaders.FrameOptions/.kubernetes/deployment.yaml b/Api.PolicyHeaders.FrameOptions/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.PolicyHeaders.FrameOptions/.kubernetes/deployment.yaml +++ b/Api.PolicyHeaders.FrameOptions/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml index ec1c23cd..b17a4a74 100644 --- a/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml @@ -15,6 +15,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_GROUP_DNS: ${{ vars.AZURE_RESOURCE_GROUP_DNS }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -23,10 +24,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -43,13 +40,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -72,70 +79,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $zoneNames = az network dns zone list -g $env:AZURE_GROUP_DNS --query "[].name" -o json | ConvertFrom-Json diff --git a/Api.PolicyHeaders.Hsts/.kubernetes/deployment.yaml b/Api.PolicyHeaders.Hsts/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.PolicyHeaders.Hsts/.kubernetes/deployment.yaml +++ b/Api.PolicyHeaders.Hsts/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml index 3ce97752..a2bb1f54 100644 --- a/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.PolicyHeaders.ReferrerPolicy/.kubernetes/deployment.yaml b/Api.PolicyHeaders.ReferrerPolicy/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.PolicyHeaders.ReferrerPolicy/.kubernetes/deployment.yaml +++ b/Api.PolicyHeaders.ReferrerPolicy/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml index fd30e569..94248257 100644 --- a/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.PolicyHeaders.Robots/.kubernetes/deployment.yaml b/Api.PolicyHeaders.Robots/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.PolicyHeaders.Robots/.kubernetes/deployment.yaml +++ b/Api.PolicyHeaders.Robots/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml index bd1e34a2..d48583a5 100644 --- a/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.PolicyHeaders.XssProtection/.kubernetes/deployment.yaml b/Api.PolicyHeaders.XssProtection/.kubernetes/deployment.yaml index bc4322a4..00eb67cf 100644 --- a/Api.PolicyHeaders.XssProtection/.kubernetes/deployment.yaml +++ b/Api.PolicyHeaders.XssProtection/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,4 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret diff --git a/Api.RequestTracing/.github/workflows/build-and-deploy.yml b/Api.RequestTracing/.github/workflows/build-and-deploy.yml index 4f5a558e..2783c71d 100644 --- a/Api.RequestTracing/.github/workflows/build-and-deploy.yml +++ b/Api.RequestTracing/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.RequestTracing/.kubernetes/deployment.yaml b/Api.RequestTracing/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.RequestTracing/.kubernetes/deployment.yaml +++ b/Api.RequestTracing/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.ResponseCache/.github/workflows/build-and-deploy.yml b/Api.ResponseCache/.github/workflows/build-and-deploy.yml index cf3c74f4..c0f83fca 100644 --- a/Api.ResponseCache/.github/workflows/build-and-deploy.yml +++ b/Api.ResponseCache/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.ResponseCache/.kubernetes/deployment.yaml b/Api.ResponseCache/.kubernetes/deployment.yaml index bc4322a4..00eb67cf 100644 --- a/Api.ResponseCache/.kubernetes/deployment.yaml +++ b/Api.ResponseCache/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,4 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret diff --git a/Api.ResponseCompression/.github/workflows/build-and-deploy.yml b/Api.ResponseCompression/.github/workflows/build-and-deploy.yml index 59c7987c..cc885ef5 100644 --- a/Api.ResponseCompression/.github/workflows/build-and-deploy.yml +++ b/Api.ResponseCompression/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.ResponseCompression/.kubernetes/deployment.yaml b/Api.ResponseCompression/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.ResponseCompression/.kubernetes/deployment.yaml +++ b/Api.ResponseCompression/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.Session/.github/workflows/build-and-deploy.yml b/Api.Session/.github/workflows/build-and-deploy.yml index 52d7b63a..561886fc 100644 --- a/Api.Session/.github/workflows/build-and-deploy.yml +++ b/Api.Session/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.Session/.kubernetes/deployment.yaml b/Api.Session/.kubernetes/deployment.yaml index bc4322a4..00eb67cf 100644 --- a/Api.Session/.kubernetes/deployment.yaml +++ b/Api.Session/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,4 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret diff --git a/Api.StartupTasks/.github/workflows/build-and-deploy.yml b/Api.StartupTasks/.github/workflows/build-and-deploy.yml index ce8d2f6e..7cb48e29 100644 --- a/Api.StartupTasks/.github/workflows/build-and-deploy.yml +++ b/Api.StartupTasks/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.StartupTasks/.kubernetes/deployment.yaml b/Api.StartupTasks/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.StartupTasks/.kubernetes/deployment.yaml +++ b/Api.StartupTasks/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.StaticFiles/.github/workflows/build-and-deploy.yml b/Api.StaticFiles/.github/workflows/build-and-deploy.yml index 7c4c56ab..5c900575 100644 --- a/Api.StaticFiles/.github/workflows/build-and-deploy.yml +++ b/Api.StaticFiles/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.StaticFiles/.kubernetes/deployment.yaml b/Api.StaticFiles/.kubernetes/deployment.yaml index bc4322a4..00eb67cf 100644 --- a/Api.StaticFiles/.kubernetes/deployment.yaml +++ b/Api.StaticFiles/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,4 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret diff --git a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml index f0ba5d2d..5610dc4e 100644 --- a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -16,6 +16,7 @@ env: AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_STORAGE: ${{ vars.AZURE_STORAGE_RESOURCE_GROUP }} AZURE_GROUP_BACKUP: ${{ vars.AZURE_BACKUP_RESOURCE_GROUP }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -23,10 +24,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -42,13 +39,23 @@ env: STORAGE_SHARE_NAME: nano-storage-azure ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -71,65 +78,39 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Create Fileshare shell: pwsh @@ -174,7 +155,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/storage-pv.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/storage-pv.tmp.yaml; kubectl apply -f .kubernetes/storage-pv.tmp.yaml; diff --git a/Api.Storage.Azure/.kubernetes/deployment.yaml b/Api.Storage.Azure/.kubernetes/deployment.yaml index 642aaef3..087ef954 100644 --- a/Api.Storage.Azure/.kubernetes/deployment.yaml +++ b/Api.Storage.Azure/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -89,6 +89,4 @@ spec: claimName: %SERVICE_NAME%-azurefile-pvc - name: tmp emptyDir: {} - imagePullSecrets: - - name: ghcr-pull-secret diff --git a/Api.Storage.Local/.github/workflows/build-and-deploy.yml b/Api.Storage.Local/.github/workflows/build-and-deploy.yml index 05c06da9..6c43d5e0 100644 --- a/Api.Storage.Local/.github/workflows/build-and-deploy.yml +++ b/Api.Storage.Local/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -42,13 +39,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -71,70 +78,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/storage-storageclass.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/storage-storageclass.tmp.yaml; kubectl apply -f .kubernetes/storage-storageclass.tmp.yaml; diff --git a/Api.Storage.Local/.kubernetes/deployment.yaml b/Api.Storage.Local/.kubernetes/deployment.yaml index 9b84b2ba..0fcc7ffb 100644 --- a/Api.Storage.Local/.kubernetes/deployment.yaml +++ b/Api.Storage.Local/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -84,6 +84,3 @@ spec: claimName: %SERVICE_NAME%-pvc - name: tmp emptyDir: {} - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api.TimeZone/.github/workflows/build-and-deploy.yml b/Api.TimeZone/.github/workflows/build-and-deploy.yml index 55963326..64721095 100644 --- a/Api.TimeZone/.github/workflows/build-and-deploy.yml +++ b/Api.TimeZone/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.TimeZone/.kubernetes/deployment.yaml b/Api.TimeZone/.kubernetes/deployment.yaml index bc4322a4..00eb67cf 100644 --- a/Api.TimeZone/.kubernetes/deployment.yaml +++ b/Api.TimeZone/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,4 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret diff --git a/Api.Versioning/.github/workflows/build-and-deploy.yml b/Api.Versioning/.github/workflows/build-and-deploy.yml index 0595853e..1a5cb6f9 100644 --- a/Api.Versioning/.github/workflows/build-and-deploy.yml +++ b/Api.Versioning/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.Versioning/.kubernetes/deployment.yaml b/Api.Versioning/.kubernetes/deployment.yaml index bc4322a4..00eb67cf 100644 --- a/Api.Versioning/.kubernetes/deployment.yaml +++ b/Api.Versioning/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,4 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret diff --git a/Api.VirusScan/.github/workflows/build-and-deploy.yml b/Api.VirusScan/.github/workflows/build-and-deploy.yml index f86e9f0d..7436a871 100644 --- a/Api.VirusScan/.github/workflows/build-and-deploy.yml +++ b/Api.VirusScan/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,23 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,70 +77,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api.VirusScan/.kubernetes/deployment.yaml b/Api.VirusScan/.kubernetes/deployment.yaml index bc4322a4..9871912e 100644 --- a/Api.VirusScan/.kubernetes/deployment.yaml +++ b/Api.VirusScan/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Api._Blank/.github/workflows/build-and-deploy.yml b/Api._Blank/.github/workflows/build-and-deploy.yml index 848d3366..a5d1c8f7 100644 --- a/Api._Blank/.github/workflows/build-and-deploy.yml +++ b/Api._Blank/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -41,13 +38,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read - packages: write + contents: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,37 +76,6 @@ jobs: throw "error"; }; - - name: Publish Image - shell: pwsh - run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - name: Publish NuGet shell: pwsh run: | @@ -112,28 +87,33 @@ jobs: { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login + + - name: Build and Push Image shell: pwsh run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ + + if ($LastExitCode -ne 0) + { + throw "error"; + }; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Api._Blank/.kubernetes/deployment.yaml b/Api._Blank/.kubernetes/deployment.yaml index 7c10b6cd..085e7961 100644 --- a/Api._Blank/.kubernetes/deployment.yaml +++ b/Api._Blank/.kubernetes/deployment.yaml @@ -34,7 +34,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml b/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml index 6f72f6e0..b3ffa60b 100644 --- a/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml +++ b/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 @@ -38,13 +35,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read - packages: write + contents: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -67,58 +73,32 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Build and Push Image shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` --build-arg NUGET_HOST=$env:NUGET_HOST ` --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; + ./ if ($LastExitCode -ne 0) { throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + }; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; diff --git a/Console.CustomConfigSection/.kubernetes/cronjob.yaml b/Console.CustomConfigSection/.kubernetes/cronjob.yaml index 83bc0cce..0a1309e5 100644 --- a/Console.CustomConfigSection/.kubernetes/cronjob.yaml +++ b/Console.CustomConfigSection/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: @@ -47,5 +47,3 @@ spec: drop: - ALL restartPolicy: OnFailure - imagePullSecrets: - - name: ghcr-pull-secret \ No newline at end of file diff --git a/Console.CustomService/.github/workflows/build-and-deploy.yml b/Console.CustomService/.github/workflows/build-and-deploy.yml index 77124fb2..4ae492d1 100644 --- a/Console.CustomService/.github/workflows/build-and-deploy.yml +++ b/Console.CustomService/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 @@ -38,13 +35,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read - packages: write + contents: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -67,58 +73,32 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Build and Push Image shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` --build-arg NUGET_HOST=$env:NUGET_HOST ` --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; + ./ if ($LastExitCode -ne 0) { throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + }; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; diff --git a/Console.CustomService/.kubernetes/cronjob.yaml b/Console.CustomService/.kubernetes/cronjob.yaml index 83bc0cce..0a1309e5 100644 --- a/Console.CustomService/.kubernetes/cronjob.yaml +++ b/Console.CustomService/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: @@ -47,5 +47,3 @@ spec: drop: - ALL restartPolicy: OnFailure - imagePullSecrets: - - name: ghcr-pull-secret \ No newline at end of file diff --git a/Console.Data.InMemory/.github/workflows/build-and-deploy.yml b/Console.Data.InMemory/.github/workflows/build-and-deploy.yml index b366b0a1..be48696c 100644 --- a/Console.Data.InMemory/.github/workflows/build-and-deploy.yml +++ b/Console.Data.InMemory/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/Nano-Core/Nano.Template.Console KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 @@ -38,13 +35,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read - packages: write + contents: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -67,58 +73,32 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Build and Push Image shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` --build-arg NUGET_HOST=$env:NUGET_HOST ` --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; + ./ if ($LastExitCode -ne 0) { throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + }; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; diff --git a/Console.Data.InMemory/.kubernetes/cronjob.yaml b/Console.Data.InMemory/.kubernetes/cronjob.yaml index 5300eb6c..0a1309e5 100644 --- a/Console.Data.InMemory/.kubernetes/cronjob.yaml +++ b/Console.Data.InMemory/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: @@ -47,5 +47,3 @@ spec: drop: - ALL restartPolicy: OnFailure - imagePullSecrets: - - name: ghcr-pull-secret diff --git a/Console.Data.MySql/.github/workflows/build-and-deploy.yml b/Console.Data.MySql/.github/workflows/build-and-deploy.yml index 9008120f..59511a0d 100644 --- a/Console.Data.MySql/.github/workflows/build-and-deploy.yml +++ b/Console.Data.MySql/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/Nano-Core/Nano.Template.Console KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 @@ -42,13 +39,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read - packages: write + contents: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -71,54 +77,28 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Build and Push Image shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` --build-arg NUGET_HOST=$env:NUGET_HOST ` --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; + ./ if ($LastExitCode -ne 0) { throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + }; - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Database Migration & User shell: pwsh run: | @@ -165,7 +145,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/sql-auth-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/sql-auth-secret.tmp.yaml; diff --git a/Console.Data.MySql/.kubernetes/cronjob.yaml b/Console.Data.MySql/.kubernetes/cronjob.yaml index c6710b9b..351be7a8 100644 --- a/Console.Data.MySql/.kubernetes/cronjob.yaml +++ b/Console.Data.MySql/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% imagePullPolicy: Always env: - name: Data__ConnectionString @@ -53,5 +53,3 @@ spec: drop: - ALL restartPolicy: OnFailure - imagePullSecrets: - - name: ghcr-pull-secret diff --git a/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml b/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml index 5511c577..7501ccb5 100644 --- a/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml +++ b/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/Nano-Core/Nano.Template.Console KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 @@ -42,13 +39,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read - packages: write + contents: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -71,53 +77,27 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Build and Push Image shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` --build-arg NUGET_HOST=$env:NUGET_HOST ` --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; + ./ if ($LastExitCode -ne 0) { throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + }; - name: Database Migration & User shell: pwsh @@ -170,7 +150,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Console.Data.PostgreSQL/.kubernetes/cronjob.yaml b/Console.Data.PostgreSQL/.kubernetes/cronjob.yaml index c6710b9b..351be7a8 100644 --- a/Console.Data.PostgreSQL/.kubernetes/cronjob.yaml +++ b/Console.Data.PostgreSQL/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% imagePullPolicy: Always env: - name: Data__ConnectionString @@ -53,5 +53,3 @@ spec: drop: - ALL restartPolicy: OnFailure - imagePullSecrets: - - name: ghcr-pull-secret diff --git a/Console.Data.SqLite/.github/workflows/build-and-deploy.yml b/Console.Data.SqLite/.github/workflows/build-and-deploy.yml index 95df4311..e57ad5d8 100644 --- a/Console.Data.SqLite/.github/workflows/build-and-deploy.yml +++ b/Console.Data.SqLite/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/Nano-Core/Nano.Template.Console KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 @@ -41,13 +38,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read - packages: write + contents: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -70,53 +76,27 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Build and Push Image shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` --build-arg NUGET_HOST=$env:NUGET_HOST ` --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; + ./ if ($LastExitCode -ne 0) { throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + }; - name: Database Migration shell: pwsh @@ -134,7 +114,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/data-storageclass.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/data-storageclass.tmp.yaml; kubectl apply -f .kubernetes/data-storageclass.tmp.yaml; diff --git a/Console.Data.SqLite/.kubernetes/cronjob.yaml b/Console.Data.SqLite/.kubernetes/cronjob.yaml index 53bb5333..0bc46aa1 100644 --- a/Console.Data.SqLite/.kubernetes/cronjob.yaml +++ b/Console.Data.SqLite/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: @@ -54,5 +54,3 @@ spec: persistentVolumeClaim: claimName: %SERVICE_NAME%-pvc restartPolicy: OnFailure - imagePullSecrets: - - name: ghcr-pull-secret diff --git a/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml b/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml index f6c9fdd1..d0756022 100644 --- a/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml +++ b/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 @@ -42,13 +39,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read - packages: write + contents: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -71,53 +77,27 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Build and Push Image shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` --build-arg NUGET_HOST=$env:NUGET_HOST ` --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; + ./ if ($LastExitCode -ne 0) { throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + }; - name: Database Migration & User shell: pwsh @@ -181,7 +161,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST,$env:SQL_PORT;Database=$env:SQL_NAME;User Id=$env:SQL_USER;Password=$env:SQL_PASSWORD;Encrypt=True;TrustServerCertificate=True;"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Console.Data.SqlServer/.kubernetes/cronjob.yaml b/Console.Data.SqlServer/.kubernetes/cronjob.yaml index c6710b9b..351be7a8 100644 --- a/Console.Data.SqlServer/.kubernetes/cronjob.yaml +++ b/Console.Data.SqlServer/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% imagePullPolicy: Always env: - name: Data__ConnectionString @@ -53,5 +53,3 @@ spec: drop: - ALL restartPolicy: OnFailure - imagePullSecrets: - - name: ghcr-pull-secret diff --git a/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml b/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml index d7d6b216..b9716c16 100644 --- a/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml +++ b/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 @@ -38,13 +35,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read - packages: write + contents: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -67,58 +73,32 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Build and Push Image shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` --build-arg NUGET_HOST=$env:NUGET_HOST ` --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; + ./ if ($LastExitCode -ne 0) { throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + }; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; diff --git a/Console.Eventing.RabbitMq/.kubernetes/cronjob.yaml b/Console.Eventing.RabbitMq/.kubernetes/cronjob.yaml index f0e901cb..606ce554 100644 --- a/Console.Eventing.RabbitMq/.kubernetes/cronjob.yaml +++ b/Console.Eventing.RabbitMq/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% imagePullPolicy: Always env: - name: Eventing__Credentials__Id @@ -58,5 +58,3 @@ spec: drop: - ALL restartPolicy: OnFailure - imagePullSecrets: - - name: ghcr-pull-secret diff --git a/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml b/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml index b7b01951..bbde45fe 100644 --- a/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml +++ b/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -21,9 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 @@ -37,13 +35,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read - packages: write + contents: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -66,58 +73,32 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Build and Push Image shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` --build-arg NUGET_HOST=$env:NUGET_HOST ` --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; + ./ if ($LastExitCode -ne 0) { throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + }; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; diff --git a/Console.ExceptionHandling/.kubernetes/cronjob.yaml b/Console.ExceptionHandling/.kubernetes/cronjob.yaml index 83bc0cce..0a1309e5 100644 --- a/Console.ExceptionHandling/.kubernetes/cronjob.yaml +++ b/Console.ExceptionHandling/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: @@ -47,5 +47,3 @@ spec: drop: - ALL restartPolicy: OnFailure - imagePullSecrets: - - name: ghcr-pull-secret \ No newline at end of file diff --git a/Console.Localization/.github/workflows/build-and-deploy.yml b/Console.Localization/.github/workflows/build-and-deploy.yml index ce210d21..39b17ca1 100644 --- a/Console.Localization/.github/workflows/build-and-deploy.yml +++ b/Console.Localization/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 @@ -38,13 +35,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read - packages: write + contents: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -67,58 +73,32 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Build and Push Image shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` --build-arg NUGET_HOST=$env:NUGET_HOST ` --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; + ./ if ($LastExitCode -ne 0) { throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + }; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; diff --git a/Console.Localization/.kubernetes/cronjob.yaml b/Console.Localization/.kubernetes/cronjob.yaml index 83bc0cce..0a1309e5 100644 --- a/Console.Localization/.kubernetes/cronjob.yaml +++ b/Console.Localization/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: @@ -47,5 +47,3 @@ spec: drop: - ALL restartPolicy: OnFailure - imagePullSecrets: - - name: ghcr-pull-secret \ No newline at end of file diff --git a/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml b/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml index 6aa41a98..98419cf6 100644 --- a/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 @@ -38,13 +35,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read - packages: write + contents: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -67,58 +73,32 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Build and Push Image shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` --build-arg NUGET_HOST=$env:NUGET_HOST ` --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; + ./ if ($LastExitCode -ne 0) { throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + }; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; diff --git a/Console.Logging.Log4Net/.kubernetes/cronjob.yaml b/Console.Logging.Log4Net/.kubernetes/cronjob.yaml index 83bc0cce..0a1309e5 100644 --- a/Console.Logging.Log4Net/.kubernetes/cronjob.yaml +++ b/Console.Logging.Log4Net/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: @@ -47,5 +47,3 @@ spec: drop: - ALL restartPolicy: OnFailure - imagePullSecrets: - - name: ghcr-pull-secret \ No newline at end of file diff --git a/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml b/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml index 9f8e3c7b..bea31620 100644 --- a/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 @@ -38,13 +35,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read - packages: write + contents: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -67,58 +73,32 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Build and Push Image shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` --build-arg NUGET_HOST=$env:NUGET_HOST ` --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; + ./ if ($LastExitCode -ne 0) { throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + }; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; diff --git a/Console.Logging.Microsoft/.kubernetes/cronjob.yaml b/Console.Logging.Microsoft/.kubernetes/cronjob.yaml index 83bc0cce..0a1309e5 100644 --- a/Console.Logging.Microsoft/.kubernetes/cronjob.yaml +++ b/Console.Logging.Microsoft/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: @@ -47,5 +47,3 @@ spec: drop: - ALL restartPolicy: OnFailure - imagePullSecrets: - - name: ghcr-pull-secret \ No newline at end of file diff --git a/Console.Logging.NLog/.github/workflows/build-and-deploy.yml b/Console.Logging.NLog/.github/workflows/build-and-deploy.yml index 2ca1bd17..20890041 100644 --- a/Console.Logging.NLog/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.NLog/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 @@ -38,13 +35,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read - packages: write + contents: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -67,58 +73,32 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Build and Push Image shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` --build-arg NUGET_HOST=$env:NUGET_HOST ` --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; + ./ if ($LastExitCode -ne 0) { throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + }; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; diff --git a/Console.Logging.NLog/.kubernetes/cronjob.yaml b/Console.Logging.NLog/.kubernetes/cronjob.yaml index 83bc0cce..0a1309e5 100644 --- a/Console.Logging.NLog/.kubernetes/cronjob.yaml +++ b/Console.Logging.NLog/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: @@ -47,5 +47,3 @@ spec: drop: - ALL restartPolicy: OnFailure - imagePullSecrets: - - name: ghcr-pull-secret \ No newline at end of file diff --git a/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml b/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml index d8e8b268..2554c77b 100644 --- a/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 @@ -38,13 +35,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read - packages: write + contents: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -67,58 +73,32 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Build and Push Image shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` --build-arg NUGET_HOST=$env:NUGET_HOST ` --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; + ./ if ($LastExitCode -ne 0) { throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + }; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; diff --git a/Console.Logging.Serilog/.kubernetes/cronjob.yaml b/Console.Logging.Serilog/.kubernetes/cronjob.yaml index 83bc0cce..0a1309e5 100644 --- a/Console.Logging.Serilog/.kubernetes/cronjob.yaml +++ b/Console.Logging.Serilog/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: @@ -47,5 +47,3 @@ spec: drop: - ALL restartPolicy: OnFailure - imagePullSecrets: - - name: ghcr-pull-secret \ No newline at end of file diff --git a/Console.StartupTasks/.github/workflows/build-and-deploy.yml b/Console.StartupTasks/.github/workflows/build-and-deploy.yml index 6235e622..f28ad021 100644 --- a/Console.StartupTasks/.github/workflows/build-and-deploy.yml +++ b/Console.StartupTasks/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 @@ -38,13 +35,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read - packages: write + contents: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -67,58 +73,32 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Build and Push Image shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` --build-arg NUGET_HOST=$env:NUGET_HOST ` --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; + ./ if ($LastExitCode -ne 0) { throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + }; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; diff --git a/Console.StartupTasks/.kubernetes/cronjob.yaml b/Console.StartupTasks/.kubernetes/cronjob.yaml index 83bc0cce..0a1309e5 100644 --- a/Console.StartupTasks/.kubernetes/cronjob.yaml +++ b/Console.StartupTasks/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: @@ -47,5 +47,3 @@ spec: drop: - ALL restartPolicy: OnFailure - imagePullSecrets: - - name: ghcr-pull-secret \ No newline at end of file diff --git a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml index 7186eded..6491bcf3 100644 --- a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -16,6 +16,7 @@ env: AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_STORAGE: ${{ vars.AZURE_RESOURCE_GROUP_STORAGE }} AZURE_GROUP_BACKUP: ${{ vars.AZURE_RESOURCE_GROUP_BACKUP }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -23,10 +24,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 @@ -42,13 +39,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read - packages: write + contents: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -71,53 +77,27 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Build and Push Image shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` --build-arg NUGET_HOST=$env:NUGET_HOST ` --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; + ./ if ($LastExitCode -ne 0) { throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + }; - name: Create Fileshare shell: pwsh @@ -162,7 +142,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/storage-pv.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/storage-pv.tmp.yaml; kubectl apply -f .kubernetes/storage-pv.tmp.yaml; diff --git a/Console.Storage.Azure/.kubernetes/cronjob.yaml b/Console.Storage.Azure/.kubernetes/cronjob.yaml index 1187e8a5..f858acb4 100644 --- a/Console.Storage.Azure/.kubernetes/cronjob.yaml +++ b/Console.Storage.Azure/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: @@ -58,7 +58,5 @@ spec: claimName: %SERVICE_NAME%-azurefile-pvc - name: tmp emptyDir: {} - imagePullSecrets: - - name: ghcr-pull-secret diff --git a/Console.Storage.Local/.github/workflows/build-and-deploy.yml b/Console.Storage.Local/.github/workflows/build-and-deploy.yml index 2f3e51d6..3e3e7f72 100644 --- a/Console.Storage.Local/.github/workflows/build-and-deploy.yml +++ b/Console.Storage.Local/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 @@ -40,13 +37,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read - packages: write + contents: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -69,58 +75,32 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Build and Push Image shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` --build-arg NUGET_HOST=$env:NUGET_HOST ` --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; + ./ if ($LastExitCode -ne 0) { throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + }; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/storage-storageclass.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/storage-storageclass.tmp.yaml; kubectl apply -f .kubernetes/storage-storageclass.tmp.yaml; diff --git a/Console.Storage.Local/.kubernetes/cronjob.yaml b/Console.Storage.Local/.kubernetes/cronjob.yaml index ccff35ee..f79adc21 100644 --- a/Console.Storage.Local/.kubernetes/cronjob.yaml +++ b/Console.Storage.Local/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: @@ -57,7 +57,4 @@ spec: emptyDir: {} - name: tmp emptyDir: {} - imagePullSecrets: - - name: ghcr-pull-secret - diff --git a/Console.Workers/.github/workflows/build-and-deploy.yml b/Console.Workers/.github/workflows/build-and-deploy.yml index 551a9df0..277d38c3 100644 --- a/Console.Workers/.github/workflows/build-and-deploy.yml +++ b/Console.Workers/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 @@ -38,13 +35,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read - packages: write + contents: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -67,58 +73,32 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Build and Push Image shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` --build-arg NUGET_HOST=$env:NUGET_HOST ` --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; + ./ if ($LastExitCode -ne 0) { throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + }; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; diff --git a/Console.Workers/.kubernetes/cronjob.yaml b/Console.Workers/.kubernetes/cronjob.yaml index f5bc52ed..c9cff5b8 100644 --- a/Console.Workers/.kubernetes/cronjob.yaml +++ b/Console.Workers/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: @@ -47,7 +47,5 @@ spec: drop: - ALL restartPolicy: OnFailure - imagePullSecrets: - - name: ghcr-pull-secret diff --git a/Console._Blank/.github/workflows/build-and-deploy.yml b/Console._Blank/.github/workflows/build-and-deploy.yml index e5f52961..8dbe5940 100644 --- a/Console._Blank/.github/workflows/build-and-deploy.yml +++ b/Console._Blank/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_HISTORY_COUNT: 4 @@ -38,13 +35,22 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} permissions: - contents: read - packages: write + contents: write steps: - - uses: actions/checkout@v6 + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Build shell: pwsh @@ -67,58 +73,32 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Build and Push Image shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` --build-arg NUGET_HOST=$env:NUGET_HOST ` --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; + ./ if ($LastExitCode -ne 0) { throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + }; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; diff --git a/Console._Blank/.kubernetes/cronjob.yaml b/Console._Blank/.kubernetes/cronjob.yaml index 5300eb6c..0a1309e5 100644 --- a/Console._Blank/.kubernetes/cronjob.yaml +++ b/Console._Blank/.kubernetes/cronjob.yaml @@ -24,7 +24,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% imagePullPolicy: Always envFrom: - configMapRef: @@ -47,5 +47,3 @@ spec: drop: - ALL restartPolicy: OnFailure - imagePullSecrets: - - name: ghcr-pull-secret diff --git a/Web._Blank/.github/workflows/build-and-deploy.yml b/Web._Blank/.github/workflows/build-and-deploy.yml index 68cf918d..29c99dc0 100644 --- a/Web._Blank/.github/workflows/build-and-deploy.yml +++ b/Web._Blank/.github/workflows/build-and-deploy.yml @@ -14,6 +14,7 @@ env: DOTNET_SDK_VERSION: 10.0 DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -21,10 +22,6 @@ env: NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_HOST: ghcr.io - CONTAINER_REGISTRY_USERNAME: ${{ github.actor }} - CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - CONTAINER_REGISTRY_SOURCE_LABEL: https://github.com/${{ github.repository }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} @@ -49,13 +46,7 @@ jobs: permissions: contents: write packages: write - id-token: write - concurrency: - group: ${{ github.repository }} - cancel-in-progress: true steps: - - uses: actions/checkout@v6 - - name: Azure Login shell: pwsh run: | @@ -80,48 +71,41 @@ jobs: shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - - name: Publish NuGet + - name: Build and Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ + if ($LastExitCode -ne 0) { throw "error"; @@ -130,7 +114,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; diff --git a/Web._Blank/.kubernetes/deployment.yaml b/Web._Blank/.kubernetes/deployment.yaml index bc4322a4..00eb67cf 100644 --- a/Web._Blank/.kubernetes/deployment.yaml +++ b/Web._Blank/.kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: kubernetes.io/os: linux containers: - name: %SERVICE_NAME% - image: %FULL_IMAGE_NAME%:%VERSION% + image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% ports: - containerPort: 8080 imagePullPolicy: Always @@ -73,6 +73,4 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - imagePullSecrets: - - name: ghcr-pull-secret From f1738c67dd94fdd9f71cc435b81a76f55d009837 Mon Sep 17 00:00:00 2001 From: vivet Date: Thu, 25 Jun 2026 14:49:22 +0200 Subject: [PATCH 05/33] Updated --- .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 20 +++++++------- .../.github/workflows/build-and-deploy.yml | 20 +++++++------- .../.github/workflows/build-and-deploy.yml | 20 +++++++------- .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 20 +++++++------- .../.github/workflows/build-and-deploy.yml | 20 +++++++------- .../.github/workflows/build-and-deploy.yml | 26 +++++++++---------- .../.github/workflows/build-and-deploy.yml | 24 ++++++++--------- .../.github/workflows/build-and-deploy.yml | 24 ++++++++--------- .../.github/workflows/build-and-deploy.yml | 20 +++++++------- .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 20 +++++++------- .../.github/workflows/build-and-deploy.yml | 20 +++++++------- .../.github/workflows/build-and-deploy.yml | 20 +++++++------- .../.github/workflows/build-and-deploy.yml | 20 +++++++------- .../.github/workflows/build-and-deploy.yml | 20 +++++++------- .../.github/workflows/build-and-deploy.yml | 20 +++++++------- .../.github/workflows/build-and-deploy.yml | 20 +++++++------- .../.github/workflows/build-and-deploy.yml | 20 +++++++------- .../.github/workflows/build-and-deploy.yml | 20 +++++++------- .../.github/workflows/build-and-deploy.yml | 20 +++++++------- .../.github/workflows/build-and-deploy.yml | 20 +++++++------- .../.github/workflows/build-and-deploy.yml | 20 +++++++------- .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 24 ++++++++--------- .../.github/workflows/build-and-deploy.yml | 24 ++++++++--------- .../.github/workflows/build-and-deploy.yml | 20 +++++++------- .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 18 ++++++------- .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 12 ++++----- .../.github/workflows/build-and-deploy.yml | 12 ++++----- .../.github/workflows/build-and-deploy.yml | 12 ++++----- .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 16 ++++++------ .../.github/workflows/build-and-deploy.yml | 12 ++++----- .../.github/workflows/build-and-deploy.yml | 20 +++++++------- .../.github/workflows/build-and-deploy.yml | 12 ++++----- .../.github/workflows/build-and-deploy.yml | 12 ++++----- .../.github/workflows/build-and-deploy.yml | 12 ++++----- .../.github/workflows/build-and-deploy.yml | 12 ++++----- .../.github/workflows/build-and-deploy.yml | 12 ++++----- .../.github/workflows/build-and-deploy.yml | 12 ++++----- .../.github/workflows/build-and-deploy.yml | 12 ++++----- .../.github/workflows/build-and-deploy.yml | 12 ++++----- .../.github/workflows/build-and-deploy.yml | 12 ++++----- .../.github/workflows/build-and-deploy.yml | 12 ++++----- .../.github/workflows/build-and-deploy.yml | 12 ++++----- .../.github/workflows/build-and-deploy.yml | 12 ++++----- .../.github/workflows/build-and-deploy.yml | 16 ++++++------ 89 files changed, 742 insertions(+), 742 deletions(-) diff --git a/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml b/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml index 9be3ea91..f2676db2 100644 --- a/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.ApiClients.Audit IMAGE_NAME: api.apiclients.audit @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml b/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml index 74e9df07..54c62ccf 100644 --- a/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.ApiClients.Entity IMAGE_NAME: api.apiclients.entity @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml b/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml index 77ac619f..bd9cb4c9 100644 --- a/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.ApiClients.RootLogIn IMAGE_NAME: api.apiclients.rootlogin @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.ApiClients/.github/workflows/build-and-deploy.yml b/Api.ApiClients/.github/workflows/build-and-deploy.yml index 88643fb2..bd15c78c 100644 --- a/Api.ApiClients/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.ApiClients IMAGE_NAME: api.apiclients @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml b/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml index 52323b39..8d78e84f 100644 --- a/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml +++ b/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Auth.External.Custom IMAGE_NAME: api.auth.external.custom @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,9 +33,9 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - AUTH_JWT_PUBLIC_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PUBLIC_KEY || secrets.STAGING_AUTH_JWT_PUBLIC_KEY }} - AUTH_JWT_PRIVATE_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PRIVATE_KEY || secrets.STAGING_AUTH_JWT_PRIVATE_KEY }} - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + AUTH_JWT_PUBLIC_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AUTH_JWT_PUBLIC_KEY || secrets.STAGING_AUTH_JWT_PUBLIC_KEY }} + AUTH_JWT_PRIVATE_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AUTH_JWT_PRIVATE_KEY || secrets.STAGING_AUTH_JWT_PRIVATE_KEY }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -44,7 +44,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -154,7 +154,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml b/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml index f9bc4d11..58c161d8 100644 --- a/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml +++ b/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Auth.RootLogin IMAGE_NAME: api.auth.rootlogin @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,9 +33,9 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - AUTH_JWT_PUBLIC_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PUBLIC_KEY || secrets.STAGING_AUTH_JWT_PUBLIC_KEY }} - AUTH_JWT_PRIVATE_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PRIVATE_KEY || secrets.STAGING_AUTH_JWT_PRIVATE_KEY }} - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + AUTH_JWT_PUBLIC_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AUTH_JWT_PUBLIC_KEY || secrets.STAGING_AUTH_JWT_PUBLIC_KEY }} + AUTH_JWT_PRIVATE_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AUTH_JWT_PRIVATE_KEY || secrets.STAGING_AUTH_JWT_PRIVATE_KEY }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -44,7 +44,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -154,7 +154,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Authorization/.github/workflows/build-and-deploy.yml b/Api.Authorization/.github/workflows/build-and-deploy.yml index 9fc17a3f..372e7bc6 100644 --- a/Api.Authorization/.github/workflows/build-and-deploy.yml +++ b/Api.Authorization/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Authorization IMAGE_NAME: api.authorization @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,9 +33,9 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - AUTH_JWT_PUBLIC_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PUBLIC_KEY || secrets.STAGING_AUTH_JWT_PUBLIC_KEY }} - AUTH_JWT_PRIVATE_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PRIVATE_KEY || secrets.STAGING_AUTH_JWT_PRIVATE_KEY }} - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + AUTH_JWT_PUBLIC_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AUTH_JWT_PUBLIC_KEY || secrets.STAGING_AUTH_JWT_PUBLIC_KEY }} + AUTH_JWT_PRIVATE_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AUTH_JWT_PRIVATE_KEY || secrets.STAGING_AUTH_JWT_PRIVATE_KEY }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -44,7 +44,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -154,7 +154,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml b/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml index 4d263e57..258abdb2 100644 --- a/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml +++ b/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.ContentNegotiation IMAGE_NAME: api.contentnegotiation @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Cookies/.github/workflows/build-and-deploy.yml b/Api.Cookies/.github/workflows/build-and-deploy.yml index fda76d41..9c844ea2 100644 --- a/Api.Cookies/.github/workflows/build-and-deploy.yml +++ b/Api.Cookies/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Cookies IMAGE_NAME: api.cookies @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml b/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml index 4426b3bd..3afc26ca 100644 --- a/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml +++ b/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.CustomConfigSection IMAGE_NAME: api.customconfigsection @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml b/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml index be326bf6..e07ae89a 100644 --- a/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml +++ b/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.CustomMiddleware IMAGE_NAME: api.custommiddleware @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.CustomService/.github/workflows/build-and-deploy.yml b/Api.CustomService/.github/workflows/build-and-deploy.yml index 84641eff..04dbf7c4 100644 --- a/Api.CustomService/.github/workflows/build-and-deploy.yml +++ b/Api.CustomService/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.CustomService IMAGE_NAME: api.customservice @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.Audit/.github/workflows/build-and-deploy.yml b/Api.Data.Audit/.github/workflows/build-and-deploy.yml index f555af81..77ede391 100644 --- a/Api.Data.Audit/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Audit/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.Audit IMAGE_NAME: api.data.audit @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,11 +33,11 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_USER: api-data-mysql-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -46,7 +46,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -200,7 +200,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml b/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml index 5f253b98..f3ade48d 100644 --- a/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml +++ b/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.EntityEvents IMAGE_NAME: api.data.entityevents @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,11 +33,11 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_USER: api-data-mysql-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -46,7 +46,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -200,7 +200,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml index e5d7412f..207597e4 100644 --- a/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.Identity.Auth.ApiKey IMAGE_NAME: api.data.identity.auth.apikey @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -35,12 +35,12 @@ env: KUBERNETES_CPU_SCALING: 180 SQL_NAME: nanoDb SQL_USER: api-data-mysql-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} - AUTH_JWT_PUBLIC_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PUBLIC_KEY || secrets.STAGING_AUTH_JWT_PUBLIC_KEY }} - AUTH_JWT_PRIVATE_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PRIVATE_KEY || secrets.STAGING_AUTH_JWT_PRIVATE_KEY }} - AUTH_API_KEY_SECRET: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_API_KEY_SECRET || secrets.STAGING_AUTH_API_KEY_SECRET }} - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + AUTH_JWT_PUBLIC_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AUTH_JWT_PUBLIC_KEY || secrets.STAGING_AUTH_JWT_PUBLIC_KEY }} + AUTH_JWT_PRIVATE_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AUTH_JWT_PRIVATE_KEY || secrets.STAGING_AUTH_JWT_PRIVATE_KEY }} + AUTH_API_KEY_SECRET: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AUTH_API_KEY_SECRET || secrets.STAGING_AUTH_API_KEY_SECRET }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -49,7 +49,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -217,7 +217,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml index eb639a60..e924e09a 100644 --- a/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.Identity.Auth.External.Custom IMAGE_NAME: api.data.identity.auth.external.custom @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -35,11 +35,11 @@ env: KUBERNETES_CPU_SCALING: 180 SQL_NAME: nanoDb SQL_USER: api-data-mysql-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} - AUTH_JWT_PUBLIC_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PUBLIC_KEY || secrets.STAGING_AUTH_JWT_PUBLIC_KEY }} - AUTH_JWT_PRIVATE_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PRIVATE_KEY || secrets.STAGING_AUTH_JWT_PRIVATE_KEY }} - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + AUTH_JWT_PUBLIC_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AUTH_JWT_PUBLIC_KEY || secrets.STAGING_AUTH_JWT_PUBLIC_KEY }} + AUTH_JWT_PRIVATE_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AUTH_JWT_PRIVATE_KEY || secrets.STAGING_AUTH_JWT_PRIVATE_KEY }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -48,7 +48,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -209,7 +209,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml index db8d8fec..d463834c 100644 --- a/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.Identity.Auth.Jwt IMAGE_NAME: api.data.identity.auth.jwt @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -35,11 +35,11 @@ env: KUBERNETES_CPU_SCALING: 180 SQL_NAME: nanoDb SQL_USER: api-data-mysql-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} - AUTH_JWT_PUBLIC_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PUBLIC_KEY || secrets.STAGING_AUTH_JWT_PUBLIC_KEY }} - AUTH_JWT_PRIVATE_KEY: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AUTH_JWT_PRIVATE_KEY || secrets.STAGING_AUTH_JWT_PRIVATE_KEY }} - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + AUTH_JWT_PUBLIC_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AUTH_JWT_PUBLIC_KEY || secrets.STAGING_AUTH_JWT_PUBLIC_KEY }} + AUTH_JWT_PRIVATE_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AUTH_JWT_PRIVATE_KEY || secrets.STAGING_AUTH_JWT_PRIVATE_KEY }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -48,7 +48,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -209,7 +209,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.Identity/.github/workflows/build-and-deploy.yml b/Api.Data.Identity/.github/workflows/build-and-deploy.yml index 5ab11ee3..cd5ce5e1 100644 --- a/Api.Data.Identity/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.Identity IMAGE_NAME: api.data.identity @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,11 +33,11 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_USER: api-data-mysql-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -46,7 +46,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -200,7 +200,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.InMemory/.github/workflows/build-and-deploy.yml b/Api.Data.InMemory/.github/workflows/build-and-deploy.yml index 14191c8d..69012394 100644 --- a/Api.Data.InMemory/.github/workflows/build-and-deploy.yml +++ b/Api.Data.InMemory/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.InMemory IMAGE_NAME: api.data.inmemory @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml b/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml index b4740ce7..9df626cd 100644 --- a/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml +++ b/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.LazyLoading IMAGE_NAME: api.data.lazyloading @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,11 +33,11 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_USER: api-data-mysql-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -46,7 +46,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -200,7 +200,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml index bc513b16..cda38f3a 100644 --- a/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.MySql.Collation IMAGE_NAME: api.data.mysql.collation @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,17 +33,17 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_USER: api-data-mysql-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} jobs: build-and-deploy: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -197,7 +197,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml index 417bef7e..6e789d0d 100644 --- a/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.MySql.Mappings IMAGE_NAME: api.data.mysql.mappings @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,11 +33,11 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_USER: api-data-mysql-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -46,7 +46,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -200,7 +200,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml index 77d2b35b..deafd2c8 100644 --- a/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.MySql.Spatial IMAGE_NAME: api.data.mysql.spatial @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,11 +33,11 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_USER: api-data-mysql-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -46,7 +46,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -200,7 +200,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml index c1723266..3ef26334 100644 --- a/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.MySql.StoredProcedures IMAGE_NAME: api.data.mysql.storedprocedures @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,11 +33,11 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_USER: api-data-mysql-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -46,7 +46,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -200,7 +200,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml index 5b45ccc4..d77c7908 100644 --- a/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.MySql.Views IMAGE_NAME: api.data.mysql.views @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,11 +33,11 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_USER: api-data-mysql-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -46,7 +46,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -200,7 +200,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.MySql/.github/workflows/build-and-deploy.yml b/Api.Data.MySql/.github/workflows/build-and-deploy.yml index 0eae5e02..0e8d40f0 100644 --- a/Api.Data.MySql/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.MySql IMAGE_NAME: api.data.mysql @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,11 +33,11 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_USER: api-data-mysql-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -46,7 +46,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -200,7 +200,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml index c493b03d..2a90579d 100644 --- a/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.PostgreSQL.Spatial IMAGE_NAME: api.data.postgresql.spatial @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,11 +33,11 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_USER: api-data-postgres-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -46,7 +46,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -208,7 +208,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml b/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml index 27580d47..7bd689b4 100644 --- a/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml +++ b/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.PostgreSQL IMAGE_NAME: api.data.postgresql @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,11 +33,11 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_USER: api-data-postgres-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -46,7 +46,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -208,7 +208,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml b/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml index cf19e989..7ebe95c8 100644 --- a/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.Repository.AutoSave IMAGE_NAME: api.data.repository.autosave @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,11 +33,11 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_USER: api-data-mysql-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -46,7 +46,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -200,7 +200,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml b/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml index fbe93a1f..b4d88957 100644 --- a/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.Repository.Includes IMAGE_NAME: api.data.repository.includes @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,11 +33,11 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_USER: api-data-mysql-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -46,7 +46,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -200,7 +200,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml b/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml index 61f9de28..cee0c804 100644 --- a/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.SoftDelete IMAGE_NAME: api.data.softdelete @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,11 +33,11 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_USER: api-data-mysql-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -46,7 +46,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -200,7 +200,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.SqLite/.github/workflows/build-and-deploy.yml b/Api.Data.SqLite/.github/workflows/build-and-deploy.yml index 68e219ab..b079faaf 100644 --- a/Api.Data.SqLite/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SqLite/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.SqLite IMAGE_NAME: api.data.sqlite @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_SIZE: 10Gi SQL_MIGRATION_CONNECTIONSTRING: "Data Source=/mnt/data/{{ env.SQL_NAME }}.sqlite" @@ -45,7 +45,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -175,7 +175,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml index 36a24e44..410a75a8 100644 --- a/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.SqlServer.Spatial IMAGE_NAME: api.data.sqlserver.spatial @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,11 +33,11 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_USER: api-data-sqlserver-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -46,7 +46,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -140,7 +140,7 @@ jobs: -S "$env:SQL_HOST,$env:SQL_PORT" ` -U $env:SQL_ADMIN_USER ` -P $env:SQL_ADMIN_PASSWORD ` - -d master ` + -d main ` -h -1 ` -Q "SET NOCOUNT ON; SELECT COUNT(*) FROM sys.server_principals WHERE name = '$env:SQL_USER';" @@ -150,7 +150,7 @@ jobs: -S "$env:SQL_HOST,$env:SQL_PORT" ` -U $env:SQL_ADMIN_USER ` -P $env:SQL_ADMIN_PASSWORD ` - -d master ` + -d main ` -Q "CREATE LOGIN [$env:SQL_USER] WITH PASSWORD = '$env:SQL_PASSWORD';" }; @@ -219,7 +219,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml b/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml index b5928536..62894a39 100644 --- a/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.SqlServer IMAGE_NAME: api.data.sqlserver @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,11 +33,11 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_USER: api-data-sqlserver-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -46,7 +46,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -140,7 +140,7 @@ jobs: -S "$env:SQL_HOST,$env:SQL_PORT" ` -U $env:SQL_ADMIN_USER ` -P $env:SQL_ADMIN_PASSWORD ` - -d master ` + -d main ` -h -1 ` -Q "SET NOCOUNT ON; SELECT COUNT(*) FROM sys.server_principals WHERE name = '$env:SQL_USER';" @@ -150,7 +150,7 @@ jobs: -S "$env:SQL_HOST,$env:SQL_PORT" ` -U $env:SQL_ADMIN_USER ` -P $env:SQL_ADMIN_PASSWORD ` - -d master ` + -d main ` -Q "CREATE LOGIN [$env:SQL_USER] WITH PASSWORD = '$env:SQL_PASSWORD';" }; @@ -219,7 +219,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Data.Triggers/.github/workflows/build-and-deploy.yml b/Api.Data.Triggers/.github/workflows/build-and-deploy.yml index 1c2f1d6f..8d0ef285 100644 --- a/Api.Data.Triggers/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Triggers/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Data.Triggers IMAGE_NAME: api.data.triggers @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,11 +33,11 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_USER: api-data-mysql-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -46,7 +46,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -200,7 +200,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml b/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml index 7b3fdaea..cc190352 100644 --- a/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml +++ b/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Documentation.Csp IMAGE_NAME: api.documentation.csp @@ -20,14 +20,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -35,7 +35,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -44,7 +44,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -161,7 +161,7 @@ jobs: } - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Documentation/.github/workflows/build-and-deploy.yml b/Api.Documentation/.github/workflows/build-and-deploy.yml index 9ff73d4a..1313d04a 100644 --- a/Api.Documentation/.github/workflows/build-and-deploy.yml +++ b/Api.Documentation/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Documentation IMAGE_NAME: api.documentation @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -146,7 +146,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml b/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml index b6e6d5aa..ecb26cce 100644 --- a/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml +++ b/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Eventing.RabbitMq IMAGE_NAME: api.eventing.rabbitmq @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.HealthChecks/.github/workflows/build-and-deploy.yml b/Api.HealthChecks/.github/workflows/build-and-deploy.yml index b796728e..f89a693b 100644 --- a/Api.HealthChecks/.github/workflows/build-and-deploy.yml +++ b/Api.HealthChecks/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.HealthChecks IMAGE_NAME: api.healthchecks @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,8 +33,8 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} - AVAILABILITY_URI: ${{ github.ref == 'refs/heads/master' && format('https://{0}/healthz', secrets.PRODUCTION_HOST) || format('https://{0}/healthz', secrets.STAGING_HOST) }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} + AVAILABILITY_URI: ${{ github.ref == 'refs/heads/main' && format('https://{0}/healthz', secrets.PRODUCTION_HOST) || format('https://{0}/healthz', secrets.STAGING_HOST) }} AVAILABILITY_CHECK_FREQUENCY: 300 concurrency: group: ${{ github.workflow }}-${{ github.repository }} @@ -44,7 +44,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -210,7 +210,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Hosting.Http/.github/workflows/build-and-deploy.yml b/Api.Hosting.Http/.github/workflows/build-and-deploy.yml index 9d2f8666..90384258 100644 --- a/Api.Hosting.Http/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.Http/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Hosting.Http IMAGE_NAME: api.hosting.http @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Hosting.Https/.github/workflows/build-and-deploy.yml b/Api.Hosting.Https/.github/workflows/build-and-deploy.yml index 2ce8bd7f..a934b4b4 100644 --- a/Api.Hosting.Https/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.Https/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Hosting.Https IMAGE_NAME: api.hosting.https @@ -20,14 +20,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -35,7 +35,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -115,7 +115,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} needs: build permissions: contents: write @@ -187,7 +187,7 @@ jobs: } - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml b/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml index b88ec1d0..af80f33f 100644 --- a/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Hosting.MultipartLimits IMAGE_NAME: api.hosting.multipartlimits @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Localization/.github/workflows/build-and-deploy.yml b/Api.Localization/.github/workflows/build-and-deploy.yml index 5d09e9f9..bb574c10 100644 --- a/Api.Localization/.github/workflows/build-and-deploy.yml +++ b/Api.Localization/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Localization IMAGE_NAME: api.localization @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml b/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml index ae867356..751121cc 100644 --- a/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Logging.Log4Net IMAGE_NAME: api.logging.log4net @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml b/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml index 79aa9597..7537cd66 100644 --- a/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Logging.Microsoft IMAGE_NAME: api.logging.microsoft @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Logging.NLog/.github/workflows/build-and-deploy.yml b/Api.Logging.NLog/.github/workflows/build-and-deploy.yml index 56e3adb6..b5249f36 100644 --- a/Api.Logging.NLog/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.NLog/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Logging.NLog IMAGE_NAME: api.logging.nlog @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml b/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml index fd9f33b8..d90f3b76 100644 --- a/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Logging.Serilog IMAGE_NAME: api.logging.serilog @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.MultipartJson/.github/workflows/build-and-deploy.yml b/Api.MultipartJson/.github/workflows/build-and-deploy.yml index 53860cae..9441aa69 100644 --- a/Api.MultipartJson/.github/workflows/build-and-deploy.yml +++ b/Api.MultipartJson/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.MultipartJson IMAGE_NAME: api.multipartjson @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml index d1036abb..54ebe5a7 100644 --- a/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.PolicyHeaders.ContentSecurityPolicy IMAGE_NAME: api.policyheaders.contentsecuritypolicy @@ -20,14 +20,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -35,7 +35,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -44,7 +44,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -171,7 +171,7 @@ jobs: } - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml index 78b18f89..25192b2a 100644 --- a/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.PolicyHeaders.ContentTypeOptions IMAGE_NAME: api.policyheaders.contenttypeoptions @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml index 9d4e8692..84487fe7 100644 --- a/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.PolicyHeaders.Cors IMAGE_NAME: api.policyheaders.cors @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml index 30c7c525..a7d2ddeb 100644 --- a/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.PolicyHeaders.ForwardedHeaders IMAGE_NAME: api.policyheaders.forwardedheaders @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml index ace23a01..bcc6b606 100644 --- a/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.PolicyHeaders.FrameOptions IMAGE_NAME: api.policyheaders.frameoptions @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml index b17a4a74..c99ad689 100644 --- a/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.PolicyHeaders.Hsts IMAGE_NAME: api.policyheaders.hsts @@ -20,14 +20,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -35,7 +35,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -44,7 +44,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -171,7 +171,7 @@ jobs: } - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml index a2bb1f54..3dbdd303 100644 --- a/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.PolicyHeaders.ReferrerPolicy IMAGE_NAME: api.policyheaders.referrerpolicy @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml index 94248257..fc99b88c 100644 --- a/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.PolicyHeaders.Robots IMAGE_NAME: api.policyheaders.robots @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml index d48583a5..f4c1a0a0 100644 --- a/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.PolicyHeaders.XssProtection IMAGE_NAME: api.policyheaders.xssprotection @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.RequestTracing/.github/workflows/build-and-deploy.yml b/Api.RequestTracing/.github/workflows/build-and-deploy.yml index 2783c71d..bfe8acd6 100644 --- a/Api.RequestTracing/.github/workflows/build-and-deploy.yml +++ b/Api.RequestTracing/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.RequestTracing IMAGE_NAME: api.requesttracing @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.ResponseCache/.github/workflows/build-and-deploy.yml b/Api.ResponseCache/.github/workflows/build-and-deploy.yml index c0f83fca..c7b4b90d 100644 --- a/Api.ResponseCache/.github/workflows/build-and-deploy.yml +++ b/Api.ResponseCache/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.ResponseCache IMAGE_NAME: api.responsecache @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.ResponseCompression/.github/workflows/build-and-deploy.yml b/Api.ResponseCompression/.github/workflows/build-and-deploy.yml index cc885ef5..561ebc77 100644 --- a/Api.ResponseCompression/.github/workflows/build-and-deploy.yml +++ b/Api.ResponseCompression/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.ResponseCompression IMAGE_NAME: api.responsecompression @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Session/.github/workflows/build-and-deploy.yml b/Api.Session/.github/workflows/build-and-deploy.yml index 561886fc..6176eb7c 100644 --- a/Api.Session/.github/workflows/build-and-deploy.yml +++ b/Api.Session/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Session IMAGE_NAME: api.session @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.StartupTasks/.github/workflows/build-and-deploy.yml b/Api.StartupTasks/.github/workflows/build-and-deploy.yml index 7cb48e29..99fd9651 100644 --- a/Api.StartupTasks/.github/workflows/build-and-deploy.yml +++ b/Api.StartupTasks/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.StartupTasks IMAGE_NAME: api.startuptasks @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.StaticFiles/.github/workflows/build-and-deploy.yml b/Api.StaticFiles/.github/workflows/build-and-deploy.yml index 5c900575..05986356 100644 --- a/Api.StaticFiles/.github/workflows/build-and-deploy.yml +++ b/Api.StaticFiles/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.StaticFiles IMAGE_NAME: api.staticfiles @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml index 5610dc4e..a7be7039 100644 --- a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Storage.Azure IMAGE_NAME: api.storage.azure @@ -20,14 +20,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -37,13 +37,13 @@ env: KUBERNETES_CPU_SCALING: 180 STORAGE_SIZE: 1000 STORAGE_SHARE_NAME: nano-storage-azure - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} jobs: build-and-deploy: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -200,7 +200,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Storage.Local/.github/workflows/build-and-deploy.yml b/Api.Storage.Local/.github/workflows/build-and-deploy.yml index 6c43d5e0..84a03e58 100644 --- a/Api.Storage.Local/.github/workflows/build-and-deploy.yml +++ b/Api.Storage.Local/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Storage.Local IMAGE_NAME: api.storage.local @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -34,7 +34,7 @@ env: KUBERNETES_CPU_LIMIT: 600m STORAGE_SIZE: 1000 STORAGE_SHARE_NAME: nano-storage-local - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -43,7 +43,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -160,7 +160,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.TimeZone/.github/workflows/build-and-deploy.yml b/Api.TimeZone/.github/workflows/build-and-deploy.yml index 64721095..b3235383 100644 --- a/Api.TimeZone/.github/workflows/build-and-deploy.yml +++ b/Api.TimeZone/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.TimeZone IMAGE_NAME: api.timezone @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.Versioning/.github/workflows/build-and-deploy.yml b/Api.Versioning/.github/workflows/build-and-deploy.yml index 1a5cb6f9..9cad5519 100644 --- a/Api.Versioning/.github/workflows/build-and-deploy.yml +++ b/Api.Versioning/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Versioning IMAGE_NAME: api.versioning @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api.VirusScan/.github/workflows/build-and-deploy.yml b/Api.VirusScan/.github/workflows/build-and-deploy.yml index 7436a871..7df8a4d1 100644 --- a/Api.VirusScan/.github/workflows/build-and-deploy.yml +++ b/Api.VirusScan/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.VirusScan IMAGE_NAME: api.virusscan @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Api._Blank/.github/workflows/build-and-deploy.yml b/Api._Blank/.github/workflows/build-and-deploy.yml index a5d1c8f7..d10fb349 100644 --- a/Api._Blank/.github/workflows/build-and-deploy.yml +++ b/Api._Blank/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Api.Blank IMAGE_NAME: api.blank @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write steps: @@ -144,7 +144,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml b/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml index b3ffa60b..5368544c 100644 --- a/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml +++ b/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Console.CustomConfigSection IMAGE_NAME: console.customconfigsection @@ -15,7 +15,7 @@ env: DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -30,7 +30,7 @@ env: KUBERNETES_CPU_REQUEST: 50m KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" - DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -39,7 +39,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write steps: @@ -115,7 +115,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Console.CustomService/.github/workflows/build-and-deploy.yml b/Console.CustomService/.github/workflows/build-and-deploy.yml index 4ae492d1..bc8c67fc 100644 --- a/Console.CustomService/.github/workflows/build-and-deploy.yml +++ b/Console.CustomService/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Console.CustomService IMAGE_NAME: console.customservice @@ -15,7 +15,7 @@ env: DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -30,7 +30,7 @@ env: KUBERNETES_CPU_REQUEST: 50m KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" - DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -39,7 +39,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write steps: @@ -115,7 +115,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Console.Data.InMemory/.github/workflows/build-and-deploy.yml b/Console.Data.InMemory/.github/workflows/build-and-deploy.yml index be48696c..c27e0954 100644 --- a/Console.Data.InMemory/.github/workflows/build-and-deploy.yml +++ b/Console.Data.InMemory/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Console.Data.InMemory IMAGE_NAME: console.data.inmemory @@ -15,7 +15,7 @@ env: DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -30,7 +30,7 @@ env: KUBERNETES_CPU_REQUEST: 50m KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" - DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -39,7 +39,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write steps: @@ -115,7 +115,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Console.Data.MySql/.github/workflows/build-and-deploy.yml b/Console.Data.MySql/.github/workflows/build-and-deploy.yml index 59511a0d..466fe30e 100644 --- a/Console.Data.MySql/.github/workflows/build-and-deploy.yml +++ b/Console.Data.MySql/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Console.Data.MySql IMAGE_NAME: console.data.mysql @@ -15,7 +15,7 @@ env: DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -32,9 +32,9 @@ env: KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" SQL_NAME: nanoDb SQL_USER: api-data-mysql-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} - DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -43,7 +43,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write steps: @@ -170,7 +170,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml b/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml index 7501ccb5..a65f8358 100644 --- a/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml +++ b/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Console.Data.PostgreSQL IMAGE_NAME: console.data.postgresql @@ -15,7 +15,7 @@ env: DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -30,11 +30,11 @@ env: KUBERNETES_CPU_REQUEST: 50m KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" - DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_USER: api-data-mysql-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -43,7 +43,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write steps: @@ -175,7 +175,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Console.Data.SqLite/.github/workflows/build-and-deploy.yml b/Console.Data.SqLite/.github/workflows/build-and-deploy.yml index e57ad5d8..6addb410 100644 --- a/Console.Data.SqLite/.github/workflows/build-and-deploy.yml +++ b/Console.Data.SqLite/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Console.Data.SqLite IMAGE_NAME: console.data.sqlite @@ -15,7 +15,7 @@ env: DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -33,7 +33,7 @@ env: SQL_NAME: nanoDb SQL_SIZE: 10Gi SQL_CONNECTIONSTRING: "Data Source=/mnt/data/{{ env.SQL_NAME }}.sqlite" - DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write steps: @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml b/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml index d0756022..9803cd1a 100644 --- a/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml +++ b/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Console.Data.SqlServer IMAGE_NAME: console.data.sqlserver @@ -15,7 +15,7 @@ env: DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -30,11 +30,11 @@ env: KUBERNETES_CPU_REQUEST: 50m KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" - DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_USER: api-data-sqlserver-user - SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} - SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} + SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -43,7 +43,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write steps: @@ -121,7 +121,7 @@ jobs: -S "$env:SQL_HOST,$env:SQL_PORT" ` -U $env:SQL_ADMIN_USER ` -P $env:SQL_ADMIN_PASSWORD ` - -d master ` + -d main ` -h -1 ` -Q "SET NOCOUNT ON; SELECT COUNT(*) FROM sys.server_principals WHERE name = '$env:SQL_USER';" @@ -131,7 +131,7 @@ jobs: -S "$env:SQL_HOST,$env:SQL_PORT" ` -U $env:SQL_ADMIN_USER ` -P $env:SQL_ADMIN_PASSWORD ` - -d master ` + -d main ` -Q "CREATE LOGIN [$env:SQL_USER] WITH PASSWORD = '$env:SQL_PASSWORD';" }; @@ -186,7 +186,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml b/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml index b9716c16..454eea95 100644 --- a/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml +++ b/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Console.Eventing.RabbitMq IMAGE_NAME: console.eventing.rabbitmq @@ -15,7 +15,7 @@ env: DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -30,7 +30,7 @@ env: KUBERNETES_CPU_REQUEST: 50m KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" - DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -39,7 +39,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write steps: @@ -115,7 +115,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml b/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml index bbde45fe..d0c01b07 100644 --- a/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml +++ b/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Console.ExceptionHandling IMAGE_NAME: console.exceptionhandling @@ -15,7 +15,7 @@ env: DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -30,7 +30,7 @@ env: KUBERNETES_CPU_REQUEST: 50m KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" - DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -39,7 +39,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write steps: @@ -115,7 +115,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Console.Localization/.github/workflows/build-and-deploy.yml b/Console.Localization/.github/workflows/build-and-deploy.yml index 39b17ca1..bfc8af8d 100644 --- a/Console.Localization/.github/workflows/build-and-deploy.yml +++ b/Console.Localization/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Console.Localization IMAGE_NAME: console.localization @@ -15,7 +15,7 @@ env: DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -30,7 +30,7 @@ env: KUBERNETES_CPU_REQUEST: 50m KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" - DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -39,7 +39,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write steps: @@ -115,7 +115,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml b/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml index 98419cf6..096a4f75 100644 --- a/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Console.Logging.Log4Net IMAGE_NAME: console.logging.log4net @@ -15,7 +15,7 @@ env: DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -30,7 +30,7 @@ env: KUBERNETES_CPU_REQUEST: 50m KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" - DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -39,7 +39,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write steps: @@ -115,7 +115,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml b/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml index bea31620..12903ee4 100644 --- a/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Console.Logging.Microsoft IMAGE_NAME: console.logging.microsoft @@ -15,7 +15,7 @@ env: DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -30,7 +30,7 @@ env: KUBERNETES_CPU_REQUEST: 50m KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" - DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -39,7 +39,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write steps: @@ -115,7 +115,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Console.Logging.NLog/.github/workflows/build-and-deploy.yml b/Console.Logging.NLog/.github/workflows/build-and-deploy.yml index 20890041..fa6702b3 100644 --- a/Console.Logging.NLog/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.NLog/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Console.Logging.NLog IMAGE_NAME: console.logging.nlog @@ -15,7 +15,7 @@ env: DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -30,7 +30,7 @@ env: KUBERNETES_CPU_REQUEST: 50m KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" - DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -39,7 +39,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write steps: @@ -115,7 +115,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml b/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml index 2554c77b..e51d080b 100644 --- a/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Console.Logging.Serilog IMAGE_NAME: console.logging.serilog @@ -15,7 +15,7 @@ env: DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -30,7 +30,7 @@ env: KUBERNETES_CPU_REQUEST: 50m KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" - DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -39,7 +39,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write steps: @@ -115,7 +115,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Console.StartupTasks/.github/workflows/build-and-deploy.yml b/Console.StartupTasks/.github/workflows/build-and-deploy.yml index f28ad021..c201b68b 100644 --- a/Console.StartupTasks/.github/workflows/build-and-deploy.yml +++ b/Console.StartupTasks/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Console.StartupTasks IMAGE_NAME: console.startuptasks @@ -15,7 +15,7 @@ env: DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -30,7 +30,7 @@ env: KUBERNETES_CPU_REQUEST: 50m KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" - DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -39,7 +39,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write steps: @@ -115,7 +115,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml index 6491bcf3..5c24ec60 100644 --- a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Console.Storage.Azure IMAGE_NAME: console.storage.azure @@ -17,7 +17,7 @@ env: AZURE_GROUP_STORAGE: ${{ vars.AZURE_RESOURCE_GROUP_STORAGE }} AZURE_GROUP_BACKUP: ${{ vars.AZURE_RESOURCE_GROUP_BACKUP }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -34,7 +34,7 @@ env: KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" STORAGE_SIZE: 1000 STORAGE_SHARE_NAME: nano-storage-azure - DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -43,7 +43,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write steps: @@ -173,7 +173,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Console.Storage.Local/.github/workflows/build-and-deploy.yml b/Console.Storage.Local/.github/workflows/build-and-deploy.yml index 3e3e7f72..0a6a629d 100644 --- a/Console.Storage.Local/.github/workflows/build-and-deploy.yml +++ b/Console.Storage.Local/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Console.Storage.Local IMAGE_NAME: console.storage.local @@ -15,7 +15,7 @@ env: DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -32,7 +32,7 @@ env: KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" STORAGE_SIZE: 1000 STORAGE_SHARE_NAME: nano-storage-local - DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -41,7 +41,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write steps: @@ -131,7 +131,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Console.Workers/.github/workflows/build-and-deploy.yml b/Console.Workers/.github/workflows/build-and-deploy.yml index 277d38c3..076a9a36 100644 --- a/Console.Workers/.github/workflows/build-and-deploy.yml +++ b/Console.Workers/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Console.Workers IMAGE_NAME: console.workers @@ -15,7 +15,7 @@ env: DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -30,7 +30,7 @@ env: KUBERNETES_CPU_REQUEST: 50m KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" - DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -39,7 +39,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write steps: @@ -115,7 +115,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Console._Blank/.github/workflows/build-and-deploy.yml b/Console._Blank/.github/workflows/build-and-deploy.yml index 8dbe5940..61e580e1 100644 --- a/Console._Blank/.github/workflows/build-and-deploy.yml +++ b/Console._Blank/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Console.Blank IMAGE_NAME: console.blank @@ -15,7 +15,7 @@ env: DOTNET_ASPNET_VERSION: 10.0 AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -30,7 +30,7 @@ env: KUBERNETES_CPU_REQUEST: 50m KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" - DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -39,7 +39,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write steps: @@ -115,7 +115,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} diff --git a/Web._Blank/.github/workflows/build-and-deploy.yml b/Web._Blank/.github/workflows/build-and-deploy.yml index 29c99dc0..303d6b88 100644 --- a/Web._Blank/.github/workflows/build-and-deploy.yml +++ b/Web._Blank/.github/workflows/build-and-deploy.yml @@ -2,10 +2,10 @@ name: Build And Deploy on: pull_request: branches: - - master + - main push: branches: - - master + - main env: APP_NAME: Web.Blank IMAGE_NAME: web.blank @@ -18,14 +18,14 @@ env: AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} KUBERNETES_NODEPOOL_COMPUTE: cpu KUBERNETES_NAMESPACE: ${{ vars.KUBERNETES_NAMESPACE }} - KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/master' && 3 || 2 }} - KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/master' && 8 || 5 }} + KUBERNETES_REPLICA_COUNT: ${{ github.ref == 'refs/heads/main' && 3 || 2 }} + KUBERNETES_REPLICA_COUNT_MAX: ${{ github.ref == 'refs/heads/main' && 8 || 5 }} KUBERNETES_REPLICA_HISTORY_COUNT: 0 KUBERNETES_MEMORY_REQUEST: 512Mi KUBERNETES_MEMORY_LIMIT: 1536Mi @@ -33,7 +33,7 @@ env: KUBERNETES_CPU_REQUEST: 200m KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 - ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -42,7 +42,7 @@ jobs: runs-on: - self-hosted - linux - - ${{ github.ref == 'refs/heads/master' && 'Production' || 'Staging' }} + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: contents: write packages: write @@ -145,7 +145,7 @@ jobs: }; - name: GitHub Release - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: tag: v${{ env.VERSION }} From fa9853c9440839c08d677b9bed04befca4921102 Mon Sep 17 00:00:00 2001 From: vivet Date: Sat, 4 Jul 2026 19:02:19 +0200 Subject: [PATCH 06/33] Updated --- Api.Data.InMemory/README.md | 2 +- Api.Data.MySql/README.md | 2 +- Api.Data.PostgreSQL/README.md | 2 +- Api.Data.SqLite/README.md | 2 +- Api.Data.SqlServer/README.md | 2 +- Api.Eventing.RabbitMq/README.md | 6 +++--- Api.Storage.Azure/README.md | 3 ++- Api.Storage.Local/README.md | 3 ++- .../Console.Data.InMemory/appsettings.json | 2 +- Console.Data.InMemory/README.md | 2 +- Console.Data.SqLite/README.md | 2 +- Console.Eventing.RabbitMq/README.md | 2 +- Console.Storage.Azure/README.md | 3 ++- Console.Storage.Local/README.md | 3 ++- 14 files changed, 20 insertions(+), 16 deletions(-) diff --git a/Api.Data.InMemory/README.md b/Api.Data.InMemory/README.md index bb283b02..2bdd8a89 100644 --- a/Api.Data.InMemory/README.md +++ b/Api.Data.InMemory/README.md @@ -68,7 +68,7 @@ Configured the application with the necessary data setup. "DefaultCollation": null, "ConnectionString": "nanoDb", "Repository": { - "UseAutoSave": false, + "UseAutoSave": true, "QueryIncludeDepth": 4 }, "Identity": null, diff --git a/Api.Data.MySql/README.md b/Api.Data.MySql/README.md index 73a6b67a..46fe26e3 100644 --- a/Api.Data.MySql/README.md +++ b/Api.Data.MySql/README.md @@ -81,7 +81,7 @@ Configured the application with the necessary data setup. "DefaultCollation": null, "ConnectionString": null, "Repository": { - "UseAutoSave": false, + "UseAutoSave": true, "QueryIncludeDepth": 4 }, "Identity": null, diff --git a/Api.Data.PostgreSQL/README.md b/Api.Data.PostgreSQL/README.md index 982e730e..ed09dfa9 100644 --- a/Api.Data.PostgreSQL/README.md +++ b/Api.Data.PostgreSQL/README.md @@ -81,7 +81,7 @@ Configured the application with the necessary data setup. "DefaultCollation": null, "ConnectionString": null, "Repository": { - "UseAutoSave": false, + "UseAutoSave": true, "QueryIncludeDepth": 4 }, "Identity": null, diff --git a/Api.Data.SqLite/README.md b/Api.Data.SqLite/README.md index 0884a1cc..a3d97ec8 100644 --- a/Api.Data.SqLite/README.md +++ b/Api.Data.SqLite/README.md @@ -81,7 +81,7 @@ Configured the application with the necessary data setup. "DefaultCollation": null, "ConnectionString": "Data Source=/data/nanoDb.sqlite", "Repository": { - "UseAutoSave": false, + "UseAutoSave": true, "QueryIncludeDepth": 4 }, "Identity": null, diff --git a/Api.Data.SqlServer/README.md b/Api.Data.SqlServer/README.md index c1286d17..e6f7c574 100644 --- a/Api.Data.SqlServer/README.md +++ b/Api.Data.SqlServer/README.md @@ -81,7 +81,7 @@ Configured the application with the necessary data setup. "DefaultCollation": null, "ConnectionString": null, "Repository": { - "UseAutoSave": false, + "UseAutoSave": true, "QueryIncludeDepth": 4 }, "Identity": null, diff --git a/Api.Eventing.RabbitMq/README.md b/Api.Eventing.RabbitMq/README.md index 853d3e09..b5981655 100644 --- a/Api.Eventing.RabbitMq/README.md +++ b/Api.Eventing.RabbitMq/README.md @@ -72,8 +72,8 @@ Configured the application `appsettings.json` with the necessary eventing setup. "Heartbeat": 60, "PrefetchCount": 50, "Credentials": { - "Id": "rabbitmq_user", - "Secret": "password" + "Id": null, + "Secret": null }, "HealthCheck": { "UnhealthyStatus": "Unhealthy" @@ -129,7 +129,7 @@ services: ## Kubernetes Added the `rabbitmq` secret for password to the `deployment.yaml`. -```json +```yaml spec: template: spec: diff --git a/Api.Storage.Azure/README.md b/Api.Storage.Azure/README.md index b4382605..ef57a236 100644 --- a/Api.Storage.Azure/README.md +++ b/Api.Storage.Azure/README.md @@ -81,7 +81,8 @@ Additionally, application health-checks have been enabled with the configuration Mapped the fileshare in `docker-compose.yml`. ```yaml -docker +services: + svc.accounts: volumes: - ./bin/nano-storage-azure:/mnt/nano-storage-azure ``` diff --git a/Api.Storage.Local/README.md b/Api.Storage.Local/README.md index c243734f..9033e725 100644 --- a/Api.Storage.Local/README.md +++ b/Api.Storage.Local/README.md @@ -75,7 +75,8 @@ Additionally, application health-checks have been enabled with the configuration Mapped the fileshare in `docker-compose.yml`. ```yaml -docker +services: + console.storage.local: volumes: - ./bin/nano-storage-local:/mnt/nano-storage-local ``` diff --git a/Console.Data.InMemory/Console.Data.InMemory/appsettings.json b/Console.Data.InMemory/Console.Data.InMemory/appsettings.json index 254689c8..e0008651 100644 --- a/Console.Data.InMemory/Console.Data.InMemory/appsettings.json +++ b/Console.Data.InMemory/Console.Data.InMemory/appsettings.json @@ -17,7 +17,7 @@ "DefaultCollation": null, "ConnectionString": "nanoDb", "Repository": { - "UseAutoSave": false, + "UseAutoSave": true, "QueryIncludeDepth": 4 }, "Identity": null, diff --git a/Console.Data.InMemory/README.md b/Console.Data.InMemory/README.md index d6cb69d4..5515d9ac 100644 --- a/Console.Data.InMemory/README.md +++ b/Console.Data.InMemory/README.md @@ -61,7 +61,7 @@ Configured the application with the necessary data setup. "DefaultCollation": null, "ConnectionString": "nanoDb", "Repository": { - "UseAutoSave": false, + "UseAutoSave": true, "QueryIncludeDepth": 4 }, "Identity": null, diff --git a/Console.Data.SqLite/README.md b/Console.Data.SqLite/README.md index 7661aa11..5243192c 100644 --- a/Console.Data.SqLite/README.md +++ b/Console.Data.SqLite/README.md @@ -65,7 +65,7 @@ Configured the application with the necessary data setup. "DefaultCollation": null, "ConnectionString": "Data Source=/data/nanoDb.sqlite", "Repository": { - "UseAutoSave": false, + "UseAutoSave": true, "QueryIncludeDepth": 4 }, "Identity": null, diff --git a/Console.Eventing.RabbitMq/README.md b/Console.Eventing.RabbitMq/README.md index d0a49baa..2d50e5a2 100644 --- a/Console.Eventing.RabbitMq/README.md +++ b/Console.Eventing.RabbitMq/README.md @@ -104,7 +104,7 @@ services: ## Kubernetes Added the `rabbitmq` secret for password to the `cronjob.yaml`. -```json +```yaml spec: template: spec: diff --git a/Console.Storage.Azure/README.md b/Console.Storage.Azure/README.md index 3731aeef..c34a6225 100644 --- a/Console.Storage.Azure/README.md +++ b/Console.Storage.Azure/README.md @@ -52,7 +52,8 @@ Configured the application with the necessary storage setup. Mapped the fileshare in `docker-compose.yml`. ```yaml -docker +services: + svc.accounts: volumes: - ./bin/nano-storage-azure:/mnt/nano-storage-azure ``` diff --git a/Console.Storage.Local/README.md b/Console.Storage.Local/README.md index f8b0ac76..06edf046 100644 --- a/Console.Storage.Local/README.md +++ b/Console.Storage.Local/README.md @@ -51,7 +51,8 @@ Configured the application with the necessary storage setup. Mapped the fileshare in `docker-compose.yml`. ```yaml -docker +services: + console.storage.local: volumes: - ./bin/nano-storage-local:/mnt/nano-storage-local ``` From 1c3c3e06997e82afec328b24db73df1a5fe95af9 Mon Sep 17 00:00:00 2001 From: vivet Date: Mon, 6 Jul 2026 17:06:07 +0200 Subject: [PATCH 07/33] Updated --- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 26 +++-- .../.github/workflows/build-and-deploy.yml | 26 +++-- .../.github/workflows/build-and-deploy.yml | 26 +++-- .../.github/workflows/build-and-deploy.yml | 26 +++-- .../.github/workflows/build-and-deploy.yml | 26 +++-- .../.github/workflows/build-and-deploy.yml | 26 +++-- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 26 +++-- .../.github/workflows/build-and-deploy.yml | 26 +++-- .../.github/workflows/build-and-deploy.yml | 26 +++-- .../.github/workflows/build-and-deploy.yml | 26 +++-- .../.github/workflows/build-and-deploy.yml | 26 +++-- .../.github/workflows/build-and-deploy.yml | 26 +++-- .../.github/workflows/build-and-deploy.yml | 26 +++-- .../.github/workflows/build-and-deploy.yml | 23 ++-- .../.github/workflows/build-and-deploy.yml | 23 ++-- .../.github/workflows/build-and-deploy.yml | 26 +++-- .../.github/workflows/build-and-deploy.yml | 26 +++-- .../.github/workflows/build-and-deploy.yml | 26 +++-- .../.github/workflows/build-and-deploy.yml | 29 ++--- Api.Data.SqLite/.kubernetes/data-pvc.yaml | 2 +- .../appsettings.Development.json | 4 +- .../Api.Data.SqLite/appsettings.json | 2 +- Api.Data.SqLite/README.md | 8 +- .../.github/workflows/build-and-deploy.yml | 24 +++-- .../.github/workflows/build-and-deploy.yml | 24 +++-- .../.github/workflows/build-and-deploy.yml | 26 +++-- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 101 ++++++++---------- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 62 ++++++----- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 13 ++- .../.github/workflows/build-and-deploy.yml | 15 +-- .../.github/workflows/build-and-deploy.yml | 15 +-- .../.github/workflows/build-and-deploy.yml | 16 +-- .../.github/workflows/build-and-deploy.yml | 28 +++-- .../.github/workflows/build-and-deploy.yml | 25 +++-- .../.github/workflows/build-and-deploy.yml | 32 ++---- Console.Data.SqLite/.kubernetes/data-pvc.yaml | 2 +- .../appsettings.Development.json | 3 - Console.Data.SqLite/README.md | 8 +- .../.github/workflows/build-and-deploy.yml | 26 +++-- .../.github/workflows/build-and-deploy.yml | 15 +-- .../.github/workflows/build-and-deploy.yml | 15 +-- .../.github/workflows/build-and-deploy.yml | 15 +-- .../.github/workflows/build-and-deploy.yml | 15 +-- .../.github/workflows/build-and-deploy.yml | 15 +-- .../.github/workflows/build-and-deploy.yml | 15 +-- .../.github/workflows/build-and-deploy.yml | 15 +-- .../.github/workflows/build-and-deploy.yml | 15 +-- .../.github/workflows/build-and-deploy.yml | 62 ++++++----- .../.github/workflows/build-and-deploy.yml | 15 +-- .../.github/workflows/build-and-deploy.yml | 15 +-- .../.github/workflows/build-and-deploy.yml | 15 +-- .../.github/workflows/build-and-deploy.yml | 13 ++- 97 files changed, 1070 insertions(+), 682 deletions(-) diff --git a/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml b/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml index f2676db2..2776c348 100644 --- a/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.apiclients.audit SERVICE_NAME: api-apiclients-audit VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml b/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml index 54c62ccf..9dfc4a17 100644 --- a/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.apiclients.entity SERVICE_NAME: api-apiclients-entity VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml b/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml index bd9cb4c9..31fbdc71 100644 --- a/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.apiclients.rootlogin SERVICE_NAME: api-apiclients-rootlogin VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.ApiClients/.github/workflows/build-and-deploy.yml b/Api.ApiClients/.github/workflows/build-and-deploy.yml index bd15c78c..e26f7a80 100644 --- a/Api.ApiClients/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.apiclients SERVICE_NAME: api-apiclients VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml b/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml index 8d78e84f..3f005ac8 100644 --- a/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml +++ b/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.auth.external.custom SERVICE_NAME: api-auth-external-custom VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -49,6 +49,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -58,18 +60,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -91,7 +94,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml b/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml index 58c161d8..540fd454 100644 --- a/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml +++ b/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.auth.rootlogin SERVICE_NAME: api-auth-rootlogin VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -49,6 +49,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -58,18 +60,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -91,7 +94,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.Authorization/.github/workflows/build-and-deploy.yml b/Api.Authorization/.github/workflows/build-and-deploy.yml index 372e7bc6..c02a0a60 100644 --- a/Api.Authorization/.github/workflows/build-and-deploy.yml +++ b/Api.Authorization/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.authorization SERVICE_NAME: api-authorization VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -49,6 +49,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -58,18 +60,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -91,7 +94,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml b/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml index 258abdb2..80867ca5 100644 --- a/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml +++ b/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.contentnegotiation SERVICE_NAME: api-contentnegotiation VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.Cookies/.github/workflows/build-and-deploy.yml b/Api.Cookies/.github/workflows/build-and-deploy.yml index 9c844ea2..2fb94635 100644 --- a/Api.Cookies/.github/workflows/build-and-deploy.yml +++ b/Api.Cookies/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.cookies SERVICE_NAME: api-cookies VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml b/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml index 3afc26ca..c377b154 100644 --- a/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml +++ b/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.customconfigsection SERVICE_NAME: api-customconfigsection VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml b/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml index e07ae89a..8ada7095 100644 --- a/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml +++ b/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.custommiddleware SERVICE_NAME: api-custommiddleware VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.CustomService/.github/workflows/build-and-deploy.yml b/Api.CustomService/.github/workflows/build-and-deploy.yml index 04dbf7c4..17d53bb4 100644 --- a/Api.CustomService/.github/workflows/build-and-deploy.yml +++ b/Api.CustomService/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.customservice SERVICE_NAME: api-customservice VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.Data.Audit/.github/workflows/build-and-deploy.yml b/Api.Data.Audit/.github/workflows/build-and-deploy.yml index 77ede391..16fc9b64 100644 --- a/Api.Data.Audit/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Audit/.github/workflows/build-and-deploy.yml @@ -11,10 +11,12 @@ env: IMAGE_NAME: api.data.audit SERVICE_NAME: api-data-audit VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -51,6 +53,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -60,18 +64,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -93,7 +98,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -121,18 +126,23 @@ jobs: $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName -o tsv; $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort -o tsv; $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Preferred"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Required"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING "; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; + $env:MYSQL_PWD = $env:SQL_ADMIN_PASSWORD + $userExists = mysql ` --host $env:SQL_HOST ` --port $env:SQL_PORT ` diff --git a/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml b/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml index f3ade48d..444b6dc7 100644 --- a/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml +++ b/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml @@ -11,10 +11,12 @@ env: IMAGE_NAME: api.data.entityevents SERVICE_NAME: api-data-entityevents VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -51,6 +53,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -60,18 +64,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -93,7 +98,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -121,18 +126,23 @@ jobs: $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName -o tsv; $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort -o tsv; $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Preferred"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Required"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING "; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; + $env:MYSQL_PWD = $env:SQL_ADMIN_PASSWORD + $userExists = mysql ` --host $env:SQL_HOST ` --port $env:SQL_PORT ` diff --git a/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml index 207597e4..e0ee1dd8 100644 --- a/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml @@ -11,10 +11,12 @@ env: IMAGE_NAME: api.data.identity.auth.apikey SERVICE_NAME: api-data-identity.auth.apikey VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -54,6 +56,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -63,18 +67,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -96,7 +101,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -124,18 +129,23 @@ jobs: $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName -o tsv; $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort -o tsv; $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Preferred"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Required"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING "; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; + $env:MYSQL_PWD = $env:SQL_ADMIN_PASSWORD + $userExists = mysql ` --host $env:SQL_HOST ` --port $env:SQL_PORT ` diff --git a/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml index e924e09a..1e878fde 100644 --- a/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml @@ -11,10 +11,12 @@ env: IMAGE_NAME: api.data.identity.auth.external.custom SERVICE_NAME: api-data-identity.auth.external.custom VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -53,6 +55,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -62,18 +66,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -95,7 +100,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -123,18 +128,23 @@ jobs: $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName -o tsv; $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort -o tsv; $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Preferred"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Required"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING "; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; + $env:MYSQL_PWD = $env:SQL_ADMIN_PASSWORD + $userExists = mysql ` --host $env:SQL_HOST ` --port $env:SQL_PORT ` diff --git a/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml index d463834c..4c070d71 100644 --- a/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml @@ -11,10 +11,12 @@ env: IMAGE_NAME: api.data.identity.auth.jwt SERVICE_NAME: api-data-identity.auth.jwt VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -53,6 +55,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -62,18 +66,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -95,7 +100,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -123,18 +128,23 @@ jobs: $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName -o tsv; $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort -o tsv; $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Preferred"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Required"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING "; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; + $env:MYSQL_PWD = $env:SQL_ADMIN_PASSWORD + $userExists = mysql ` --host $env:SQL_HOST ` --port $env:SQL_PORT ` diff --git a/Api.Data.Identity/.github/workflows/build-and-deploy.yml b/Api.Data.Identity/.github/workflows/build-and-deploy.yml index cd5ce5e1..4e38d7bb 100644 --- a/Api.Data.Identity/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity/.github/workflows/build-and-deploy.yml @@ -11,10 +11,12 @@ env: IMAGE_NAME: api.data.identity SERVICE_NAME: api-data-identity VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -51,6 +53,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -60,18 +64,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -93,7 +98,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -121,18 +126,23 @@ jobs: $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName -o tsv; $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort -o tsv; $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Preferred"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Required"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING "; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; + $env:MYSQL_PWD = $env:SQL_ADMIN_PASSWORD + $userExists = mysql ` --host $env:SQL_HOST ` --port $env:SQL_PORT ` diff --git a/Api.Data.InMemory/.github/workflows/build-and-deploy.yml b/Api.Data.InMemory/.github/workflows/build-and-deploy.yml index 69012394..4f04aac3 100644 --- a/Api.Data.InMemory/.github/workflows/build-and-deploy.yml +++ b/Api.Data.InMemory/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.data.inmemory SERVICE_NAME: api-data-inmemory VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml b/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml index 9df626cd..2ff6e926 100644 --- a/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml +++ b/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml @@ -11,10 +11,12 @@ env: IMAGE_NAME: api.data.lazyloading SERVICE_NAME: api-data-lazyloading VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -51,6 +53,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -60,18 +64,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -93,7 +98,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -121,18 +126,23 @@ jobs: $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName -o tsv; $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort -o tsv; $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Preferred"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Required"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING "; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; + $env:MYSQL_PWD = $env:SQL_ADMIN_PASSWORD + $userExists = mysql ` --host $env:SQL_HOST ` --port $env:SQL_PORT ` diff --git a/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml index cda38f3a..a2fd3cdc 100644 --- a/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml @@ -11,10 +11,12 @@ env: IMAGE_NAME: api.data.mysql.collation SERVICE_NAME: api-data-mysql-collation VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -48,6 +50,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -57,18 +61,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -90,7 +95,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -118,18 +123,23 @@ jobs: $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName -o tsv; $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort -o tsv; $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Preferred"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Required"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING "; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; + $env:MYSQL_PWD = $env:SQL_ADMIN_PASSWORD + $userExists = mysql ` --host $env:SQL_HOST ` --port $env:SQL_PORT ` diff --git a/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml index 6e789d0d..cccab4dd 100644 --- a/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml @@ -11,10 +11,12 @@ env: IMAGE_NAME: api.data.mysql.mappings SERVICE_NAME: api-data-mysql-mappings VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -51,6 +53,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -60,18 +64,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -93,7 +98,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -121,18 +126,23 @@ jobs: $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName -o tsv; $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort -o tsv; $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Preferred"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Required"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING "; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; + $env:MYSQL_PWD = $env:SQL_ADMIN_PASSWORD + $userExists = mysql ` --host $env:SQL_HOST ` --port $env:SQL_PORT ` diff --git a/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml index deafd2c8..a1be9f0d 100644 --- a/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml @@ -11,10 +11,12 @@ env: IMAGE_NAME: api.data.mysql.spatial SERVICE_NAME: api-data-mysql-spatial VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -51,6 +53,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -60,18 +64,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -93,7 +98,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -121,18 +126,23 @@ jobs: $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName -o tsv; $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort -o tsv; $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Preferred"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Required"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING "; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; + $env:MYSQL_PWD = $env:SQL_ADMIN_PASSWORD + $userExists = mysql ` --host $env:SQL_HOST ` --port $env:SQL_PORT ` diff --git a/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml index 3ef26334..0d73988b 100644 --- a/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml @@ -11,10 +11,12 @@ env: IMAGE_NAME: api.data.mysql.storedprocedures SERVICE_NAME: api-data-mysql-storedprocedures VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -51,6 +53,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -60,18 +64,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -93,7 +98,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -121,18 +126,23 @@ jobs: $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName -o tsv; $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort -o tsv; $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Preferred"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Required"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING "; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; + $env:MYSQL_PWD = $env:SQL_ADMIN_PASSWORD + $userExists = mysql ` --host $env:SQL_HOST ` --port $env:SQL_PORT ` diff --git a/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml index d77c7908..6f4032c1 100644 --- a/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml @@ -11,10 +11,12 @@ env: IMAGE_NAME: api.data.mysql.views SERVICE_NAME: api-data-mysql-views VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -51,6 +53,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -60,18 +64,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -93,7 +98,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -121,18 +126,23 @@ jobs: $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName -o tsv; $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort -o tsv; $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Preferred"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Required"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING "; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; + $env:MYSQL_PWD = $env:SQL_ADMIN_PASSWORD + $userExists = mysql ` --host $env:SQL_HOST ` --port $env:SQL_PORT ` diff --git a/Api.Data.MySql/.github/workflows/build-and-deploy.yml b/Api.Data.MySql/.github/workflows/build-and-deploy.yml index 0e8d40f0..df98d6cc 100644 --- a/Api.Data.MySql/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql/.github/workflows/build-and-deploy.yml @@ -11,10 +11,12 @@ env: IMAGE_NAME: api.data.mysql SERVICE_NAME: api-data-mysql VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -51,6 +53,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -60,18 +64,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -93,7 +98,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -121,18 +126,23 @@ jobs: $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName -o tsv; $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort -o tsv; $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Preferred"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Required"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING "; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; + $env:MYSQL_PWD = $env:SQL_ADMIN_PASSWORD + $userExists = mysql ` --host $env:SQL_HOST ` --port $env:SQL_PORT ` diff --git a/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml index 2a90579d..2fc9a24c 100644 --- a/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml @@ -11,10 +11,12 @@ env: IMAGE_NAME: api.data.postgresql.spatial SERVICE_NAME: api-data-postgresql-spatial VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -51,6 +53,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -60,18 +64,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -93,7 +98,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -123,10 +128,14 @@ jobs: $env:SQL_ADMIN_USER = az postgres flexible-server list -g $env:AZURE_GROUP_DATABASE --query "[0].username" -o tsv; $env:SQL_MIGRATION_CONNECTIONSTRING = "Host=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Username=$env:SQL_ADMIN_USER;Password=$env:SQL_ADMIN_PASSWORD;SSL Mode=Prefer;Trust Server Certificate=true"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = $env:SQL_MIGRATION_CONNECTIONSTRING; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING" `; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { diff --git a/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml b/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml index 7bd689b4..30c00704 100644 --- a/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml +++ b/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml @@ -11,10 +11,12 @@ env: IMAGE_NAME: api.data.postgresql SERVICE_NAME: api-data-postgresql VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -51,6 +53,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -60,18 +64,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -93,7 +98,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -123,10 +128,14 @@ jobs: $env:SQL_ADMIN_USER = az postgres flexible-server list -g $env:AZURE_GROUP_DATABASE --query "[0].username" -o tsv; $env:SQL_MIGRATION_CONNECTIONSTRING = "Host=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Username=$env:SQL_ADMIN_USER;Password=$env:SQL_ADMIN_PASSWORD;SSL Mode=Prefer;Trust Server Certificate=true"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = $env:SQL_MIGRATION_CONNECTIONSTRING; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING" `; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { diff --git a/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml b/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml index 7ebe95c8..06c2edff 100644 --- a/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml @@ -11,10 +11,12 @@ env: IMAGE_NAME: api.data.repository.autosave SERVICE_NAME: api-data-repository-autosave VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -51,6 +53,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -60,18 +64,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -93,7 +98,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -121,18 +126,23 @@ jobs: $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName -o tsv; $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort -o tsv; $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Preferred"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Required"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING "; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; + $env:MYSQL_PWD = $env:SQL_ADMIN_PASSWORD + $userExists = mysql ` --host $env:SQL_HOST ` --port $env:SQL_PORT ` diff --git a/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml b/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml index b4d88957..c52a1ff3 100644 --- a/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml @@ -11,10 +11,12 @@ env: IMAGE_NAME: api.data.repository.includes SERVICE_NAME: api-data-repository-includes VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -51,6 +53,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -60,18 +64,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -93,7 +98,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -121,18 +126,23 @@ jobs: $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName -o tsv; $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort -o tsv; $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Preferred"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Required"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING "; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; + $env:MYSQL_PWD = $env:SQL_ADMIN_PASSWORD + $userExists = mysql ` --host $env:SQL_HOST ` --port $env:SQL_PORT ` diff --git a/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml b/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml index cee0c804..6ea8a898 100644 --- a/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml @@ -11,10 +11,12 @@ env: IMAGE_NAME: api.data.softdelete SERVICE_NAME: api-data-softdelete VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -51,6 +53,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -60,18 +64,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -93,7 +98,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -121,18 +126,23 @@ jobs: $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName -o tsv; $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort -o tsv; $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Preferred"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Required"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING "; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; + $env:MYSQL_PWD = $env:SQL_ADMIN_PASSWORD + $userExists = mysql ` --host $env:SQL_HOST ` --port $env:SQL_PORT ` diff --git a/Api.Data.SqLite/.github/workflows/build-and-deploy.yml b/Api.Data.SqLite/.github/workflows/build-and-deploy.yml index b079faaf..98d37063 100644 --- a/Api.Data.SqLite/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SqLite/.github/workflows/build-and-deploy.yml @@ -11,8 +11,9 @@ env: IMAGE_NAME: api.data.sqlite SERVICE_NAME: api-data-sqlite VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -34,9 +35,7 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} - SQL_NAME: nanoDb SQL_SIZE: 10Gi - SQL_MIGRATION_CONNECTIONSTRING: "Data Source=/mnt/data/{{ env.SQL_NAME }}.sqlite" concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -50,6 +49,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -59,18 +60,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -92,7 +94,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -114,19 +116,6 @@ jobs: throw "error"; }; - - name: Database Migration - shell: pwsh - run: | - dotnet ef database update ` - --no-build ` - --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - name: Kubernetes Deploy shell: pwsh run: | diff --git a/Api.Data.SqLite/.kubernetes/data-pvc.yaml b/Api.Data.SqLite/.kubernetes/data-pvc.yaml index 0b9d4415..00bca640 100644 --- a/Api.Data.SqLite/.kubernetes/data-pvc.yaml +++ b/Api.Data.SqLite/.kubernetes/data-pvc.yaml @@ -8,4 +8,4 @@ spec: storageClassName: %SERVICE_NAME%-data-storage-class resources: requests: - storage: %DATA_SIZE% \ No newline at end of file + storage: %SQL_SIZE% \ No newline at end of file diff --git a/Api.Data.SqLite/Api.Data.SqLite/appsettings.Development.json b/Api.Data.SqLite/Api.Data.SqLite/appsettings.Development.json index 8927ff99..29091fa5 100644 --- a/Api.Data.SqLite/Api.Data.SqLite/appsettings.Development.json +++ b/Api.Data.SqLite/Api.Data.SqLite/appsettings.Development.json @@ -1,5 +1,3 @@ { - "Data": { - "StartupAction": "Migrate" - } + } \ No newline at end of file diff --git a/Api.Data.SqLite/Api.Data.SqLite/appsettings.json b/Api.Data.SqLite/Api.Data.SqLite/appsettings.json index 496df4fb..8e51eb81 100644 --- a/Api.Data.SqLite/Api.Data.SqLite/appsettings.json +++ b/Api.Data.SqLite/Api.Data.SqLite/appsettings.json @@ -20,7 +20,7 @@ "BulkBatchSize": 500, "BulkBatchDelay": 1000, "QueryRetryCount": 0, - "StartupAction": "None", + "StartupAction": "Migrate", "UseLazyLoading": false, "UseSensitiveDataLogging": false, "QuerySplittingBehavior": "SingleQuery", diff --git a/Api.Data.SqLite/README.md b/Api.Data.SqLite/README.md index a3d97ec8..464dd2b5 100644 --- a/Api.Data.SqLite/README.md +++ b/Api.Data.SqLite/README.md @@ -92,13 +92,7 @@ Configured the application with the necessary data setup. } ``` -...and `appsettings.Development.json` - -```json -"Data": { - "StartupAction": "Migrate" -} -``` +> ⚠️ **Notice:** `StartupAction` is set to `migrate` in all environments. This may cause the pod to restart during the initial deployment. ## Docker Compose Added SqLite as a service dependency in `docker-compose.yml`. diff --git a/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml index 410a75a8..01f0b98e 100644 --- a/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml @@ -11,10 +11,12 @@ env: IMAGE_NAME: api.data.sqlserver.spatial SERVICE_NAME: api-data-sqlserver-spatial VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -51,6 +53,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -60,18 +64,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -93,7 +98,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -121,12 +126,15 @@ jobs: $env:SQL_HOST = az sql server list -g $env:AZURE_GROUP_DATABASE --query "[0].fullyQualifiedDomainName" -o tsv; $env:SQL_PORT = "1433" $env:SQL_ADMIN_USER = az sql server list -g $env:AZURE_GROUP_DATABASE --query "[0].administratorLogin" -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST,$env:SQL_PORT;Database=$env:SQL_NAME;User Id=$env:SQL_ADMIN_USER;Password=$env:SQL_ADMIN_PASSWORD;Encrypt=True;TrustServerCertificate=True;"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST,$env:SQL_PORT;Database=$env:SQL_NAME;User Id=$env:SQL_ADMIN_USER;Password=$env:SQL_ADMIN_PASSWORD;Encrypt=True;TrustServerCertificate=True;"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING"; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { diff --git a/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml b/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml index 62894a39..5dd4d2de 100644 --- a/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml @@ -11,10 +11,12 @@ env: IMAGE_NAME: api.data.sqlserver SERVICE_NAME: api-data-sqlserver VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -51,6 +53,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -60,18 +64,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -93,7 +98,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -121,12 +126,15 @@ jobs: $env:SQL_HOST = az sql server list -g $env:AZURE_GROUP_DATABASE --query "[0].fullyQualifiedDomainName" -o tsv; $env:SQL_PORT = "1433" $env:SQL_ADMIN_USER = az sql server list -g $env:AZURE_GROUP_DATABASE --query "[0].administratorLogin" -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST,$env:SQL_PORT;Database=$env:SQL_NAME;User Id=$env:SQL_ADMIN_USER;Password=$env:SQL_ADMIN_PASSWORD;Encrypt=True;TrustServerCertificate=True;"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST,$env:SQL_PORT;Database=$env:SQL_NAME;User Id=$env:SQL_ADMIN_USER;Password=$env:SQL_ADMIN_PASSWORD;Encrypt=True;TrustServerCertificate=True;"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING"; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { diff --git a/Api.Data.Triggers/.github/workflows/build-and-deploy.yml b/Api.Data.Triggers/.github/workflows/build-and-deploy.yml index 8d0ef285..1b1f3894 100644 --- a/Api.Data.Triggers/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Triggers/.github/workflows/build-and-deploy.yml @@ -11,10 +11,12 @@ env: IMAGE_NAME: api.data.triggers SERVICE_NAME: api-data-triggers VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_KUBERNETES_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -51,6 +53,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -60,18 +64,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -93,7 +98,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -121,18 +126,23 @@ jobs: $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName -o tsv; $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort -o tsv; $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Preferred"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Required"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING "; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; + $env:MYSQL_PWD = $env:SQL_ADMIN_PASSWORD + $userExists = mysql ` --host $env:SQL_HOST ` --port $env:SQL_PORT ` diff --git a/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml b/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml index cc190352..73247c78 100644 --- a/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml +++ b/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml @@ -12,8 +12,8 @@ env: SERVICE_NAME: api-documentation-csp SUB_DOMAIN_NAME: nano VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_GROUP_DNS: ${{ vars.AZURE_RESOURCE_GROUP_DNS }} @@ -49,6 +49,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -58,18 +60,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -91,7 +94,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.Documentation/.github/workflows/build-and-deploy.yml b/Api.Documentation/.github/workflows/build-and-deploy.yml index 1313d04a..e9adb1f4 100644 --- a/Api.Documentation/.github/workflows/build-and-deploy.yml +++ b/Api.Documentation/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.documentation SERVICE_NAME: api-documentation VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.ErrorHandling/.github/workflows/build-and-deploy.yml b/Api.ErrorHandling/.github/workflows/build-and-deploy.yml index 5e92bb65..7fda57f3 100644 --- a/Api.ErrorHandling/.github/workflows/build-and-deploy.yml +++ b/Api.ErrorHandling/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.errorhandling SERVICE_NAME: api-errorhandling VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml b/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml index ecb26cce..78474f84 100644 --- a/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml +++ b/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.eventing.rabbitmq SERVICE_NAME: api.eventing-rabbitmq VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.HealthChecks/.github/workflows/build-and-deploy.yml b/Api.HealthChecks/.github/workflows/build-and-deploy.yml index f89a693b..03c5fc44 100644 --- a/Api.HealthChecks/.github/workflows/build-and-deploy.yml +++ b/Api.HealthChecks/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.healthchecks SERVICE_NAME: api-healthchecks VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -49,6 +49,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -58,18 +60,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -91,7 +94,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.Hosting.Http/.github/workflows/build-and-deploy.yml b/Api.Hosting.Http/.github/workflows/build-and-deploy.yml index 90384258..08e06102 100644 --- a/Api.Hosting.Http/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.Http/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.hosting.http SERVICE_NAME: api-hosting-http VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.Hosting.Https/.github/workflows/build-and-deploy.yml b/Api.Hosting.Https/.github/workflows/build-and-deploy.yml index a934b4b4..99b5a968 100644 --- a/Api.Hosting.Https/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.Https/.github/workflows/build-and-deploy.yml @@ -12,11 +12,11 @@ env: SERVICE_NAME: api-hosting-https SUB_DOMAIN_NAME: nano VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} - AZURE_GROUP_DNS: ${{ vars.AZURE_RESOURCE_GROUP_DNS }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DNS: ${{ vars.AZURE_RESOURCE_GROUP_DNS }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -40,26 +40,39 @@ concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest + build-and-deploy: + runs-on: + - self-hosted + - linux + - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: - contents: read + contents: write packages: write steps: - uses: actions/checkout@v6 - - name: Build + - name: Azure Login + shell: pwsh + run: | + az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; + az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; + + $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; + az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; + + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -69,70 +82,44 @@ jobs: throw "error"; }; - - name: Publish Image + - name: Publish NuGet shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; - - docker build ` - -t "$($env:FULL_IMAGE_NAME):latest" ` - -t "$($env:FULL_IMAGE_NAME):$($env:VERSION)" ` - --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` - --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` - --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=$env:CONTAINER_REGISTRY_SOURCE_LABEL ` - --build-arg NUGET_HOST=$env:NUGET_HOST ` - --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` - --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` - ./; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - echo $env:CONTAINER_REGISTRY_PASSWORD | docker login $env:CONTAINER_REGISTRY_HOST -u $env:CONTAINER_REGISTRY_USERNAME --password-stdin; - - docker push "$($env:FULL_IMAGE_NAME):latest"; - docker push "$($env:FULL_IMAGE_NAME):$($env:VERSION)"; + $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; + dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; + dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; if ($LastExitCode -ne 0) { throw "error"; }; - - name: Publish NuGet + - name: Build & Push Image shell: pwsh run: | - $nugetProjectModels=$env:APP_NAME + ".Models/" + $env:APP_NAME + ".Models.csproj"; - dotnet pack $nugetProjectModels -c Release --output nupkgs /p:PackageVersion=$env:VERSION --include-symbols --no-build; - dotnet nuget push nupkgs/$env:APP_NAME".Models."$env:VERSION.nupkg -s $env:NUGET_HOST -k $env:NUGET_PASSWORD; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + + az acr build ` + --registry $env:CONTAINER_REGISTRY_HOST ` + -t "$($env:IMAGE_NAME):latest" ` + -t "$($env:IMAGE_NAME):$($env:VERSION)" ` + --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` + --build-arg DOTNET_ASPNET_VERSION=$env:DOTNET_ASPNET_VERSION ` + --build-arg CONTAINER_REGISTRY_SOURCE_LABEL=https://github.com/$env:GITHUB_REPOSITORY ` + --build-arg NUGET_HOST=$env:NUGET_HOST ` + --build-arg NUGET_USERNAME=$env:NUGET_USERNAME ` + --build-arg NUGET_PASSWORD=$env:NUGET_PASSWORD ` + ./ if ($LastExitCode -ne 0) { throw "error"; }; - deploy: - runs-on: - - self-hosted - - linux - - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} - needs: build - permissions: - contents: write - steps: - - name: Azure Login - shell: pwsh - run: | - az login --service-principal -u $env:AZURE_CLIENT_ID -p $env:AZURE_CLIENT_SECRET --tenant $env:AZURE_TENANT_ID -o none; - az account set -s $env:AZURE_SUBSCRIPTION_ID -o none; - - $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; - az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - name: Kubernetes Deploy shell: pwsh run: | - $env:FULL_IMAGE_NAME = $env:CONTAINER_REGISTRY_HOST + "/" + "${{ github.repository_owner }}".ToLower() + "/" + $env:IMAGE_NAME; + $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $zoneNames = az network dns zone list -g $env:AZURE_GROUP_DNS --query "[].name" -o json | ConvertFrom-Json @@ -145,28 +132,28 @@ jobs: $env:GATEWAY_NAME = kubectl get gateway -n $env:KUBERNETES_NAMESPACE -o jsonpath='{.items[0].metadata.name}' Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; - kubectl apply -f .kubernetes/service.tmp.yaml; + kubectl apply -f service.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; } Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; - kubectl apply -f .kubernetes/configmap.tmp.yaml; + kubectl apply -f configmap.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; } Get-Content .kubernetes/deployment.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/deployment.tmp.yaml; - kubectl apply -f .kubernetes/deployment.tmp.yaml; + kubectl apply -f deployment.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; } Get-Content .kubernetes/autoscaler.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/autoscaler.tmp.yaml; - kubectl apply -f .kubernetes/autoscaler.tmp.yaml; + kubectl apply -f autoscaler.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; diff --git a/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml b/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml index af80f33f..1848c227 100644 --- a/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.hosting.multipartlimits SERVICE_NAME: api-Hosting-multipartlimits VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.Localization/.github/workflows/build-and-deploy.yml b/Api.Localization/.github/workflows/build-and-deploy.yml index bb574c10..8aae5a35 100644 --- a/Api.Localization/.github/workflows/build-and-deploy.yml +++ b/Api.Localization/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.localization SERVICE_NAME: api-localization VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml b/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml index 751121cc..533ae16e 100644 --- a/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.logging.log4net SERVICE_NAME: api-logging-log4net VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml b/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml index 7537cd66..3725bc16 100644 --- a/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.logging.microsoft SERVICE_NAME: api-logging-microsoft VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.Logging.NLog/.github/workflows/build-and-deploy.yml b/Api.Logging.NLog/.github/workflows/build-and-deploy.yml index b5249f36..1dd0aef4 100644 --- a/Api.Logging.NLog/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.NLog/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.logging.nlog SERVICE_NAME: api-logging-nlog VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml b/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml index d90f3b76..e776fcb3 100644 --- a/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.logging.serilog SERVICE_NAME: api-logging-serilog VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.MultipartJson/.github/workflows/build-and-deploy.yml b/Api.MultipartJson/.github/workflows/build-and-deploy.yml index 9441aa69..e1e99118 100644 --- a/Api.MultipartJson/.github/workflows/build-and-deploy.yml +++ b/Api.MultipartJson/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.multipartjson SERVICE_NAME: api-multipartjson VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml index 54ebe5a7..ad1adc82 100644 --- a/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml @@ -12,8 +12,8 @@ env: SERVICE_NAME: api-policyheaders-contentsecuritypolicy SUB_DOMAIN_NAME: nano VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_DNS: ${{ vars.AZURE_RESOURCE_GROUP_DNS }} AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} @@ -49,6 +49,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -58,18 +60,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -91,7 +94,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml index 25192b2a..b39d1545 100644 --- a/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.policyheaders.contenttypeoptions SERVICE_NAME: api-policyheaders-contenttypeoptions VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml index 84487fe7..a044e29e 100644 --- a/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.policyheaders.cors SERVICE_NAME: api-policyheaders-cors VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml index a7d2ddeb..da413f08 100644 --- a/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.policyheaders.forwardedheaders SERVICE_NAME: api-policyheaders-forwardedheaders VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml index bcc6b606..f29d0b9b 100644 --- a/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.policyheaders.frameoptions SERVICE_NAME: api-policyheaders-frameoptions VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml index c99ad689..a92de032 100644 --- a/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml @@ -12,8 +12,8 @@ env: SERVICE_NAME: api-policyheaders-hsts SUB_DOMAIN_NAME: nano VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_GROUP_DNS: ${{ vars.AZURE_RESOURCE_GROUP_DNS }} @@ -49,6 +49,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -58,18 +60,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -91,7 +94,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml index 3dbdd303..32603e2e 100644 --- a/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.policyheaders.referrerpolicy SERVICE_NAME: api-policyheaders-referrerpolicy VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml index fc99b88c..03afe0f1 100644 --- a/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.policyheaders.robots SERVICE_NAME: api-policyheaders-robots VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml index f4c1a0a0..5f52df0c 100644 --- a/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.policyheaders.xssprotection SERVICE_NAME: api-policyheaders-xssprotection VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.RequestTracing/.github/workflows/build-and-deploy.yml b/Api.RequestTracing/.github/workflows/build-and-deploy.yml index bfe8acd6..a24f0f09 100644 --- a/Api.RequestTracing/.github/workflows/build-and-deploy.yml +++ b/Api.RequestTracing/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.requesttracing SERVICE_NAME: api-requesttracing VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.ResponseCache/.github/workflows/build-and-deploy.yml b/Api.ResponseCache/.github/workflows/build-and-deploy.yml index c7b4b90d..c362c709 100644 --- a/Api.ResponseCache/.github/workflows/build-and-deploy.yml +++ b/Api.ResponseCache/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.responsecache SERVICE_NAME: api-responsecache VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.ResponseCompression/.github/workflows/build-and-deploy.yml b/Api.ResponseCompression/.github/workflows/build-and-deploy.yml index 561ebc77..07b7f873 100644 --- a/Api.ResponseCompression/.github/workflows/build-and-deploy.yml +++ b/Api.ResponseCompression/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.responsecompression SERVICE_NAME: api-responsecompression VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.Session/.github/workflows/build-and-deploy.yml b/Api.Session/.github/workflows/build-and-deploy.yml index 6176eb7c..67172021 100644 --- a/Api.Session/.github/workflows/build-and-deploy.yml +++ b/Api.Session/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.session SERVICE_NAME: api-session VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.StartupTasks/.github/workflows/build-and-deploy.yml b/Api.StartupTasks/.github/workflows/build-and-deploy.yml index 99fd9651..2f57f13c 100644 --- a/Api.StartupTasks/.github/workflows/build-and-deploy.yml +++ b/Api.StartupTasks/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.startuptasks SERVICE_NAME: api-startuptasks VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.StaticFiles/.github/workflows/build-and-deploy.yml b/Api.StaticFiles/.github/workflows/build-and-deploy.yml index 05986356..601dabc0 100644 --- a/Api.StaticFiles/.github/workflows/build-and-deploy.yml +++ b/Api.StaticFiles/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.staticfiles SERVICE_NAME: api-staticfiles VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml index a7be7039..85bf3485 100644 --- a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -11,12 +11,12 @@ env: IMAGE_NAME: api.storage.azure SERVICE_NAME: api-storage-azure VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} - AZURE_GROUP_STORAGE: ${{ vars.AZURE_STORAGE_RESOURCE_GROUP }} - AZURE_GROUP_BACKUP: ${{ vars.AZURE_BACKUP_RESOURCE_GROUP }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_STORAGE: ${{ vars.AZURE_RESOURCE_GROUP_STORAGE }} + AZURE_GROUP_BACKUP: ${{ vars.AZURE_RESOURCE_GROUP_BACKUP }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -48,6 +48,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -57,18 +59,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -90,7 +93,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -131,27 +134,36 @@ jobs: --storage-account $env:STORAGE_ACCOUNT_NAME ` --access-tier TransactionOptimized ` --quota $env:STORAGE_SIZE; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - $env:BACKUP_VAULT_NAME = az backup vault list -g $env:AZURE_GROUP_BACKUP --query [0].name -o tsv; - - az backup protection enable-for-azurefileshare ` - -g $env:AZURE_GROUP_BACKUP ` - -v $env:BACKUP_VAULT_NAME ` - -p $env:STORAGE_ACCOUNT_NAME-backup-policy ` + } + else + { + az storage share-rm update ` + -g $env:AZURE_GROUP_STORAGE ` + -n $env:STORAGE_SHARE_NAME ` --storage-account $env:STORAGE_ACCOUNT_NAME ` - --azure-file-share $env:STORAGE_SHARE_NAME; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; + --access-tier TransactionOptimized ` + --quota $env:STORAGE_SIZE; } + if ($LastExitCode -ne 0) + { + throw "error"; + }; + + $env:BACKUP_VAULT_NAME = az backup vault list -g $env:AZURE_GROUP_BACKUP --query [0].name -o tsv; + + az backup protection enable-for-azurefileshare ` + -g $env:AZURE_GROUP_BACKUP ` + -v $env:BACKUP_VAULT_NAME ` + -p $env:STORAGE_ACCOUNT_NAME-fileshare-backup-policy ` + --storage-account $env:STORAGE_ACCOUNT_NAME ` + --azure-file-share $env:STORAGE_SHARE_NAME; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; + - name: Kubernetes Deploy shell: pwsh run: | diff --git a/Api.Storage.Local/.github/workflows/build-and-deploy.yml b/Api.Storage.Local/.github/workflows/build-and-deploy.yml index 84a03e58..d04ac2f0 100644 --- a/Api.Storage.Local/.github/workflows/build-and-deploy.yml +++ b/Api.Storage.Local/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.storage.local SERVICE_NAME: api-storage-local VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -48,6 +48,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -57,18 +59,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -90,7 +93,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.TimeZone/.github/workflows/build-and-deploy.yml b/Api.TimeZone/.github/workflows/build-and-deploy.yml index b3235383..345dc4ea 100644 --- a/Api.TimeZone/.github/workflows/build-and-deploy.yml +++ b/Api.TimeZone/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.timezone SERVICE_NAME: api-timezone VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.Versioning/.github/workflows/build-and-deploy.yml b/Api.Versioning/.github/workflows/build-and-deploy.yml index 9cad5519..8409464c 100644 --- a/Api.Versioning/.github/workflows/build-and-deploy.yml +++ b/Api.Versioning/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.versioning SERVICE_NAME: api-versioning VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api.VirusScan/.github/workflows/build-and-deploy.yml b/Api.VirusScan/.github/workflows/build-and-deploy.yml index 7df8a4d1..b2adf947 100644 --- a/Api.VirusScan/.github/workflows/build-and-deploy.yml +++ b/Api.VirusScan/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.virusscan SERVICE_NAME: api-virusscan VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Api._Blank/.github/workflows/build-and-deploy.yml b/Api._Blank/.github/workflows/build-and-deploy.yml index d10fb349..a5517158 100644 --- a/Api._Blank/.github/workflows/build-and-deploy.yml +++ b/Api._Blank/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: api.blank SERVICE_NAME: api-blank VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -46,6 +46,8 @@ jobs: permissions: contents: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -55,18 +57,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -88,7 +91,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml b/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml index 5368544c..6faeec8c 100644 --- a/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml +++ b/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml @@ -11,14 +11,14 @@ env: IMAGE_NAME: console.customconfigsection SERVICE_NAME: console-customconfigsection VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} @@ -43,6 +43,8 @@ jobs: permissions: contents: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -52,18 +54,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -73,7 +76,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Console.CustomService/.github/workflows/build-and-deploy.yml b/Console.CustomService/.github/workflows/build-and-deploy.yml index bc8c67fc..4cbc618e 100644 --- a/Console.CustomService/.github/workflows/build-and-deploy.yml +++ b/Console.CustomService/.github/workflows/build-and-deploy.yml @@ -11,14 +11,14 @@ env: IMAGE_NAME: console.customservice SERVICE_NAME: console-customservice VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} @@ -43,6 +43,8 @@ jobs: permissions: contents: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -52,18 +54,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -73,7 +76,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Console.Data.InMemory/.github/workflows/build-and-deploy.yml b/Console.Data.InMemory/.github/workflows/build-and-deploy.yml index c27e0954..38567047 100644 --- a/Console.Data.InMemory/.github/workflows/build-and-deploy.yml +++ b/Console.Data.InMemory/.github/workflows/build-and-deploy.yml @@ -11,14 +11,15 @@ env: IMAGE_NAME: console.data.inmemory SERVICE_NAME: console-data-inmemory VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} @@ -43,6 +44,8 @@ jobs: permissions: contents: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -52,18 +55,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -73,7 +77,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Console.Data.MySql/.github/workflows/build-and-deploy.yml b/Console.Data.MySql/.github/workflows/build-and-deploy.yml index 466fe30e..019c8fa2 100644 --- a/Console.Data.MySql/.github/workflows/build-and-deploy.yml +++ b/Console.Data.MySql/.github/workflows/build-and-deploy.yml @@ -11,14 +11,16 @@ env: IMAGE_NAME: console.data.mysql SERVICE_NAME: console-data-mysql VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} @@ -47,6 +49,8 @@ jobs: permissions: contents: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +60,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -77,7 +82,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -105,18 +110,23 @@ jobs: $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName -o tsv; $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort -o tsv; $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Preferred"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Required"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING "; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; + $env:MYSQL_PWD = $env:SQL_ADMIN_PASSWORD + $userExists = mysql ` --host $env:SQL_HOST ` --port $env:SQL_PORT ` diff --git a/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml b/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml index a65f8358..da1cf072 100644 --- a/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml +++ b/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml @@ -11,14 +11,16 @@ env: IMAGE_NAME: console.data.postgresql SERVICE_NAME: console-data-postgresql VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} @@ -47,6 +49,8 @@ jobs: permissions: contents: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +60,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -77,7 +82,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -107,10 +112,14 @@ jobs: $env:SQL_ADMIN_USER = az postgres flexible-server list -g $env:AZURE_GROUP_DATABASE --query "[0].username" -o tsv; $env:SQL_MIGRATION_CONNECTIONSTRING = "Host=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Username=$env:SQL_ADMIN_USER;Password=$env:SQL_ADMIN_PASSWORD;SSL Mode=Prefer;Trust Server Certificate=true"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = $env:SQL_MIGRATION_CONNECTIONSTRING; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING" `; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { diff --git a/Console.Data.SqLite/.github/workflows/build-and-deploy.yml b/Console.Data.SqLite/.github/workflows/build-and-deploy.yml index 6addb410..1100993d 100644 --- a/Console.Data.SqLite/.github/workflows/build-and-deploy.yml +++ b/Console.Data.SqLite/.github/workflows/build-and-deploy.yml @@ -11,14 +11,16 @@ env: IMAGE_NAME: console.data.sqlite SERVICE_NAME: console-data-sqlite VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} @@ -30,9 +32,7 @@ env: KUBERNETES_CPU_REQUEST: 50m KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" - SQL_NAME: nanoDb SQL_SIZE: 10Gi - SQL_CONNECTIONSTRING: "Data Source=/mnt/data/{{ env.SQL_NAME }}.sqlite" DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} @@ -46,6 +46,8 @@ jobs: permissions: contents: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -55,18 +57,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -76,7 +79,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -98,19 +101,6 @@ jobs: throw "error"; }; - - name: Database Migration - shell: pwsh - run: | - dotnet ef database update ` - --no-build ` - --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING"; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - name: Kubernetes Deploy shell: pwsh run: | diff --git a/Console.Data.SqLite/.kubernetes/data-pvc.yaml b/Console.Data.SqLite/.kubernetes/data-pvc.yaml index 0b9d4415..00bca640 100644 --- a/Console.Data.SqLite/.kubernetes/data-pvc.yaml +++ b/Console.Data.SqLite/.kubernetes/data-pvc.yaml @@ -8,4 +8,4 @@ spec: storageClassName: %SERVICE_NAME%-data-storage-class resources: requests: - storage: %DATA_SIZE% \ No newline at end of file + storage: %SQL_SIZE% \ No newline at end of file diff --git a/Console.Data.SqLite/Console.Data.SqLite/appsettings.Development.json b/Console.Data.SqLite/Console.Data.SqLite/appsettings.Development.json index 8927ff99..8593c62d 100644 --- a/Console.Data.SqLite/Console.Data.SqLite/appsettings.Development.json +++ b/Console.Data.SqLite/Console.Data.SqLite/appsettings.Development.json @@ -1,5 +1,2 @@ { - "Data": { - "StartupAction": "Migrate" - } } \ No newline at end of file diff --git a/Console.Data.SqLite/README.md b/Console.Data.SqLite/README.md index 5243192c..1317308d 100644 --- a/Console.Data.SqLite/README.md +++ b/Console.Data.SqLite/README.md @@ -74,13 +74,7 @@ Configured the application with the necessary data setup. } ``` -...and `appsettings.Development.json` - -```json -"Data": { - "StartupAction": "Migrate", -} -``` +> ⚠️ **Notice:** `StartupAction` is set to `migrate` in all environments. This may cause the pod to restart during the initial deployment. ## Docker Compose Added SqLite as a service dependency in `docker-compose.yml`. diff --git a/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml b/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml index 9803cd1a..daed50c6 100644 --- a/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml +++ b/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml @@ -11,14 +11,16 @@ env: IMAGE_NAME: console.data.sqlserver SERVICE_NAME: console-data-sqlserver VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" + DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} @@ -47,6 +49,8 @@ jobs: permissions: contents: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +60,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -77,7 +82,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -105,12 +110,15 @@ jobs: $env:SQL_HOST = az sql server list -g $env:AZURE_GROUP_DATABASE --query "[0].fullyQualifiedDomainName" -o tsv; $env:SQL_PORT = "1433" $env:SQL_ADMIN_USER = az sql server list -g $env:AZURE_GROUP_DATABASE --query "[0].administratorLogin" -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST,$env:SQL_PORT;Database=$env:SQL_NAME;User Id=$env:SQL_ADMIN_USER;Password=$env:SQL_ADMIN_PASSWORD;Encrypt=True;TrustServerCertificate=True;"; - dotnet ef database update ` + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST,$env:SQL_PORT;Database=$env:SQL_NAME;User Id=$env:SQL_ADMIN_USER;Password=$env:SQL_ADMIN_PASSWORD;Encrypt=True;TrustServerCertificate=True;"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` --no-build ` + --configuration Release ` --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING"; + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { diff --git a/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml b/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml index 454eea95..bb24d80b 100644 --- a/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml +++ b/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml @@ -11,14 +11,14 @@ env: IMAGE_NAME: console.eventing.rabbitmq SERVICE_NAME: console-eventing-rabbitmq VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} @@ -43,6 +43,8 @@ jobs: permissions: contents: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -52,18 +54,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -73,7 +76,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml b/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml index d0c01b07..a81c265c 100644 --- a/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml +++ b/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml @@ -11,14 +11,14 @@ env: IMAGE_NAME: console.exceptionhandling SERVICE_NAME: console-exceptionhandling VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} @@ -43,6 +43,8 @@ jobs: permissions: contents: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -52,18 +54,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -73,7 +76,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Console.Localization/.github/workflows/build-and-deploy.yml b/Console.Localization/.github/workflows/build-and-deploy.yml index bfc8af8d..78d205c0 100644 --- a/Console.Localization/.github/workflows/build-and-deploy.yml +++ b/Console.Localization/.github/workflows/build-and-deploy.yml @@ -11,14 +11,14 @@ env: IMAGE_NAME: console.localization SERVICE_NAME: console-localization VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} @@ -43,6 +43,8 @@ jobs: permissions: contents: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -52,18 +54,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -73,7 +76,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml b/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml index 096a4f75..13381058 100644 --- a/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml @@ -11,14 +11,14 @@ env: IMAGE_NAME: console.logging.log4net SERVICE_NAME: console-logging-log4net VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} @@ -43,6 +43,8 @@ jobs: permissions: contents: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -52,18 +54,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -73,7 +76,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml b/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml index 12903ee4..85508e80 100644 --- a/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml @@ -11,14 +11,14 @@ env: IMAGE_NAME: console.logging.microsoft SERVICE_NAME: console-logging-microsoft VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} @@ -43,6 +43,8 @@ jobs: permissions: contents: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -52,18 +54,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -73,7 +76,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Console.Logging.NLog/.github/workflows/build-and-deploy.yml b/Console.Logging.NLog/.github/workflows/build-and-deploy.yml index fa6702b3..0b754863 100644 --- a/Console.Logging.NLog/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.NLog/.github/workflows/build-and-deploy.yml @@ -11,14 +11,14 @@ env: IMAGE_NAME: console.logging.nlog SERVICE_NAME: console-logging-nlog VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} @@ -43,6 +43,8 @@ jobs: permissions: contents: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -52,18 +54,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -73,7 +76,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml b/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml index e51d080b..7051da62 100644 --- a/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml @@ -11,14 +11,14 @@ env: IMAGE_NAME: console.logging.serilog SERVICE_NAME: console-logging-serilog VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} @@ -43,6 +43,8 @@ jobs: permissions: contents: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -52,18 +54,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -73,7 +76,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Console.StartupTasks/.github/workflows/build-and-deploy.yml b/Console.StartupTasks/.github/workflows/build-and-deploy.yml index c201b68b..a22a017c 100644 --- a/Console.StartupTasks/.github/workflows/build-and-deploy.yml +++ b/Console.StartupTasks/.github/workflows/build-and-deploy.yml @@ -11,14 +11,14 @@ env: IMAGE_NAME: console.startuptasks SERVICE_NAME: console-startuptasks VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} @@ -43,6 +43,8 @@ jobs: permissions: contents: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -52,18 +54,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -73,7 +76,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml index 5c24ec60..b9da3e3c 100644 --- a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -11,16 +11,16 @@ env: IMAGE_NAME: console.storage.azure SERVICE_NAME: console-storage-azure VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} + AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_GROUP_STORAGE: ${{ vars.AZURE_RESOURCE_GROUP_STORAGE }} AZURE_GROUP_BACKUP: ${{ vars.AZURE_RESOURCE_GROUP_BACKUP }} - AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} @@ -47,6 +47,8 @@ jobs: permissions: contents: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -77,7 +80,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; @@ -118,27 +121,36 @@ jobs: --storage-account $env:STORAGE_ACCOUNT_NAME ` --access-tier TransactionOptimized ` --quota $env:STORAGE_SIZE; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - $env:BACKUP_VAULT_NAME = az backup vault list -g $env:AZURE_GROUP_BACKUP --query [0].name -o tsv; - - az backup protection enable-for-azurefileshare ` - -g $env:AZURE_GROUP_BACKUP ` - -v $env:BACKUP_VAULT_NAME ` - -p $env:STORAGE_ACCOUNT_NAME-backup-policy ` + } + else + { + az storage share-rm update ` + -g $env:AZURE_GROUP_STORAGE ` + -n $env:STORAGE_SHARE_NAME ` --storage-account $env:STORAGE_ACCOUNT_NAME ` - --azure-file-share $env:STORAGE_SHARE_NAME; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; + --access-tier TransactionOptimized ` + --quota $env:STORAGE_SIZE; } + if ($LastExitCode -ne 0) + { + throw "error"; + }; + + $env:BACKUP_VAULT_NAME = az backup vault list -g $env:AZURE_GROUP_BACKUP --query [0].name -o tsv; + + az backup protection enable-for-azurefileshare ` + -g $env:AZURE_GROUP_BACKUP ` + -v $env:BACKUP_VAULT_NAME ` + -p $env:STORAGE_ACCOUNT_NAME-fileshare-backup-policy ` + --storage-account $env:STORAGE_ACCOUNT_NAME ` + --azure-file-share $env:STORAGE_SHARE_NAME; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; + - name: Kubernetes Deploy shell: pwsh run: | diff --git a/Console.Storage.Local/.github/workflows/build-and-deploy.yml b/Console.Storage.Local/.github/workflows/build-and-deploy.yml index 0a6a629d..6aa4a371 100644 --- a/Console.Storage.Local/.github/workflows/build-and-deploy.yml +++ b/Console.Storage.Local/.github/workflows/build-and-deploy.yml @@ -11,14 +11,14 @@ env: IMAGE_NAME: console.storage.local SERVICE_NAME: console-storage-local VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} @@ -45,6 +45,8 @@ jobs: permissions: contents: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -54,18 +56,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -75,7 +78,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Console.Workers/.github/workflows/build-and-deploy.yml b/Console.Workers/.github/workflows/build-and-deploy.yml index 076a9a36..ce26bc8b 100644 --- a/Console.Workers/.github/workflows/build-and-deploy.yml +++ b/Console.Workers/.github/workflows/build-and-deploy.yml @@ -11,14 +11,14 @@ env: IMAGE_NAME: console.workers SERVICE_NAME: console-workers VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} @@ -43,6 +43,8 @@ jobs: permissions: contents: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -52,18 +54,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -73,7 +76,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Console._Blank/.github/workflows/build-and-deploy.yml b/Console._Blank/.github/workflows/build-and-deploy.yml index 61e580e1..ea7eff54 100644 --- a/Console._Blank/.github/workflows/build-and-deploy.yml +++ b/Console._Blank/.github/workflows/build-and-deploy.yml @@ -11,14 +11,14 @@ env: IMAGE_NAME: console.blank SERVICE_NAME: console-blank VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} - AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_SUBSCRIPTION_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_AZURE_SUBSCRIPTION_ID || secrets.STAGING_AZURE_SUBSCRIPTION_ID }} NUGET_HOST: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json NUGET_USERNAME: ${{ github.actor }} NUGET_PASSWORD: ${{ secrets.GITHUB_TOKEN }} @@ -43,6 +43,8 @@ jobs: permissions: contents: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -52,18 +54,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -73,7 +76,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; diff --git a/Web._Blank/.github/workflows/build-and-deploy.yml b/Web._Blank/.github/workflows/build-and-deploy.yml index 303d6b88..b53d429c 100644 --- a/Web._Blank/.github/workflows/build-and-deploy.yml +++ b/Web._Blank/.github/workflows/build-and-deploy.yml @@ -11,8 +11,8 @@ env: IMAGE_NAME: web.blank SERVICE_NAME: web-blank VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' - DOTNET_SDK_VERSION: 10.0 - DOTNET_ASPNET_VERSION: 10.0 + DOTNET_SDK_VERSION: "10.0" + DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -47,6 +47,8 @@ jobs: contents: write packages: write steps: + - uses: actions/checkout@v6 + - name: Azure Login shell: pwsh run: | @@ -56,18 +58,19 @@ jobs: $env:KUBERNETES_CLUSTER = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].name -o tsv; az aks get-credentials -g $env:AZURE_GROUP_KUBERNETES -n $env:KUBERNETES_CLUSTER --overwrite -o none; - - name: Build + - name: Build Solution shell: pwsh run: | dotnet nuget add source $env:NUGET_HOST -n private -u $env:NUGET_USERNAME -p $env:NUGET_PASSWORD --store-password-in-clear-text; dotnet build -c Release .\$env:APP_NAME.sln; + if ($LastExitCode -ne 0) { throw "error"; }; - - name: Test + - name: Test Solution shell: pwsh run: | dotnet test .\.tests\Tests.$env:APP_NAME\Tests.$env:APP_NAME.csproj; @@ -89,7 +92,7 @@ jobs: throw "error"; }; - - name: Build and Push Image + - name: Build & Push Image shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; From 8eb15b5c03d744b7d351b3aca6f93724b502c9cc Mon Sep 17 00:00:00 2001 From: vivet Date: Mon, 6 Jul 2026 18:01:31 +0200 Subject: [PATCH 08/33] Updated --- Api.ApiClients.Audit/.kubernetes/configmap.yaml | 2 +- Api.ApiClients.Entity/.kubernetes/configmap.yaml | 2 +- Api.ApiClients.RootLogIn/.kubernetes/configmap.yaml | 2 +- Api.ApiClients/.kubernetes/configmap.yaml | 2 +- Api.Auth.External.Custom/.kubernetes/configmap.yaml | 2 +- Api.Auth.RootLogin/.kubernetes/configmap.yaml | 2 +- Api.Authorization/.kubernetes/configmap.yaml | 2 +- Api.ContentNegotiation/.kubernetes/configmap.yaml | 2 +- Api.Cookies/.kubernetes/configmap.yaml | 2 +- Api.CustomConfigSection/.kubernetes/configmap.yaml | 2 +- Api.CustomMiddleware/.kubernetes/configmap.yaml | 2 +- Api.CustomService/.kubernetes/configmap.yaml | 2 +- Api.Data.Audit/.github/workflows/build-and-deploy.yml | 2 +- Api.Data.Audit/.kubernetes/auth-sql-secret.yaml | 2 +- Api.Data.Audit/.kubernetes/configmap.yaml | 2 +- Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml | 2 +- Api.Data.EntityEvents/.kubernetes/auth-sql-secret.yaml | 2 +- Api.Data.EntityEvents/.kubernetes/configmap.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 2 +- Api.Data.Identity.Auth.ApiKey/.kubernetes/auth-sql-secret.yaml | 2 +- Api.Data.Identity.Auth.ApiKey/.kubernetes/configmap.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 2 +- .../.kubernetes/auth-sql-secret.yaml | 2 +- .../.kubernetes/configmap.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 2 +- Api.Data.Identity.Auth.Jwt/.kubernetes/auth-sql-secret.yaml | 2 +- Api.Data.Identity.Auth.Jwt/.kubernetes/configmap.yaml | 2 +- Api.Data.Identity/.github/workflows/build-and-deploy.yml | 2 +- Api.Data.Identity/.kubernetes/auth-sql-secret.yaml | 2 +- Api.Data.Identity/.kubernetes/configmap.yaml | 2 +- Api.Data.InMemory/.kubernetes/configmap.yaml | 2 +- Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml | 2 +- Api.Data.LazyLoading/.kubernetes/auth-sql-secret.yaml | 2 +- Api.Data.LazyLoading/.kubernetes/configmap.yaml | 2 +- Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml | 2 +- Api.Data.MySql.Collation/.kubernetes/auth-sql-secret.yaml | 2 +- Api.Data.MySql.Collation/.kubernetes/configmap.yaml | 2 +- Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml | 2 +- Api.Data.MySql.Mappings/.kubernetes/auth-sql-secret.yaml | 2 +- Api.Data.MySql.Mappings/.kubernetes/configmap.yaml | 2 +- Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml | 2 +- Api.Data.MySql.Spatial/.kubernetes/auth-sql-secret.yaml | 2 +- Api.Data.MySql.Spatial/.kubernetes/configmap.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 2 +- .../.kubernetes/auth-sql-secret.yaml | 2 +- Api.Data.MySql.StoredProcedures/.kubernetes/configmap.yaml | 2 +- Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml | 2 +- Api.Data.MySql.Views/.kubernetes/auth-sql-secret.yaml | 2 +- Api.Data.MySql.Views/.kubernetes/configmap.yaml | 2 +- Api.Data.MySql/.github/workflows/build-and-deploy.yml | 2 +- Api.Data.MySql/.kubernetes/auth-sql-secret.yaml | 2 +- Api.Data.MySql/.kubernetes/configmap.yaml | 2 +- Api.Data.PostgreSQL.Spatial/.kubernetes/auth-sql-secret.yaml | 2 +- Api.Data.PostgreSQL.Spatial/.kubernetes/configmap.yaml | 2 +- Api.Data.PostgreSQL/.kubernetes/auth-sql-secret.yaml | 2 +- Api.Data.PostgreSQL/.kubernetes/configmap.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 2 +- Api.Data.Repository.AutoSave/.kubernetes/auth-sql-secret.yaml | 2 +- Api.Data.Repository.AutoSave/.kubernetes/configmap.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 2 +- Api.Data.Repository.Includes/.kubernetes/auth-sql-secret.yaml | 2 +- Api.Data.Repository.Includes/.kubernetes/configmap.yaml | 2 +- Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml | 2 +- Api.Data.SoftDelete/.kubernetes/auth-sql-secret.yaml | 2 +- Api.Data.SoftDelete/.kubernetes/configmap.yaml | 2 +- Api.Data.SqLite/.kubernetes/configmap.yaml | 2 +- Api.Data.SqlServer.Spatial/.kubernetes/auth-sql-secret.yaml | 2 +- Api.Data.SqlServer.Spatial/.kubernetes/configmap.yaml | 2 +- Api.Data.SqlServer/.kubernetes/auth-sql-secret.yaml | 2 +- Api.Data.SqlServer/.kubernetes/configmap.yaml | 2 +- Api.Data.Triggers/.github/workflows/build-and-deploy.yml | 2 +- Api.Data.Triggers/.kubernetes/auth-sql-secret.yaml | 2 +- Api.Data.Triggers/.kubernetes/configmap.yaml | 2 +- Api.Documentation/.kubernetes/configmap.yaml | 2 +- Api.ErrorHandling/.kubernetes/configmap.yaml | 2 +- Api.Eventing.RabbitMq/.kubernetes/configmap.yaml | 2 +- Api.HealthChecks/.kubernetes/configmap.yaml | 2 +- Api.Hosting.Http/.kubernetes/configmap.yaml | 2 +- Api.Hosting.Https/.kubernetes/configmap.yaml | 2 +- Api.Hosting.MultipartLimits/.kubernetes/configmap.yaml | 2 +- Api.Localization/.kubernetes/configmap.yaml | 2 +- Api.Logging.Log4Net/.kubernetes/configmap.yaml | 2 +- Api.Logging.Microsoft/.kubernetes/configmap.yaml | 2 +- Api.Logging.NLog/.kubernetes/configmap.yaml | 2 +- Api.Logging.Serilog/.kubernetes/configmap.yaml | 2 +- Api.MultipartJson/.kubernetes/configmap.yaml | 2 +- .../.kubernetes/configmap.yaml | 2 +- Api.PolicyHeaders.ContentTypeOptions/.kubernetes/configmap.yaml | 2 +- Api.PolicyHeaders.Cors/.kubernetes/configmap.yaml | 2 +- Api.PolicyHeaders.ForwardedHeaders/.kubernetes/configmap.yaml | 2 +- Api.PolicyHeaders.FrameOptions/.kubernetes/configmap.yaml | 2 +- Api.PolicyHeaders.Hsts/.kubernetes/configmap.yaml | 2 +- Api.PolicyHeaders.ReferrerPolicy/.kubernetes/configmap.yaml | 2 +- Api.PolicyHeaders.Robots/.kubernetes/configmap.yaml | 2 +- Api.PolicyHeaders.XssProtection/.kubernetes/configmap.yaml | 2 +- Api.RequestTracing/.kubernetes/configmap.yaml | 2 +- Api.ResponseCache/.kubernetes/configmap.yaml | 2 +- Api.ResponseCompression/.kubernetes/configmap.yaml | 2 +- Api.Session/.kubernetes/configmap.yaml | 2 +- Api.StartupTasks/.kubernetes/configmap.yaml | 2 +- Api.StaticFiles/.kubernetes/configmap.yaml | 2 +- Api.Storage.Azure/.kubernetes/configmap.yaml | 2 +- Api.Storage.Local/.kubernetes/configmap.yaml | 2 +- Api.TimeZone/.kubernetes/configmap.yaml | 2 +- Api.Versioning/.kubernetes/configmap.yaml | 2 +- Api.VirusScan/.kubernetes/configmap.yaml | 2 +- Api._Blank/.kubernetes/configmap.yaml | 2 +- Console.Data.MySql/.kubernetes/auth-sql-secret.yaml | 2 +- Console.Data.PostgreSQL/.kubernetes/auth-sql-secret.yaml | 2 +- Console.Data.SqlServer/.kubernetes/auth-sql-secret.yaml | 2 +- Web._Blank/.kubernetes/configmap.yaml | 2 +- 111 files changed, 111 insertions(+), 111 deletions(-) diff --git a/Api.ApiClients.Audit/.kubernetes/configmap.yaml b/Api.ApiClients.Audit/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.ApiClients.Audit/.kubernetes/configmap.yaml +++ b/Api.ApiClients.Audit/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.ApiClients.Entity/.kubernetes/configmap.yaml b/Api.ApiClients.Entity/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.ApiClients.Entity/.kubernetes/configmap.yaml +++ b/Api.ApiClients.Entity/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.ApiClients.RootLogIn/.kubernetes/configmap.yaml b/Api.ApiClients.RootLogIn/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.ApiClients.RootLogIn/.kubernetes/configmap.yaml +++ b/Api.ApiClients.RootLogIn/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.ApiClients/.kubernetes/configmap.yaml b/Api.ApiClients/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.ApiClients/.kubernetes/configmap.yaml +++ b/Api.ApiClients/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Auth.External.Custom/.kubernetes/configmap.yaml b/Api.Auth.External.Custom/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Auth.External.Custom/.kubernetes/configmap.yaml +++ b/Api.Auth.External.Custom/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Auth.RootLogin/.kubernetes/configmap.yaml b/Api.Auth.RootLogin/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Auth.RootLogin/.kubernetes/configmap.yaml +++ b/Api.Auth.RootLogin/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Authorization/.kubernetes/configmap.yaml b/Api.Authorization/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Authorization/.kubernetes/configmap.yaml +++ b/Api.Authorization/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.ContentNegotiation/.kubernetes/configmap.yaml b/Api.ContentNegotiation/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.ContentNegotiation/.kubernetes/configmap.yaml +++ b/Api.ContentNegotiation/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Cookies/.kubernetes/configmap.yaml b/Api.Cookies/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Cookies/.kubernetes/configmap.yaml +++ b/Api.Cookies/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.CustomConfigSection/.kubernetes/configmap.yaml b/Api.CustomConfigSection/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.CustomConfigSection/.kubernetes/configmap.yaml +++ b/Api.CustomConfigSection/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.CustomMiddleware/.kubernetes/configmap.yaml b/Api.CustomMiddleware/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.CustomMiddleware/.kubernetes/configmap.yaml +++ b/Api.CustomMiddleware/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.CustomService/.kubernetes/configmap.yaml b/Api.CustomService/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.CustomService/.kubernetes/configmap.yaml +++ b/Api.CustomService/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.Audit/.github/workflows/build-and-deploy.yml b/Api.Data.Audit/.github/workflows/build-and-deploy.yml index 16fc9b64..42a1ca33 100644 --- a/Api.Data.Audit/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Audit/.github/workflows/build-and-deploy.yml @@ -172,7 +172,7 @@ jobs: shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; + $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Audit/.kubernetes/auth-sql-secret.yaml b/Api.Data.Audit/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Api.Data.Audit/.kubernetes/auth-sql-secret.yaml +++ b/Api.Data.Audit/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Api.Data.Audit/.kubernetes/configmap.yaml b/Api.Data.Audit/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.Audit/.kubernetes/configmap.yaml +++ b/Api.Data.Audit/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml b/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml index 444b6dc7..6957000b 100644 --- a/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml +++ b/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml @@ -172,7 +172,7 @@ jobs: shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; + $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.EntityEvents/.kubernetes/auth-sql-secret.yaml b/Api.Data.EntityEvents/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Api.Data.EntityEvents/.kubernetes/auth-sql-secret.yaml +++ b/Api.Data.EntityEvents/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Api.Data.EntityEvents/.kubernetes/configmap.yaml b/Api.Data.EntityEvents/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.EntityEvents/.kubernetes/configmap.yaml +++ b/Api.Data.EntityEvents/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml index e0ee1dd8..9ed3ae7a 100644 --- a/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml @@ -175,7 +175,7 @@ jobs: shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; + $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Identity.Auth.ApiKey/.kubernetes/auth-sql-secret.yaml b/Api.Data.Identity.Auth.ApiKey/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Api.Data.Identity.Auth.ApiKey/.kubernetes/auth-sql-secret.yaml +++ b/Api.Data.Identity.Auth.ApiKey/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Api.Data.Identity.Auth.ApiKey/.kubernetes/configmap.yaml b/Api.Data.Identity.Auth.ApiKey/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.Identity.Auth.ApiKey/.kubernetes/configmap.yaml +++ b/Api.Data.Identity.Auth.ApiKey/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml index 1e878fde..9c6fbd9c 100644 --- a/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml @@ -174,7 +174,7 @@ jobs: shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; + $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Identity.Auth.External.Custom/.kubernetes/auth-sql-secret.yaml b/Api.Data.Identity.Auth.External.Custom/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Api.Data.Identity.Auth.External.Custom/.kubernetes/auth-sql-secret.yaml +++ b/Api.Data.Identity.Auth.External.Custom/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Api.Data.Identity.Auth.External.Custom/.kubernetes/configmap.yaml b/Api.Data.Identity.Auth.External.Custom/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.Identity.Auth.External.Custom/.kubernetes/configmap.yaml +++ b/Api.Data.Identity.Auth.External.Custom/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml index 4c070d71..f331341d 100644 --- a/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml @@ -174,7 +174,7 @@ jobs: shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; + $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Identity.Auth.Jwt/.kubernetes/auth-sql-secret.yaml b/Api.Data.Identity.Auth.Jwt/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Api.Data.Identity.Auth.Jwt/.kubernetes/auth-sql-secret.yaml +++ b/Api.Data.Identity.Auth.Jwt/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Api.Data.Identity.Auth.Jwt/.kubernetes/configmap.yaml b/Api.Data.Identity.Auth.Jwt/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.Identity.Auth.Jwt/.kubernetes/configmap.yaml +++ b/Api.Data.Identity.Auth.Jwt/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.Identity/.github/workflows/build-and-deploy.yml b/Api.Data.Identity/.github/workflows/build-and-deploy.yml index 4e38d7bb..48beaae6 100644 --- a/Api.Data.Identity/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity/.github/workflows/build-and-deploy.yml @@ -172,7 +172,7 @@ jobs: shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; + $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Identity/.kubernetes/auth-sql-secret.yaml b/Api.Data.Identity/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Api.Data.Identity/.kubernetes/auth-sql-secret.yaml +++ b/Api.Data.Identity/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Api.Data.Identity/.kubernetes/configmap.yaml b/Api.Data.Identity/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.Identity/.kubernetes/configmap.yaml +++ b/Api.Data.Identity/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.InMemory/.kubernetes/configmap.yaml b/Api.Data.InMemory/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.InMemory/.kubernetes/configmap.yaml +++ b/Api.Data.InMemory/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml b/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml index 2ff6e926..b9730a8f 100644 --- a/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml +++ b/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml @@ -172,7 +172,7 @@ jobs: shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; + $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.LazyLoading/.kubernetes/auth-sql-secret.yaml b/Api.Data.LazyLoading/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Api.Data.LazyLoading/.kubernetes/auth-sql-secret.yaml +++ b/Api.Data.LazyLoading/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Api.Data.LazyLoading/.kubernetes/configmap.yaml b/Api.Data.LazyLoading/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.LazyLoading/.kubernetes/configmap.yaml +++ b/Api.Data.LazyLoading/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml index a2fd3cdc..2b507307 100644 --- a/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml @@ -169,7 +169,7 @@ jobs: shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; + $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.MySql.Collation/.kubernetes/auth-sql-secret.yaml b/Api.Data.MySql.Collation/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Api.Data.MySql.Collation/.kubernetes/auth-sql-secret.yaml +++ b/Api.Data.MySql.Collation/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Api.Data.MySql.Collation/.kubernetes/configmap.yaml b/Api.Data.MySql.Collation/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.MySql.Collation/.kubernetes/configmap.yaml +++ b/Api.Data.MySql.Collation/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml index cccab4dd..5bcc4fb5 100644 --- a/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml @@ -172,7 +172,7 @@ jobs: shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; + $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.MySql.Mappings/.kubernetes/auth-sql-secret.yaml b/Api.Data.MySql.Mappings/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Api.Data.MySql.Mappings/.kubernetes/auth-sql-secret.yaml +++ b/Api.Data.MySql.Mappings/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Api.Data.MySql.Mappings/.kubernetes/configmap.yaml b/Api.Data.MySql.Mappings/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.MySql.Mappings/.kubernetes/configmap.yaml +++ b/Api.Data.MySql.Mappings/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml index a1be9f0d..4b03cf6e 100644 --- a/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml @@ -172,7 +172,7 @@ jobs: shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; + $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.MySql.Spatial/.kubernetes/auth-sql-secret.yaml b/Api.Data.MySql.Spatial/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Api.Data.MySql.Spatial/.kubernetes/auth-sql-secret.yaml +++ b/Api.Data.MySql.Spatial/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Api.Data.MySql.Spatial/.kubernetes/configmap.yaml b/Api.Data.MySql.Spatial/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.MySql.Spatial/.kubernetes/configmap.yaml +++ b/Api.Data.MySql.Spatial/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml index 0d73988b..7d8c1d69 100644 --- a/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml @@ -172,7 +172,7 @@ jobs: shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; + $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.MySql.StoredProcedures/.kubernetes/auth-sql-secret.yaml b/Api.Data.MySql.StoredProcedures/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Api.Data.MySql.StoredProcedures/.kubernetes/auth-sql-secret.yaml +++ b/Api.Data.MySql.StoredProcedures/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Api.Data.MySql.StoredProcedures/.kubernetes/configmap.yaml b/Api.Data.MySql.StoredProcedures/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.MySql.StoredProcedures/.kubernetes/configmap.yaml +++ b/Api.Data.MySql.StoredProcedures/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml index 6f4032c1..9b1d9172 100644 --- a/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml @@ -172,7 +172,7 @@ jobs: shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; + $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.MySql.Views/.kubernetes/auth-sql-secret.yaml b/Api.Data.MySql.Views/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Api.Data.MySql.Views/.kubernetes/auth-sql-secret.yaml +++ b/Api.Data.MySql.Views/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Api.Data.MySql.Views/.kubernetes/configmap.yaml b/Api.Data.MySql.Views/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.MySql.Views/.kubernetes/configmap.yaml +++ b/Api.Data.MySql.Views/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.MySql/.github/workflows/build-and-deploy.yml b/Api.Data.MySql/.github/workflows/build-and-deploy.yml index df98d6cc..5a800e1f 100644 --- a/Api.Data.MySql/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql/.github/workflows/build-and-deploy.yml @@ -172,7 +172,7 @@ jobs: shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; + $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.MySql/.kubernetes/auth-sql-secret.yaml b/Api.Data.MySql/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Api.Data.MySql/.kubernetes/auth-sql-secret.yaml +++ b/Api.Data.MySql/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Api.Data.MySql/.kubernetes/configmap.yaml b/Api.Data.MySql/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.MySql/.kubernetes/configmap.yaml +++ b/Api.Data.MySql/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.PostgreSQL.Spatial/.kubernetes/auth-sql-secret.yaml b/Api.Data.PostgreSQL.Spatial/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Api.Data.PostgreSQL.Spatial/.kubernetes/auth-sql-secret.yaml +++ b/Api.Data.PostgreSQL.Spatial/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Api.Data.PostgreSQL.Spatial/.kubernetes/configmap.yaml b/Api.Data.PostgreSQL.Spatial/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.PostgreSQL.Spatial/.kubernetes/configmap.yaml +++ b/Api.Data.PostgreSQL.Spatial/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.PostgreSQL/.kubernetes/auth-sql-secret.yaml b/Api.Data.PostgreSQL/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Api.Data.PostgreSQL/.kubernetes/auth-sql-secret.yaml +++ b/Api.Data.PostgreSQL/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Api.Data.PostgreSQL/.kubernetes/configmap.yaml b/Api.Data.PostgreSQL/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.PostgreSQL/.kubernetes/configmap.yaml +++ b/Api.Data.PostgreSQL/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml b/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml index 06c2edff..d4e274b0 100644 --- a/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml @@ -172,7 +172,7 @@ jobs: shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; + $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Repository.AutoSave/.kubernetes/auth-sql-secret.yaml b/Api.Data.Repository.AutoSave/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Api.Data.Repository.AutoSave/.kubernetes/auth-sql-secret.yaml +++ b/Api.Data.Repository.AutoSave/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Api.Data.Repository.AutoSave/.kubernetes/configmap.yaml b/Api.Data.Repository.AutoSave/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.Repository.AutoSave/.kubernetes/configmap.yaml +++ b/Api.Data.Repository.AutoSave/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml b/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml index c52a1ff3..08d1218e 100644 --- a/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml @@ -172,7 +172,7 @@ jobs: shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; + $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Repository.Includes/.kubernetes/auth-sql-secret.yaml b/Api.Data.Repository.Includes/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Api.Data.Repository.Includes/.kubernetes/auth-sql-secret.yaml +++ b/Api.Data.Repository.Includes/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Api.Data.Repository.Includes/.kubernetes/configmap.yaml b/Api.Data.Repository.Includes/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.Repository.Includes/.kubernetes/configmap.yaml +++ b/Api.Data.Repository.Includes/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml b/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml index 6ea8a898..9e2b194c 100644 --- a/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml @@ -172,7 +172,7 @@ jobs: shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; + $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.SoftDelete/.kubernetes/auth-sql-secret.yaml b/Api.Data.SoftDelete/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Api.Data.SoftDelete/.kubernetes/auth-sql-secret.yaml +++ b/Api.Data.SoftDelete/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Api.Data.SoftDelete/.kubernetes/configmap.yaml b/Api.Data.SoftDelete/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.SoftDelete/.kubernetes/configmap.yaml +++ b/Api.Data.SoftDelete/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.SqLite/.kubernetes/configmap.yaml b/Api.Data.SqLite/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.SqLite/.kubernetes/configmap.yaml +++ b/Api.Data.SqLite/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.SqlServer.Spatial/.kubernetes/auth-sql-secret.yaml b/Api.Data.SqlServer.Spatial/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Api.Data.SqlServer.Spatial/.kubernetes/auth-sql-secret.yaml +++ b/Api.Data.SqlServer.Spatial/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Api.Data.SqlServer.Spatial/.kubernetes/configmap.yaml b/Api.Data.SqlServer.Spatial/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.SqlServer.Spatial/.kubernetes/configmap.yaml +++ b/Api.Data.SqlServer.Spatial/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.SqlServer/.kubernetes/auth-sql-secret.yaml b/Api.Data.SqlServer/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Api.Data.SqlServer/.kubernetes/auth-sql-secret.yaml +++ b/Api.Data.SqlServer/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Api.Data.SqlServer/.kubernetes/configmap.yaml b/Api.Data.SqlServer/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.SqlServer/.kubernetes/configmap.yaml +++ b/Api.Data.SqlServer/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Data.Triggers/.github/workflows/build-and-deploy.yml b/Api.Data.Triggers/.github/workflows/build-and-deploy.yml index 1b1f3894..54431c6f 100644 --- a/Api.Data.Triggers/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Triggers/.github/workflows/build-and-deploy.yml @@ -172,7 +172,7 @@ jobs: shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; + $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Triggers/.kubernetes/auth-sql-secret.yaml b/Api.Data.Triggers/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Api.Data.Triggers/.kubernetes/auth-sql-secret.yaml +++ b/Api.Data.Triggers/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Api.Data.Triggers/.kubernetes/configmap.yaml b/Api.Data.Triggers/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Data.Triggers/.kubernetes/configmap.yaml +++ b/Api.Data.Triggers/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Documentation/.kubernetes/configmap.yaml b/Api.Documentation/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Documentation/.kubernetes/configmap.yaml +++ b/Api.Documentation/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.ErrorHandling/.kubernetes/configmap.yaml b/Api.ErrorHandling/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.ErrorHandling/.kubernetes/configmap.yaml +++ b/Api.ErrorHandling/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Eventing.RabbitMq/.kubernetes/configmap.yaml b/Api.Eventing.RabbitMq/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Eventing.RabbitMq/.kubernetes/configmap.yaml +++ b/Api.Eventing.RabbitMq/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.HealthChecks/.kubernetes/configmap.yaml b/Api.HealthChecks/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.HealthChecks/.kubernetes/configmap.yaml +++ b/Api.HealthChecks/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Hosting.Http/.kubernetes/configmap.yaml b/Api.Hosting.Http/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Hosting.Http/.kubernetes/configmap.yaml +++ b/Api.Hosting.Http/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Hosting.Https/.kubernetes/configmap.yaml b/Api.Hosting.Https/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Hosting.Https/.kubernetes/configmap.yaml +++ b/Api.Hosting.Https/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Hosting.MultipartLimits/.kubernetes/configmap.yaml b/Api.Hosting.MultipartLimits/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Hosting.MultipartLimits/.kubernetes/configmap.yaml +++ b/Api.Hosting.MultipartLimits/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Localization/.kubernetes/configmap.yaml b/Api.Localization/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Localization/.kubernetes/configmap.yaml +++ b/Api.Localization/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Logging.Log4Net/.kubernetes/configmap.yaml b/Api.Logging.Log4Net/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Logging.Log4Net/.kubernetes/configmap.yaml +++ b/Api.Logging.Log4Net/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Logging.Microsoft/.kubernetes/configmap.yaml b/Api.Logging.Microsoft/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Logging.Microsoft/.kubernetes/configmap.yaml +++ b/Api.Logging.Microsoft/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Logging.NLog/.kubernetes/configmap.yaml b/Api.Logging.NLog/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Logging.NLog/.kubernetes/configmap.yaml +++ b/Api.Logging.NLog/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Logging.Serilog/.kubernetes/configmap.yaml b/Api.Logging.Serilog/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Logging.Serilog/.kubernetes/configmap.yaml +++ b/Api.Logging.Serilog/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.MultipartJson/.kubernetes/configmap.yaml b/Api.MultipartJson/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.MultipartJson/.kubernetes/configmap.yaml +++ b/Api.MultipartJson/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.PolicyHeaders.ContentSecurityPolicy/.kubernetes/configmap.yaml b/Api.PolicyHeaders.ContentSecurityPolicy/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.PolicyHeaders.ContentSecurityPolicy/.kubernetes/configmap.yaml +++ b/Api.PolicyHeaders.ContentSecurityPolicy/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.PolicyHeaders.ContentTypeOptions/.kubernetes/configmap.yaml b/Api.PolicyHeaders.ContentTypeOptions/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.PolicyHeaders.ContentTypeOptions/.kubernetes/configmap.yaml +++ b/Api.PolicyHeaders.ContentTypeOptions/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.PolicyHeaders.Cors/.kubernetes/configmap.yaml b/Api.PolicyHeaders.Cors/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.PolicyHeaders.Cors/.kubernetes/configmap.yaml +++ b/Api.PolicyHeaders.Cors/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.PolicyHeaders.ForwardedHeaders/.kubernetes/configmap.yaml b/Api.PolicyHeaders.ForwardedHeaders/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.PolicyHeaders.ForwardedHeaders/.kubernetes/configmap.yaml +++ b/Api.PolicyHeaders.ForwardedHeaders/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.PolicyHeaders.FrameOptions/.kubernetes/configmap.yaml b/Api.PolicyHeaders.FrameOptions/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.PolicyHeaders.FrameOptions/.kubernetes/configmap.yaml +++ b/Api.PolicyHeaders.FrameOptions/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.PolicyHeaders.Hsts/.kubernetes/configmap.yaml b/Api.PolicyHeaders.Hsts/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.PolicyHeaders.Hsts/.kubernetes/configmap.yaml +++ b/Api.PolicyHeaders.Hsts/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.PolicyHeaders.ReferrerPolicy/.kubernetes/configmap.yaml b/Api.PolicyHeaders.ReferrerPolicy/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.PolicyHeaders.ReferrerPolicy/.kubernetes/configmap.yaml +++ b/Api.PolicyHeaders.ReferrerPolicy/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.PolicyHeaders.Robots/.kubernetes/configmap.yaml b/Api.PolicyHeaders.Robots/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.PolicyHeaders.Robots/.kubernetes/configmap.yaml +++ b/Api.PolicyHeaders.Robots/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.PolicyHeaders.XssProtection/.kubernetes/configmap.yaml b/Api.PolicyHeaders.XssProtection/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.PolicyHeaders.XssProtection/.kubernetes/configmap.yaml +++ b/Api.PolicyHeaders.XssProtection/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.RequestTracing/.kubernetes/configmap.yaml b/Api.RequestTracing/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.RequestTracing/.kubernetes/configmap.yaml +++ b/Api.RequestTracing/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.ResponseCache/.kubernetes/configmap.yaml b/Api.ResponseCache/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.ResponseCache/.kubernetes/configmap.yaml +++ b/Api.ResponseCache/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.ResponseCompression/.kubernetes/configmap.yaml b/Api.ResponseCompression/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.ResponseCompression/.kubernetes/configmap.yaml +++ b/Api.ResponseCompression/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Session/.kubernetes/configmap.yaml b/Api.Session/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Session/.kubernetes/configmap.yaml +++ b/Api.Session/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.StartupTasks/.kubernetes/configmap.yaml b/Api.StartupTasks/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.StartupTasks/.kubernetes/configmap.yaml +++ b/Api.StartupTasks/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.StaticFiles/.kubernetes/configmap.yaml b/Api.StaticFiles/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.StaticFiles/.kubernetes/configmap.yaml +++ b/Api.StaticFiles/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Storage.Azure/.kubernetes/configmap.yaml b/Api.Storage.Azure/.kubernetes/configmap.yaml index b64a515d..6b410e80 100644 --- a/Api.Storage.Azure/.kubernetes/configmap.yaml +++ b/Api.Storage.Azure/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Storage.Local/.kubernetes/configmap.yaml b/Api.Storage.Local/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Storage.Local/.kubernetes/configmap.yaml +++ b/Api.Storage.Local/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.TimeZone/.kubernetes/configmap.yaml b/Api.TimeZone/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.TimeZone/.kubernetes/configmap.yaml +++ b/Api.TimeZone/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.Versioning/.kubernetes/configmap.yaml b/Api.Versioning/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.Versioning/.kubernetes/configmap.yaml +++ b/Api.Versioning/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api.VirusScan/.kubernetes/configmap.yaml b/Api.VirusScan/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api.VirusScan/.kubernetes/configmap.yaml +++ b/Api.VirusScan/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Api._Blank/.kubernetes/configmap.yaml b/Api._Blank/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Api._Blank/.kubernetes/configmap.yaml +++ b/Api._Blank/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config diff --git a/Console.Data.MySql/.kubernetes/auth-sql-secret.yaml b/Console.Data.MySql/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Console.Data.MySql/.kubernetes/auth-sql-secret.yaml +++ b/Console.Data.MySql/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Console.Data.PostgreSQL/.kubernetes/auth-sql-secret.yaml b/Console.Data.PostgreSQL/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Console.Data.PostgreSQL/.kubernetes/auth-sql-secret.yaml +++ b/Console.Data.PostgreSQL/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Console.Data.SqlServer/.kubernetes/auth-sql-secret.yaml b/Console.Data.SqlServer/.kubernetes/auth-sql-secret.yaml index fffa83c4..9e6a2303 100644 --- a/Console.Data.SqlServer/.kubernetes/auth-sql-secret.yaml +++ b/Console.Data.SqlServer/.kubernetes/auth-sql-secret.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Secret metadata: - name: $env:SERVICE_NAME-sql-auth-secret + name: %SERVICE_NAME%-sql-auth-secret namespace: %KUBERNETES_NAMESPACE% type: Opaque stringData: diff --git a/Web._Blank/.kubernetes/configmap.yaml b/Web._Blank/.kubernetes/configmap.yaml index 3977c0ee..d13013d1 100644 --- a/Web._Blank/.kubernetes/configmap.yaml +++ b/Web._Blank/.kubernetes/configmap.yaml @@ -1,4 +1,4 @@ - apiVersion: v1 +apiVersion: v1 kind: ConfigMap metadata: name: %SERVICE_NAME%-config From a80c66e42a9779e7d9ea54c71a3ae1ead3adcd96 Mon Sep 17 00:00:00 2001 From: vivet Date: Mon, 6 Jul 2026 18:37:31 +0200 Subject: [PATCH 09/33] Updated --- Api.Data.EntityEvents/.kubernetes/deployment.yaml | 1 - Api.Eventing.RabbitMq/.kubernetes/deployment.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/Api.Data.EntityEvents/.kubernetes/deployment.yaml b/Api.Data.EntityEvents/.kubernetes/deployment.yaml index 759afb02..5181e537 100644 --- a/Api.Data.EntityEvents/.kubernetes/deployment.yaml +++ b/Api.Data.EntityEvents/.kubernetes/deployment.yaml @@ -48,7 +48,6 @@ spec: secretKeyRef: name: rabbitmq-auth key: username - envFrom: - name: Eventing__Credentials__Secret valueFrom: secretKeyRef: diff --git a/Api.Eventing.RabbitMq/.kubernetes/deployment.yaml b/Api.Eventing.RabbitMq/.kubernetes/deployment.yaml index c38046ad..c4aa90b6 100644 --- a/Api.Eventing.RabbitMq/.kubernetes/deployment.yaml +++ b/Api.Eventing.RabbitMq/.kubernetes/deployment.yaml @@ -43,7 +43,6 @@ spec: secretKeyRef: name: rabbitmq-auth key: username - envFrom: - name: Eventing__Credentials__Secret valueFrom: secretKeyRef: From 66ca02f22556f2c52de6987268cbc01fff414357 Mon Sep 17 00:00:00 2001 From: vivet Date: Tue, 7 Jul 2026 07:46:50 +0200 Subject: [PATCH 10/33] Updated --- Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml | 1 + Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml | 1 + Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml | 1 + Api.ApiClients/.github/workflows/build-and-deploy.yml | 1 + Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml | 1 + Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml | 1 + Api.Authorization/.github/workflows/build-and-deploy.yml | 1 + Api.ContentNegotiation/.github/workflows/build-and-deploy.yml | 1 + Api.Cookies/.github/workflows/build-and-deploy.yml | 1 + Api.CustomConfigSection/.github/workflows/build-and-deploy.yml | 1 + Api.CustomMiddleware/.github/workflows/build-and-deploy.yml | 1 + Api.CustomService/.github/workflows/build-and-deploy.yml | 1 + Api.Data.Audit/.github/workflows/build-and-deploy.yml | 1 + Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml | 1 + .../.github/workflows/build-and-deploy.yml | 1 + .../.github/workflows/build-and-deploy.yml | 1 + .../.github/workflows/build-and-deploy.yml | 1 + Api.Data.Identity/.github/workflows/build-and-deploy.yml | 1 + Api.Data.InMemory/.github/workflows/build-and-deploy.yml | 1 + Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml | 1 + Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml | 1 + Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml | 1 + Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml | 1 + .../.github/workflows/build-and-deploy.yml | 1 + Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml | 1 + Api.Data.MySql/.github/workflows/build-and-deploy.yml | 1 + .../.github/workflows/build-and-deploy.yml | 1 + Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml | 1 + .../.github/workflows/build-and-deploy.yml | 1 + .../.github/workflows/build-and-deploy.yml | 1 + Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml | 1 + .../.github/workflows/build-and-deploy.yml | 1 + Api.Data.SqlServer/.github/workflows/build-and-deploy.yml | 1 + Api.Data.Triggers/.github/workflows/build-and-deploy.yml | 1 + Api.Documentation.Csp/.github/workflows/build-and-deploy.yml | 1 + Api.Documentation/.github/workflows/build-and-deploy.yml | 1 + Api.ErrorHandling/.github/workflows/build-and-deploy.yml | 1 + Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml | 1 + Api.HealthChecks/.github/workflows/build-and-deploy.yml | 1 + Api.Hosting.Http/.github/workflows/build-and-deploy.yml | 1 + Api.Hosting.Https/.github/workflows/build-and-deploy.yml | 1 + .../.github/workflows/build-and-deploy.yml | 1 + Api.Localization/.github/workflows/build-and-deploy.yml | 1 + Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml | 1 + Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml | 1 + Api.Logging.NLog/.github/workflows/build-and-deploy.yml | 1 + Api.Logging.Serilog/.github/workflows/build-and-deploy.yml | 1 + Api.MultipartJson/.github/workflows/build-and-deploy.yml | 1 + .../.github/workflows/build-and-deploy.yml | 1 + .../.github/workflows/build-and-deploy.yml | 1 + Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml | 1 + .../.github/workflows/build-and-deploy.yml | 1 + .../.github/workflows/build-and-deploy.yml | 1 + Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml | 1 + .../.github/workflows/build-and-deploy.yml | 1 + Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml | 1 + .../.github/workflows/build-and-deploy.yml | 1 + Api.RequestTracing/.github/workflows/build-and-deploy.yml | 1 + Api.ResponseCache/.github/workflows/build-and-deploy.yml | 1 + Api.ResponseCompression/.github/workflows/build-and-deploy.yml | 1 + Api.Session/.github/workflows/build-and-deploy.yml | 1 + Api.StartupTasks/.github/workflows/build-and-deploy.yml | 1 + Api.StaticFiles/.github/workflows/build-and-deploy.yml | 1 + Api.Storage.Azure/.github/workflows/build-and-deploy.yml | 1 + Api.Storage.Local/.github/workflows/build-and-deploy.yml | 1 + Api.TimeZone/.github/workflows/build-and-deploy.yml | 1 + Api.Versioning/.github/workflows/build-and-deploy.yml | 1 + Api.VirusScan/.github/workflows/build-and-deploy.yml | 1 + Api._Blank/.github/workflows/build-and-deploy.yml | 1 + .../.github/workflows/build-and-deploy.yml | 1 + Console.CustomService/.github/workflows/build-and-deploy.yml | 1 + Console.Data.InMemory/.github/workflows/build-and-deploy.yml | 1 + Console.Data.MySql/.github/workflows/build-and-deploy.yml | 1 + Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml | 1 + Console.Data.SqLite/.github/workflows/build-and-deploy.yml | 1 + Console.Data.SqlServer/.github/workflows/build-and-deploy.yml | 1 + Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml | 1 + Console.ExceptionHandling/.github/workflows/build-and-deploy.yml | 1 + Console.Localization/.github/workflows/build-and-deploy.yml | 1 + Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml | 1 + Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml | 1 + Console.Logging.NLog/.github/workflows/build-and-deploy.yml | 1 + Console.Logging.Serilog/.github/workflows/build-and-deploy.yml | 1 + Console.StartupTasks/.github/workflows/build-and-deploy.yml | 1 + Console.Storage.Azure/.github/workflows/build-and-deploy.yml | 1 + Console.Storage.Local/.github/workflows/build-and-deploy.yml | 1 + Console.Workers/.github/workflows/build-and-deploy.yml | 1 + Console._Blank/.github/workflows/build-and-deploy.yml | 1 + Web._Blank/.github/workflows/build-and-deploy.yml | 1 + 89 files changed, 89 insertions(+) diff --git a/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml b/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml index 2776c348..f7d5b3a4 100644 --- a/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.ApiClients.Audit IMAGE_NAME: api.apiclients.audit diff --git a/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml b/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml index 9dfc4a17..93ecbabf 100644 --- a/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.ApiClients.Entity IMAGE_NAME: api.apiclients.entity diff --git a/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml b/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml index 31fbdc71..29ac3562 100644 --- a/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.ApiClients.RootLogIn IMAGE_NAME: api.apiclients.rootlogin diff --git a/Api.ApiClients/.github/workflows/build-and-deploy.yml b/Api.ApiClients/.github/workflows/build-and-deploy.yml index e26f7a80..b9844e7b 100644 --- a/Api.ApiClients/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.ApiClients IMAGE_NAME: api.apiclients diff --git a/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml b/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml index 3f005ac8..793da7fb 100644 --- a/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml +++ b/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Auth.External.Custom IMAGE_NAME: api.auth.external.custom diff --git a/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml b/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml index 540fd454..52296fa4 100644 --- a/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml +++ b/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Auth.RootLogin IMAGE_NAME: api.auth.rootlogin diff --git a/Api.Authorization/.github/workflows/build-and-deploy.yml b/Api.Authorization/.github/workflows/build-and-deploy.yml index c02a0a60..1d494a3b 100644 --- a/Api.Authorization/.github/workflows/build-and-deploy.yml +++ b/Api.Authorization/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Authorization IMAGE_NAME: api.authorization diff --git a/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml b/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml index 80867ca5..e71dc309 100644 --- a/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml +++ b/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.ContentNegotiation IMAGE_NAME: api.contentnegotiation diff --git a/Api.Cookies/.github/workflows/build-and-deploy.yml b/Api.Cookies/.github/workflows/build-and-deploy.yml index 2fb94635..74e573b1 100644 --- a/Api.Cookies/.github/workflows/build-and-deploy.yml +++ b/Api.Cookies/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Cookies IMAGE_NAME: api.cookies diff --git a/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml b/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml index c377b154..8c55f060 100644 --- a/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml +++ b/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.CustomConfigSection IMAGE_NAME: api.customconfigsection diff --git a/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml b/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml index 8ada7095..1540abd7 100644 --- a/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml +++ b/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.CustomMiddleware IMAGE_NAME: api.custommiddleware diff --git a/Api.CustomService/.github/workflows/build-and-deploy.yml b/Api.CustomService/.github/workflows/build-and-deploy.yml index 17d53bb4..6f5807eb 100644 --- a/Api.CustomService/.github/workflows/build-and-deploy.yml +++ b/Api.CustomService/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.CustomService IMAGE_NAME: api.customservice diff --git a/Api.Data.Audit/.github/workflows/build-and-deploy.yml b/Api.Data.Audit/.github/workflows/build-and-deploy.yml index 42a1ca33..614a9e88 100644 --- a/Api.Data.Audit/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Audit/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.Audit IMAGE_NAME: api.data.audit diff --git a/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml b/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml index 6957000b..51ca0b1a 100644 --- a/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml +++ b/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.EntityEvents IMAGE_NAME: api.data.entityevents diff --git a/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml index 9ed3ae7a..22c43e8b 100644 --- a/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.Identity.Auth.ApiKey IMAGE_NAME: api.data.identity.auth.apikey diff --git a/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml index 9c6fbd9c..2bfae90b 100644 --- a/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.Identity.Auth.External.Custom IMAGE_NAME: api.data.identity.auth.external.custom diff --git a/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml index f331341d..bb931d58 100644 --- a/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.Identity.Auth.Jwt IMAGE_NAME: api.data.identity.auth.jwt diff --git a/Api.Data.Identity/.github/workflows/build-and-deploy.yml b/Api.Data.Identity/.github/workflows/build-and-deploy.yml index 48beaae6..e9a3639b 100644 --- a/Api.Data.Identity/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.Identity IMAGE_NAME: api.data.identity diff --git a/Api.Data.InMemory/.github/workflows/build-and-deploy.yml b/Api.Data.InMemory/.github/workflows/build-and-deploy.yml index 4f04aac3..0c9200af 100644 --- a/Api.Data.InMemory/.github/workflows/build-and-deploy.yml +++ b/Api.Data.InMemory/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.InMemory IMAGE_NAME: api.data.inmemory diff --git a/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml b/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml index b9730a8f..5ffe3a74 100644 --- a/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml +++ b/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.LazyLoading IMAGE_NAME: api.data.lazyloading diff --git a/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml index 2b507307..162a5287 100644 --- a/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.MySql.Collation IMAGE_NAME: api.data.mysql.collation diff --git a/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml index 5bcc4fb5..de3e347b 100644 --- a/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.MySql.Mappings IMAGE_NAME: api.data.mysql.mappings diff --git a/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml index 4b03cf6e..69c2ee9d 100644 --- a/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.MySql.Spatial IMAGE_NAME: api.data.mysql.spatial diff --git a/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml index 7d8c1d69..4f95b4ce 100644 --- a/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.MySql.StoredProcedures IMAGE_NAME: api.data.mysql.storedprocedures diff --git a/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml index 9b1d9172..0d8cbf51 100644 --- a/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.MySql.Views IMAGE_NAME: api.data.mysql.views diff --git a/Api.Data.MySql/.github/workflows/build-and-deploy.yml b/Api.Data.MySql/.github/workflows/build-and-deploy.yml index 5a800e1f..2331ed36 100644 --- a/Api.Data.MySql/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.MySql IMAGE_NAME: api.data.mysql diff --git a/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml index 2fc9a24c..ceba69c4 100644 --- a/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.PostgreSQL.Spatial IMAGE_NAME: api.data.postgresql.spatial diff --git a/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml b/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml index 30c00704..c7bac2c8 100644 --- a/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml +++ b/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.PostgreSQL IMAGE_NAME: api.data.postgresql diff --git a/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml b/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml index d4e274b0..7bce87b3 100644 --- a/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.Repository.AutoSave IMAGE_NAME: api.data.repository.autosave diff --git a/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml b/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml index 08d1218e..77f491cf 100644 --- a/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.Repository.Includes IMAGE_NAME: api.data.repository.includes diff --git a/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml b/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml index 9e2b194c..aef2c81c 100644 --- a/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.SoftDelete IMAGE_NAME: api.data.softdelete diff --git a/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml index 01f0b98e..26779c74 100644 --- a/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.SqlServer.Spatial IMAGE_NAME: api.data.sqlserver.spatial diff --git a/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml b/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml index 5dd4d2de..14ee6315 100644 --- a/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.SqlServer IMAGE_NAME: api.data.sqlserver diff --git a/Api.Data.Triggers/.github/workflows/build-and-deploy.yml b/Api.Data.Triggers/.github/workflows/build-and-deploy.yml index 54431c6f..6b1c5ee0 100644 --- a/Api.Data.Triggers/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Triggers/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Data.Triggers IMAGE_NAME: api.data.triggers diff --git a/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml b/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml index 73247c78..1da5456a 100644 --- a/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml +++ b/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Documentation.Csp IMAGE_NAME: api.documentation.csp diff --git a/Api.Documentation/.github/workflows/build-and-deploy.yml b/Api.Documentation/.github/workflows/build-and-deploy.yml index e9adb1f4..b0abcabc 100644 --- a/Api.Documentation/.github/workflows/build-and-deploy.yml +++ b/Api.Documentation/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Documentation IMAGE_NAME: api.documentation diff --git a/Api.ErrorHandling/.github/workflows/build-and-deploy.yml b/Api.ErrorHandling/.github/workflows/build-and-deploy.yml index 7fda57f3..fe0e5ab6 100644 --- a/Api.ErrorHandling/.github/workflows/build-and-deploy.yml +++ b/Api.ErrorHandling/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - master + workflow_dispatch: env: APP_NAME: Api.ErrorHandling IMAGE_NAME: api.errorhandling diff --git a/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml b/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml index 78474f84..8f7e5e79 100644 --- a/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml +++ b/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Eventing.RabbitMq IMAGE_NAME: api.eventing.rabbitmq diff --git a/Api.HealthChecks/.github/workflows/build-and-deploy.yml b/Api.HealthChecks/.github/workflows/build-and-deploy.yml index 03c5fc44..b1643120 100644 --- a/Api.HealthChecks/.github/workflows/build-and-deploy.yml +++ b/Api.HealthChecks/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.HealthChecks IMAGE_NAME: api.healthchecks diff --git a/Api.Hosting.Http/.github/workflows/build-and-deploy.yml b/Api.Hosting.Http/.github/workflows/build-and-deploy.yml index 08e06102..dfd6d88d 100644 --- a/Api.Hosting.Http/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.Http/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Hosting.Http IMAGE_NAME: api.hosting.http diff --git a/Api.Hosting.Https/.github/workflows/build-and-deploy.yml b/Api.Hosting.Https/.github/workflows/build-and-deploy.yml index 99b5a968..919e14e1 100644 --- a/Api.Hosting.Https/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.Https/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Hosting.Https IMAGE_NAME: api.hosting.https diff --git a/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml b/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml index 1848c227..8ea33e28 100644 --- a/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Hosting.MultipartLimits IMAGE_NAME: api.hosting.multipartlimits diff --git a/Api.Localization/.github/workflows/build-and-deploy.yml b/Api.Localization/.github/workflows/build-and-deploy.yml index 8aae5a35..218e617e 100644 --- a/Api.Localization/.github/workflows/build-and-deploy.yml +++ b/Api.Localization/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Localization IMAGE_NAME: api.localization diff --git a/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml b/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml index 533ae16e..939b2b58 100644 --- a/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Logging.Log4Net IMAGE_NAME: api.logging.log4net diff --git a/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml b/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml index 3725bc16..e44d9aad 100644 --- a/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Logging.Microsoft IMAGE_NAME: api.logging.microsoft diff --git a/Api.Logging.NLog/.github/workflows/build-and-deploy.yml b/Api.Logging.NLog/.github/workflows/build-and-deploy.yml index 1dd0aef4..ad3d1420 100644 --- a/Api.Logging.NLog/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.NLog/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Logging.NLog IMAGE_NAME: api.logging.nlog diff --git a/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml b/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml index e776fcb3..c57a6e82 100644 --- a/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Logging.Serilog IMAGE_NAME: api.logging.serilog diff --git a/Api.MultipartJson/.github/workflows/build-and-deploy.yml b/Api.MultipartJson/.github/workflows/build-and-deploy.yml index e1e99118..bb62fb8c 100644 --- a/Api.MultipartJson/.github/workflows/build-and-deploy.yml +++ b/Api.MultipartJson/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.MultipartJson IMAGE_NAME: api.multipartjson diff --git a/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml index ad1adc82..ddf1f1d5 100644 --- a/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.PolicyHeaders.ContentSecurityPolicy IMAGE_NAME: api.policyheaders.contentsecuritypolicy diff --git a/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml index b39d1545..b1682962 100644 --- a/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.PolicyHeaders.ContentTypeOptions IMAGE_NAME: api.policyheaders.contenttypeoptions diff --git a/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml index a044e29e..b70e864d 100644 --- a/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.PolicyHeaders.Cors IMAGE_NAME: api.policyheaders.cors diff --git a/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml index da413f08..61f6060a 100644 --- a/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.PolicyHeaders.ForwardedHeaders IMAGE_NAME: api.policyheaders.forwardedheaders diff --git a/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml index f29d0b9b..1a469363 100644 --- a/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.PolicyHeaders.FrameOptions IMAGE_NAME: api.policyheaders.frameoptions diff --git a/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml index a92de032..e1870cb5 100644 --- a/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.PolicyHeaders.Hsts IMAGE_NAME: api.policyheaders.hsts diff --git a/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml index 32603e2e..64c1aed0 100644 --- a/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.PolicyHeaders.ReferrerPolicy IMAGE_NAME: api.policyheaders.referrerpolicy diff --git a/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml index 03afe0f1..43d0ca3e 100644 --- a/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.PolicyHeaders.Robots IMAGE_NAME: api.policyheaders.robots diff --git a/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml index 5f52df0c..065a6d15 100644 --- a/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.PolicyHeaders.XssProtection IMAGE_NAME: api.policyheaders.xssprotection diff --git a/Api.RequestTracing/.github/workflows/build-and-deploy.yml b/Api.RequestTracing/.github/workflows/build-and-deploy.yml index a24f0f09..9bd0ecdc 100644 --- a/Api.RequestTracing/.github/workflows/build-and-deploy.yml +++ b/Api.RequestTracing/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.RequestTracing IMAGE_NAME: api.requesttracing diff --git a/Api.ResponseCache/.github/workflows/build-and-deploy.yml b/Api.ResponseCache/.github/workflows/build-and-deploy.yml index c362c709..605d1746 100644 --- a/Api.ResponseCache/.github/workflows/build-and-deploy.yml +++ b/Api.ResponseCache/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.ResponseCache IMAGE_NAME: api.responsecache diff --git a/Api.ResponseCompression/.github/workflows/build-and-deploy.yml b/Api.ResponseCompression/.github/workflows/build-and-deploy.yml index 07b7f873..fcf33314 100644 --- a/Api.ResponseCompression/.github/workflows/build-and-deploy.yml +++ b/Api.ResponseCompression/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.ResponseCompression IMAGE_NAME: api.responsecompression diff --git a/Api.Session/.github/workflows/build-and-deploy.yml b/Api.Session/.github/workflows/build-and-deploy.yml index 67172021..0739e1dc 100644 --- a/Api.Session/.github/workflows/build-and-deploy.yml +++ b/Api.Session/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Session IMAGE_NAME: api.session diff --git a/Api.StartupTasks/.github/workflows/build-and-deploy.yml b/Api.StartupTasks/.github/workflows/build-and-deploy.yml index 2f57f13c..61448115 100644 --- a/Api.StartupTasks/.github/workflows/build-and-deploy.yml +++ b/Api.StartupTasks/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.StartupTasks IMAGE_NAME: api.startuptasks diff --git a/Api.StaticFiles/.github/workflows/build-and-deploy.yml b/Api.StaticFiles/.github/workflows/build-and-deploy.yml index 601dabc0..52620627 100644 --- a/Api.StaticFiles/.github/workflows/build-and-deploy.yml +++ b/Api.StaticFiles/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.StaticFiles IMAGE_NAME: api.staticfiles diff --git a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml index 85bf3485..d3a44c36 100644 --- a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Storage.Azure IMAGE_NAME: api.storage.azure diff --git a/Api.Storage.Local/.github/workflows/build-and-deploy.yml b/Api.Storage.Local/.github/workflows/build-and-deploy.yml index d04ac2f0..316d6a1b 100644 --- a/Api.Storage.Local/.github/workflows/build-and-deploy.yml +++ b/Api.Storage.Local/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Storage.Local IMAGE_NAME: api.storage.local diff --git a/Api.TimeZone/.github/workflows/build-and-deploy.yml b/Api.TimeZone/.github/workflows/build-and-deploy.yml index 345dc4ea..2a65df79 100644 --- a/Api.TimeZone/.github/workflows/build-and-deploy.yml +++ b/Api.TimeZone/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.TimeZone IMAGE_NAME: api.timezone diff --git a/Api.Versioning/.github/workflows/build-and-deploy.yml b/Api.Versioning/.github/workflows/build-and-deploy.yml index 8409464c..1d1a8036 100644 --- a/Api.Versioning/.github/workflows/build-and-deploy.yml +++ b/Api.Versioning/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Versioning IMAGE_NAME: api.versioning diff --git a/Api.VirusScan/.github/workflows/build-and-deploy.yml b/Api.VirusScan/.github/workflows/build-and-deploy.yml index b2adf947..e9a2f9b7 100644 --- a/Api.VirusScan/.github/workflows/build-and-deploy.yml +++ b/Api.VirusScan/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.VirusScan IMAGE_NAME: api.virusscan diff --git a/Api._Blank/.github/workflows/build-and-deploy.yml b/Api._Blank/.github/workflows/build-and-deploy.yml index a5517158..7ccd8c9d 100644 --- a/Api._Blank/.github/workflows/build-and-deploy.yml +++ b/Api._Blank/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Api.Blank IMAGE_NAME: api.blank diff --git a/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml b/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml index 6faeec8c..fc99ef68 100644 --- a/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml +++ b/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Console.CustomConfigSection IMAGE_NAME: console.customconfigsection diff --git a/Console.CustomService/.github/workflows/build-and-deploy.yml b/Console.CustomService/.github/workflows/build-and-deploy.yml index 4cbc618e..765f3cbc 100644 --- a/Console.CustomService/.github/workflows/build-and-deploy.yml +++ b/Console.CustomService/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Console.CustomService IMAGE_NAME: console.customservice diff --git a/Console.Data.InMemory/.github/workflows/build-and-deploy.yml b/Console.Data.InMemory/.github/workflows/build-and-deploy.yml index 38567047..bc26e347 100644 --- a/Console.Data.InMemory/.github/workflows/build-and-deploy.yml +++ b/Console.Data.InMemory/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Console.Data.InMemory IMAGE_NAME: console.data.inmemory diff --git a/Console.Data.MySql/.github/workflows/build-and-deploy.yml b/Console.Data.MySql/.github/workflows/build-and-deploy.yml index 019c8fa2..804d8f73 100644 --- a/Console.Data.MySql/.github/workflows/build-and-deploy.yml +++ b/Console.Data.MySql/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Console.Data.MySql IMAGE_NAME: console.data.mysql diff --git a/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml b/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml index da1cf072..41c280a3 100644 --- a/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml +++ b/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Console.Data.PostgreSQL IMAGE_NAME: console.data.postgresql diff --git a/Console.Data.SqLite/.github/workflows/build-and-deploy.yml b/Console.Data.SqLite/.github/workflows/build-and-deploy.yml index 1100993d..b35fcbd9 100644 --- a/Console.Data.SqLite/.github/workflows/build-and-deploy.yml +++ b/Console.Data.SqLite/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Console.Data.SqLite IMAGE_NAME: console.data.sqlite diff --git a/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml b/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml index daed50c6..43912b38 100644 --- a/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml +++ b/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Console.Data.SqlServer IMAGE_NAME: console.data.sqlserver diff --git a/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml b/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml index bb24d80b..d8d8edfe 100644 --- a/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml +++ b/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Console.Eventing.RabbitMq IMAGE_NAME: console.eventing.rabbitmq diff --git a/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml b/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml index a81c265c..8a8ebb1f 100644 --- a/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml +++ b/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Console.ExceptionHandling IMAGE_NAME: console.exceptionhandling diff --git a/Console.Localization/.github/workflows/build-and-deploy.yml b/Console.Localization/.github/workflows/build-and-deploy.yml index 78d205c0..e2ed19bf 100644 --- a/Console.Localization/.github/workflows/build-and-deploy.yml +++ b/Console.Localization/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Console.Localization IMAGE_NAME: console.localization diff --git a/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml b/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml index 13381058..3639a334 100644 --- a/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Console.Logging.Log4Net IMAGE_NAME: console.logging.log4net diff --git a/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml b/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml index 85508e80..06017e2a 100644 --- a/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Console.Logging.Microsoft IMAGE_NAME: console.logging.microsoft diff --git a/Console.Logging.NLog/.github/workflows/build-and-deploy.yml b/Console.Logging.NLog/.github/workflows/build-and-deploy.yml index 0b754863..d0341238 100644 --- a/Console.Logging.NLog/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.NLog/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Console.Logging.NLog IMAGE_NAME: console.logging.nlog diff --git a/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml b/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml index 7051da62..cbdf8894 100644 --- a/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Console.Logging.Serilog IMAGE_NAME: console.logging.serilog diff --git a/Console.StartupTasks/.github/workflows/build-and-deploy.yml b/Console.StartupTasks/.github/workflows/build-and-deploy.yml index a22a017c..6ab67b7f 100644 --- a/Console.StartupTasks/.github/workflows/build-and-deploy.yml +++ b/Console.StartupTasks/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Console.StartupTasks IMAGE_NAME: console.startuptasks diff --git a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml index b9da3e3c..e9e277b8 100644 --- a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Console.Storage.Azure IMAGE_NAME: console.storage.azure diff --git a/Console.Storage.Local/.github/workflows/build-and-deploy.yml b/Console.Storage.Local/.github/workflows/build-and-deploy.yml index 6aa4a371..457296e8 100644 --- a/Console.Storage.Local/.github/workflows/build-and-deploy.yml +++ b/Console.Storage.Local/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Console.Storage.Local IMAGE_NAME: console.storage.local diff --git a/Console.Workers/.github/workflows/build-and-deploy.yml b/Console.Workers/.github/workflows/build-and-deploy.yml index ce26bc8b..9e41cfdf 100644 --- a/Console.Workers/.github/workflows/build-and-deploy.yml +++ b/Console.Workers/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Console.Workers IMAGE_NAME: console.workers diff --git a/Console._Blank/.github/workflows/build-and-deploy.yml b/Console._Blank/.github/workflows/build-and-deploy.yml index ea7eff54..573c6713 100644 --- a/Console._Blank/.github/workflows/build-and-deploy.yml +++ b/Console._Blank/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Console.Blank IMAGE_NAME: console.blank diff --git a/Web._Blank/.github/workflows/build-and-deploy.yml b/Web._Blank/.github/workflows/build-and-deploy.yml index b53d429c..8e5343d7 100644 --- a/Web._Blank/.github/workflows/build-and-deploy.yml +++ b/Web._Blank/.github/workflows/build-and-deploy.yml @@ -6,6 +6,7 @@ on: push: branches: - main + workflow_dispatch: env: APP_NAME: Web.Blank IMAGE_NAME: web.blank From 8672bb27d815a2eb5ddfad035640835a2bf2b87f Mon Sep 17 00:00:00 2001 From: vivet Date: Tue, 7 Jul 2026 11:33:59 +0200 Subject: [PATCH 11/33] Updated --- Api.Storage.Azure/README.md | 61 +++++++++++++++++++-------------- Console.Storage.Azure/README.md | 61 +++++++++++++++++++-------------- 2 files changed, 70 insertions(+), 52 deletions(-) diff --git a/Api.Storage.Azure/README.md b/Api.Storage.Azure/README.md index ef57a236..e6da4a72 100644 --- a/Api.Storage.Azure/README.md +++ b/Api.Storage.Azure/README.md @@ -115,8 +115,8 @@ Add the following environment variables to the `buid-and-deply.yml`. ```yaml env: - AZURE_GROUP_BACKUP: ${{ vars.AZURE_BACKUP_RESOURCE_GROUP }} - AZURE_GROUP_STORAGE: ${{ vars.AZURE_STORAGE_RESOURCE_GROUP }} + AZURE_GROUP_BACKUP: ${{ vars.AZURE_RESOURCE_GROUP_BACKUP }} + AZURE_GROUP_STORAGE: ${{ vars.AZURE_RESOURCE_GROUP_STORAGE }} STORAGE_SIZE: 1000 STORAGE_SHARE_NAME: nano-storage-azure ``` @@ -125,11 +125,11 @@ And add this step below as well, ensuring that the fileshare gets created before ```yaml - name: Create Fileshare - shell: pwsh - run: | - $env:STORAGE_ACCOUNT_NAME = sudo az storage account list -g $env:AZURE_GROUP_STORAGE --query [0].name -o tsv; +shell: pwsh +run: | + $env:STORAGE_ACCOUNT_NAME = az storage account list -g $env:AZURE_GROUP_STORAGE --query [0].name -o tsv; - $env:FILE_SHARE_EXISTS = sudo az storage share-rm exists ` + $env:FILE_SHARE_EXISTS = az storage share-rm exists ` -g $env:AZURE_GROUP_STORAGE ` -n $env:STORAGE_SHARE_NAME ` --storage-account $env:STORAGE_ACCOUNT_NAME ` @@ -137,30 +137,39 @@ And add this step below as well, ensuring that the fileshare gets created before if ($env:FILE_SHARE_EXISTS -eq "false") { - sudo az storage share-rm create ` + az storage share-rm create ` -g $env:AZURE_GROUP_STORAGE ` -n $env:STORAGE_SHARE_NAME ` --storage-account $env:STORAGE_ACCOUNT_NAME ` --access-tier TransactionOptimized ` --quota $env:STORAGE_SIZE; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - $env:BACKUP_VAULT_NAME = sudo az backup vault list -g $env:AZURE_GROUP_BACKUP --query [0].name -o tsv; - - sudo az backup protection enable-for-azurefileshare ` - -g $env:AZURE_GROUP_BACKUP ` - -v $env:BACKUP_VAULT_NAME ` - -p $env:STORAGE_ACCOUNT_NAME-backup-policy ` + } + else + { + az storage share-rm update ` + -g $env:AZURE_GROUP_STORAGE ` + -n $env:STORAGE_SHARE_NAME ` --storage-account $env:STORAGE_ACCOUNT_NAME ` - --azure-file-share $env:STORAGE_SHARE_NAME; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; + --access-tier TransactionOptimized ` + --quota $env:STORAGE_SIZE; } -``` \ No newline at end of file + + if ($LastExitCode -ne 0) + { + throw "error"; + }; + + $env:BACKUP_VAULT_NAME = az backup vault list -g $env:AZURE_GROUP_BACKUP --query [0].name -o tsv; + + az backup protection enable-for-azurefileshare ` + -g $env:AZURE_GROUP_BACKUP ` + -v $env:BACKUP_VAULT_NAME ` + -p $env:STORAGE_ACCOUNT_NAME-fileshare-backup-policy ` + --storage-account $env:STORAGE_ACCOUNT_NAME ` + --azure-file-share $env:STORAGE_SHARE_NAME; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; +``` diff --git a/Console.Storage.Azure/README.md b/Console.Storage.Azure/README.md index c34a6225..61ac5519 100644 --- a/Console.Storage.Azure/README.md +++ b/Console.Storage.Azure/README.md @@ -84,8 +84,8 @@ Add the following environment variables to the `buid-and-deply.yml`. ```yaml env: - AZURE_GROUP_BACKUP: ${{ vars.AZURE_BACKUP_RESOURCE_GROUP }} - AZURE_GROUP_STORAGE: ${{ vars.AZURE_STORAGE_RESOURCE_GROUP }} + AZURE_GROUP_BACKUP: ${{ vars.AZURE_RESOURCE_GROUP_BACKUP }} + AZURE_GROUP_STORAGE: ${{ vars.AZURE_RESOURCE_GROUP_STORAGE }} STORAGE_SIZE: 1000 STORAGE_SHARE_NAME: nano-storage-azure ``` @@ -94,11 +94,11 @@ Additionally, this step has been added to ensure the file share is created befor ```yaml - name: Create Fileshare - shell: pwsh - run: | - $env:STORAGE_ACCOUNT_NAME = sudo az storage account list -g $env:AZURE_GROUP_STORAGE --query [0].name -o tsv; +shell: pwsh +run: | + $env:STORAGE_ACCOUNT_NAME = az storage account list -g $env:AZURE_GROUP_STORAGE --query [0].name -o tsv; - $env:FILE_SHARE_EXISTS = sudo az storage share-rm exists ` + $env:FILE_SHARE_EXISTS = az storage share-rm exists ` -g $env:AZURE_GROUP_STORAGE ` -n $env:STORAGE_SHARE_NAME ` --storage-account $env:STORAGE_ACCOUNT_NAME ` @@ -106,30 +106,39 @@ Additionally, this step has been added to ensure the file share is created befor if ($env:FILE_SHARE_EXISTS -eq "false") { - sudo az storage share-rm create ` + az storage share-rm create ` -g $env:AZURE_GROUP_STORAGE ` -n $env:STORAGE_SHARE_NAME ` --storage-account $env:STORAGE_ACCOUNT_NAME ` --access-tier TransactionOptimized ` --quota $env:STORAGE_SIZE; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - - $env:BACKUP_VAULT_NAME = sudo az backup vault list -g $env:AZURE_GROUP_BACKUP --query [0].name -o tsv; - - sudo az backup protection enable-for-azurefileshare ` - -g $env:AZURE_GROUP_BACKUP ` - -v $env:BACKUP_VAULT_NAME ` - -p $env:STORAGE_ACCOUNT_NAME-backup-policy ` + } + else + { + az storage share-rm update ` + -g $env:AZURE_GROUP_STORAGE ` + -n $env:STORAGE_SHARE_NAME ` --storage-account $env:STORAGE_ACCOUNT_NAME ` - --azure-file-share $env:STORAGE_SHARE_NAME; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; + --access-tier TransactionOptimized ` + --quota $env:STORAGE_SIZE; } -``` \ No newline at end of file + + if ($LastExitCode -ne 0) + { + throw "error"; + }; + + $env:BACKUP_VAULT_NAME = az backup vault list -g $env:AZURE_GROUP_BACKUP --query [0].name -o tsv; + + az backup protection enable-for-azurefileshare ` + -g $env:AZURE_GROUP_BACKUP ` + -v $env:BACKUP_VAULT_NAME ` + -p $env:STORAGE_ACCOUNT_NAME-fileshare-backup-policy ` + --storage-account $env:STORAGE_ACCOUNT_NAME ` + --azure-file-share $env:STORAGE_SHARE_NAME; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; +``` From 8d99e6f5ec1ca1e095a514b42488383a167ba377 Mon Sep 17 00:00:00 2001 From: vivet Date: Tue, 7 Jul 2026 14:22:55 +0200 Subject: [PATCH 12/33] Updated --- .../.github/workflows/build-and-deploy.yml | 8 +++++ Api.Storage.Azure/.kubernetes/deployment.yaml | 3 +- .../.kubernetes/service-account.yaml | 7 ++++ Api.Storage.Azure/.kubernetes/storage-pv.yaml | 5 ++- Api.Storage.Azure/README.md | 2 +- .../.github/workflows/build-and-deploy.yml | 8 +++++ .../.kubernetes/cronjob.yaml | 3 +- .../.kubernetes/service-account.yaml | 7 ++++ .../.kubernetes/storage-pv.yaml | 5 ++- Console.Storage.Azure/README.md | 34 +++++++++++-------- 10 files changed, 63 insertions(+), 19 deletions(-) create mode 100644 Api.Storage.Azure/.kubernetes/service-account.yaml create mode 100644 Console.Storage.Azure/.kubernetes/service-account.yaml diff --git a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml index d3a44c36..963a25f5 100644 --- a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -169,6 +169,14 @@ jobs: shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + $env:STORAGE_IDENTITY_CLIENT_ID = az identity list -g $env:AZURE_GROUP_STORAGE --query [0].clientId -o tsv; + + Get-Content .kubernetes/service-account.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service-account.tmp.yaml; + kubectl apply -f .kubernetes/service-account.tmp.yaml; + if ($LastExitCode -ne 0) + { + throw "error"; + }; Get-Content .kubernetes/storage-pv.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/storage-pv.tmp.yaml; kubectl apply -f .kubernetes/storage-pv.tmp.yaml; diff --git a/Api.Storage.Azure/.kubernetes/deployment.yaml b/Api.Storage.Azure/.kubernetes/deployment.yaml index 087ef954..3c3a4d20 100644 --- a/Api.Storage.Azure/.kubernetes/deployment.yaml +++ b/Api.Storage.Azure/.kubernetes/deployment.yaml @@ -15,8 +15,9 @@ spec: metadata: labels: app: %SERVICE_NAME% + azure.workload.identity/use: "true" spec: - automountServiceAccountToken: false + serviceAccountName: %SERVICE_NAME%-service-account securityContext: runAsUser: 1000 runAsGroup: 2000 diff --git a/Api.Storage.Azure/.kubernetes/service-account.yaml b/Api.Storage.Azure/.kubernetes/service-account.yaml new file mode 100644 index 00000000..3dc311e9 --- /dev/null +++ b/Api.Storage.Azure/.kubernetes/service-account.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: %SERVICE_NAME%-service-account + namespace: %KUBERNETES_NAMESPACE% + annotations: + azure.workload.identity/client-id: %STORAGE_IDENTITY_CLIENT_ID% \ No newline at end of file diff --git a/Api.Storage.Azure/.kubernetes/storage-pv.yaml b/Api.Storage.Azure/.kubernetes/storage-pv.yaml index b6281fb8..84e11999 100644 --- a/Api.Storage.Azure/.kubernetes/storage-pv.yaml +++ b/Api.Storage.Azure/.kubernetes/storage-pv.yaml @@ -14,4 +14,7 @@ spec: volumeHandle: %STORAGE_SHARE_NAME% volumeAttributes: shareName: %STORAGE_SHARE_NAME% - storageAccount: %STORAGE_ACCOUNT_NAME% \ No newline at end of file + storageAccount: %STORAGE_ACCOUNT_NAME% + resourceGroup: %AZURE_GROUP_STORAGE% + azureStorageAuthType: msi + azureStorageIdentityClientID: %STORAGE_IDENTITY_CLIENT_ID% diff --git a/Api.Storage.Azure/README.md b/Api.Storage.Azure/README.md index e6da4a72..5f68faa2 100644 --- a/Api.Storage.Azure/README.md +++ b/Api.Storage.Azure/README.md @@ -88,7 +88,7 @@ services: ``` ## Kubernetes -Added two new kubernetes templaets, the `storage-pv.yaml` and `storage-pvc.yaml`. Updated the `deployment.yaml` mounting the volume. +Added two new kubernetes templaets, the `storage-pv.yaml`, `storage-pvc.yaml`, and the `service-account.yaml`. Updated the `deployment.yaml` mounting the volume. ```yaml spec: diff --git a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml index e9e277b8..c309fbe5 100644 --- a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -156,6 +156,14 @@ jobs: shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; + $env:STORAGE_IDENTITY_CLIENT_ID = az identity list -g $env:AZURE_GROUP_STORAGE --query [0].clientId -o tsv; + + Get-Content .kubernetes/service-account.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service-account.tmp.yaml; + kubectl apply -f .kubernetes/service-account.tmp.yaml; + if ($LastExitCode -ne 0) + { + throw "error"; + }; Get-Content .kubernetes/storage-pv.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/storage-pv.tmp.yaml; kubectl apply -f .kubernetes/storage-pv.tmp.yaml; diff --git a/Console.Storage.Azure/.kubernetes/cronjob.yaml b/Console.Storage.Azure/.kubernetes/cronjob.yaml index f858acb4..501acd83 100644 --- a/Console.Storage.Azure/.kubernetes/cronjob.yaml +++ b/Console.Storage.Azure/.kubernetes/cronjob.yaml @@ -11,10 +11,11 @@ spec: metadata: labels: app: %SERVICE_NAME% + azure.workload.identity/use: "true" spec: template: spec: - automountServiceAccountToken: false + serviceAccountName: %SERVICE_NAME%-service-account securityContext: runAsUser: 1000 runAsGroup: 2000 diff --git a/Console.Storage.Azure/.kubernetes/service-account.yaml b/Console.Storage.Azure/.kubernetes/service-account.yaml new file mode 100644 index 00000000..3dc311e9 --- /dev/null +++ b/Console.Storage.Azure/.kubernetes/service-account.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: %SERVICE_NAME%-service-account + namespace: %KUBERNETES_NAMESPACE% + annotations: + azure.workload.identity/client-id: %STORAGE_IDENTITY_CLIENT_ID% \ No newline at end of file diff --git a/Console.Storage.Azure/.kubernetes/storage-pv.yaml b/Console.Storage.Azure/.kubernetes/storage-pv.yaml index b6281fb8..84e11999 100644 --- a/Console.Storage.Azure/.kubernetes/storage-pv.yaml +++ b/Console.Storage.Azure/.kubernetes/storage-pv.yaml @@ -14,4 +14,7 @@ spec: volumeHandle: %STORAGE_SHARE_NAME% volumeAttributes: shareName: %STORAGE_SHARE_NAME% - storageAccount: %STORAGE_ACCOUNT_NAME% \ No newline at end of file + storageAccount: %STORAGE_ACCOUNT_NAME% + resourceGroup: %AZURE_GROUP_STORAGE% + azureStorageAuthType: msi + azureStorageIdentityClientID: %STORAGE_IDENTITY_CLIENT_ID% diff --git a/Console.Storage.Azure/README.md b/Console.Storage.Azure/README.md index 61ac5519..1c8662f6 100644 --- a/Console.Storage.Azure/README.md +++ b/Console.Storage.Azure/README.md @@ -59,24 +59,30 @@ services: ``` ## Kubernetes -Added two new kubernetes templaets, the `storage-pv.yaml` and `storage-pvc.yaml`. Updated the `cronjob.yaml` mounting the volume. +Added two new kubernetes templaets, the `storage-pv.yaml`, `storage-pvc.yaml`, and the `service-account.yaml`. Updated the `cronjob.yaml` mounting the volume. ```yaml spec: - template: + jobTemplate: + metadata: + labels: + azure.workload.identity/use: "true" spec: - containers: - volumeMounts: - - name: %SERVICE_NAME%-volume - mountPath: /mnt/%STORAGE_SHARE_NAME% - - name: tmp - mountPath: /tmp - volumes: - - name: %SERVICE_NAME%-volume - persistentVolumeClaim: - claimName: %SERVICE_NAME%-azurefile-pvc - - name: tmp - emptyDir: {} + template: + spec: + serviceAccountName: %SERVICE_NAME%-service-account + containers: + volumeMounts: + - name: %SERVICE_NAME%-volume + mountPath: /mnt/%STORAGE_SHARE_NAME% + - name: tmp + mountPath: /tmp + volumes: + - name: %SERVICE_NAME%-volume + persistentVolumeClaim: + claimName: %SERVICE_NAME%-azurefile-pvc + - name: tmp + emptyDir: {} ``` ## GitHub Actions From 0dea701277e294dc7bd24d08a42c17275fcb5adc Mon Sep 17 00:00:00 2001 From: vivet Date: Tue, 7 Jul 2026 14:58:39 +0200 Subject: [PATCH 13/33] Updated --- .../.github/workflows/build-and-deploy.yml | 48 ++++++++++++++++- .../.kubernetes/service-account.yaml | 2 +- Api.Storage.Azure/README.md | 54 ++++++++++++++++++- .../.github/workflows/build-and-deploy.yml | 48 ++++++++++++++++- .../.kubernetes/service-account.yaml | 2 +- Console.Storage.Azure/README.md | 50 +++++++++++++++++ 6 files changed, 198 insertions(+), 6 deletions(-) diff --git a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml index 963a25f5..691b065e 100644 --- a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -165,11 +165,57 @@ jobs: throw "error"; }; + - name: Managed Identity & Federated Credentials + shell: pwsh + run: | + $env:IDENTITY_NAME = $env:SERVICE_NAME + "-identity"; + $env:IDENTITY_PRINCIPAL_ID = az identity show -g $env:AZURE_GROUP_KUBERNETES -n $env:IDENTITY_NAME --query principalId -o tsv; + $env:KUBERNETES_ISSUER_URL = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].['oidcIssuerProfile.issuerUrl'] -o tsv; + $env:STORAGE_ACCOUNT_ID = az storage account list -g $env:AZURE_GROUP_STORAGE --query [0].id -o tsv; + + if (-not $env:PRINCIPAL_ID) + { + az identity create ` + -g $env:AZURE_GROUP_KUBERNETES ` + -n $env:IDENTITY_NAME; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; + + $env:IDENTITY_PRINCIPAL_ID = az identity show -g $env:AZURE_RESOURCE_GROUP -n $env:IDENTITY_NAME --query principalId -o tsv; + } + + az role assignment create ` + --assignee-object-id $env:IDENTITY_PRINCIPAL_ID ` + --assignee-principal-type ServicePrincipal ` + --role "Storage File Data SMB Share Contributor" ` + --scope $env:STORAGE_ACCOUNT_ID; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; + + az identity federated-credential create ` + --name $env:SERVICE_NAME-credentials ` + --resource-group $env:AZURE_GROUP_KUBERNETES ` + --identity-name $env:IDENTITY_NAME ` + --issuer $env:KUBERNETES_ISSUER_URL ` + --subject system:serviceaccount:$env:KUBERNETES_NAMESPACE:$env:SERVICE_NAME-service-account ` + --audience api://AzureADTokenExchange; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; + - name: Kubernetes Deploy shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:STORAGE_IDENTITY_CLIENT_ID = az identity list -g $env:AZURE_GROUP_STORAGE --query [0].clientId -o tsv; + $env:IDENTITY_CLIENT_ID = az identity list -g $env:AZURE_GROUP_STORAGE --query [0].clientId -o tsv; Get-Content .kubernetes/service-account.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service-account.tmp.yaml; kubectl apply -f .kubernetes/service-account.tmp.yaml; diff --git a/Api.Storage.Azure/.kubernetes/service-account.yaml b/Api.Storage.Azure/.kubernetes/service-account.yaml index 3dc311e9..283750fd 100644 --- a/Api.Storage.Azure/.kubernetes/service-account.yaml +++ b/Api.Storage.Azure/.kubernetes/service-account.yaml @@ -4,4 +4,4 @@ metadata: name: %SERVICE_NAME%-service-account namespace: %KUBERNETES_NAMESPACE% annotations: - azure.workload.identity/client-id: %STORAGE_IDENTITY_CLIENT_ID% \ No newline at end of file + azure.workload.identity/client-id: %IDENTITY_CLIENT_ID% \ No newline at end of file diff --git a/Api.Storage.Azure/README.md b/Api.Storage.Azure/README.md index 5f68faa2..58c2c568 100644 --- a/Api.Storage.Azure/README.md +++ b/Api.Storage.Azure/README.md @@ -125,8 +125,8 @@ And add this step below as well, ensuring that the fileshare gets created before ```yaml - name: Create Fileshare -shell: pwsh -run: | + shell: pwsh + run: | $env:STORAGE_ACCOUNT_NAME = az storage account list -g $env:AZURE_GROUP_STORAGE --query [0].name -o tsv; $env:FILE_SHARE_EXISTS = az storage share-rm exists ` @@ -173,3 +173,53 @@ run: | throw "error"; }; ``` + +...and includes a step to create a managed identity and federated credentials for authenticating with the storage account. + +``` +- name: Managed Identity & Federated Credentials + shell: pwsh + run: | + $env:IDENTITY_NAME = $env:SERVICE_NAME + "-identity"; + $env:IDENTITY_PRINCIPAL_ID = az identity show -g $env:AZURE_GROUP_KUBERNETES -n $env:IDENTITY_NAME --query principalId -o tsv; + $env:KUBERNETES_ISSUER_URL = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].['oidcIssuerProfile.issuerUrl'] -o tsv; + $env:STORAGE_ACCOUNT_ID = az storage account list -g $env:AZURE_GROUP_STORAGE --query [0].id -o tsv; + + if (-not $env:PRINCIPAL_ID) + { + az identity create ` + -g $env:AZURE_GROUP_KUBERNETES ` + -n $env:IDENTITY_NAME; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; + + $env:IDENTITY_PRINCIPAL_ID = az identity show -g $env:AZURE_RESOURCE_GROUP -n $env:IDENTITY_NAME --query principalId -o tsv; + } + + az role assignment create ` + --assignee-object-id $env:IDENTITY_PRINCIPAL_ID ` + --assignee-principal-type ServicePrincipal ` + --role "Storage File Data SMB Share Contributor" ` + --scope $env:STORAGE_ACCOUNT_ID; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; + + az identity federated-credential create ` + --name $env:SERVICE_NAME-credentials ` + --resource-group $env:AZURE_GROUP_KUBERNETES ` + --identity-name $env:IDENTITY_NAME ` + --issuer $env:KUBERNETES_ISSUER_URL ` + --subject system:serviceaccount:$env:KUBERNETES_NAMESPACE:$env:SERVICE_NAME-service-account ` + --audience api://AzureADTokenExchange; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; +``` \ No newline at end of file diff --git a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml index c309fbe5..7cb38e00 100644 --- a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -152,11 +152,57 @@ jobs: throw "error"; }; + - name: Managed Identity & Federated Credentials + shell: pwsh + run: | + $env:IDENTITY_NAME = $env:SERVICE_NAME + "-identity"; + $env:IDENTITY_PRINCIPAL_ID = az identity show -g $env:AZURE_GROUP_KUBERNETES -n $env:IDENTITY_NAME --query principalId -o tsv; + $env:KUBERNETES_ISSUER_URL = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].['oidcIssuerProfile.issuerUrl'] -o tsv; + $env:STORAGE_ACCOUNT_ID = az storage account list -g $env:AZURE_GROUP_STORAGE --query [0].id -o tsv; + + if (-not $env:PRINCIPAL_ID) + { + az identity create ` + -g $env:AZURE_GROUP_KUBERNETES ` + -n $env:IDENTITY_NAME; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; + + $env:IDENTITY_PRINCIPAL_ID = az identity show -g $env:AZURE_RESOURCE_GROUP -n $env:IDENTITY_NAME --query principalId -o tsv; + } + + az role assignment create ` + --assignee-object-id $env:IDENTITY_PRINCIPAL_ID ` + --assignee-principal-type ServicePrincipal ` + --role "Storage File Data SMB Share Contributor" ` + --scope $env:STORAGE_ACCOUNT_ID; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; + + az identity federated-credential create ` + --name $env:SERVICE_NAME-credentials ` + --resource-group $env:AZURE_GROUP_KUBERNETES ` + --identity-name $env:IDENTITY_NAME ` + --issuer $env:KUBERNETES_ISSUER_URL ` + --subject system:serviceaccount:$env:KUBERNETES_NAMESPACE:$env:SERVICE_NAME-service-account ` + --audience api://AzureADTokenExchange; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; + - name: Kubernetes Deploy shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:STORAGE_IDENTITY_CLIENT_ID = az identity list -g $env:AZURE_GROUP_STORAGE --query [0].clientId -o tsv; + $env:IDENTITY_CLIENT_ID = az identity list -g $env:AZURE_GROUP_STORAGE --query [0].clientId -o tsv; Get-Content .kubernetes/service-account.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service-account.tmp.yaml; kubectl apply -f .kubernetes/service-account.tmp.yaml; diff --git a/Console.Storage.Azure/.kubernetes/service-account.yaml b/Console.Storage.Azure/.kubernetes/service-account.yaml index 3dc311e9..283750fd 100644 --- a/Console.Storage.Azure/.kubernetes/service-account.yaml +++ b/Console.Storage.Azure/.kubernetes/service-account.yaml @@ -4,4 +4,4 @@ metadata: name: %SERVICE_NAME%-service-account namespace: %KUBERNETES_NAMESPACE% annotations: - azure.workload.identity/client-id: %STORAGE_IDENTITY_CLIENT_ID% \ No newline at end of file + azure.workload.identity/client-id: %IDENTITY_CLIENT_ID% \ No newline at end of file diff --git a/Console.Storage.Azure/README.md b/Console.Storage.Azure/README.md index 1c8662f6..7645d693 100644 --- a/Console.Storage.Azure/README.md +++ b/Console.Storage.Azure/README.md @@ -148,3 +148,53 @@ run: | throw "error"; }; ``` + +...and includes a step to create a managed identity and federated credentials for authenticating with the storage account. + +``` +- name: Managed Identity & Federated Credentials + shell: pwsh + run: | + $env:IDENTITY_NAME = $env:SERVICE_NAME + "-identity"; + $env:IDENTITY_PRINCIPAL_ID = az identity show -g $env:AZURE_GROUP_KUBERNETES -n $env:IDENTITY_NAME --query principalId -o tsv; + $env:KUBERNETES_ISSUER_URL = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].['oidcIssuerProfile.issuerUrl'] -o tsv; + $env:STORAGE_ACCOUNT_ID = az storage account list -g $env:AZURE_GROUP_STORAGE --query [0].id -o tsv; + + if (-not $env:PRINCIPAL_ID) + { + az identity create ` + -g $env:AZURE_GROUP_KUBERNETES ` + -n $env:IDENTITY_NAME; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; + + $env:IDENTITY_PRINCIPAL_ID = az identity show -g $env:AZURE_RESOURCE_GROUP -n $env:IDENTITY_NAME --query principalId -o tsv; + } + + az role assignment create ` + --assignee-object-id $env:IDENTITY_PRINCIPAL_ID ` + --assignee-principal-type ServicePrincipal ` + --role "Storage File Data SMB Share Contributor" ` + --scope $env:STORAGE_ACCOUNT_ID; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; + + az identity federated-credential create ` + --name $env:SERVICE_NAME-credentials ` + --resource-group $env:AZURE_GROUP_KUBERNETES ` + --identity-name $env:IDENTITY_NAME ` + --issuer $env:KUBERNETES_ISSUER_URL ` + --subject system:serviceaccount:$env:KUBERNETES_NAMESPACE:$env:SERVICE_NAME-service-account ` + --audience api://AzureADTokenExchange; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; +``` From 592d40bf8d4992ac35626d057a249607fb4b5ac2 Mon Sep 17 00:00:00 2001 From: vivet Date: Tue, 7 Jul 2026 18:07:07 +0200 Subject: [PATCH 14/33] Updated --- .../.github/workflows/build-and-deploy.yml | 14 ++++++++------ Api.Storage.Azure/.kubernetes/storage-pv.yaml | 6 +++--- Api.Storage.Azure/README.md | 17 ++++++++++++----- Console.Eventing.RabbitMq/README.md | 1 - .../.github/workflows/build-and-deploy.yml | 14 ++++++++------ .../.kubernetes/storage-pv.yaml | 6 +++--- Console.Storage.Azure/README.md | 13 ++++++++----- 7 files changed, 42 insertions(+), 29 deletions(-) diff --git a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml index 691b065e..4d35cc1c 100644 --- a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -173,7 +173,7 @@ jobs: $env:KUBERNETES_ISSUER_URL = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].['oidcIssuerProfile.issuerUrl'] -o tsv; $env:STORAGE_ACCOUNT_ID = az storage account list -g $env:AZURE_GROUP_STORAGE --query [0].id -o tsv; - if (-not $env:PRINCIPAL_ID) + if (-not $env:IDENTITY_PRINCIPAL_ID) { az identity create ` -g $env:AZURE_GROUP_KUBERNETES ` @@ -184,14 +184,14 @@ jobs: throw "error"; }; - $env:IDENTITY_PRINCIPAL_ID = az identity show -g $env:AZURE_RESOURCE_GROUP -n $env:IDENTITY_NAME --query principalId -o tsv; + $env:IDENTITY_PRINCIPAL_ID = az identity show -g $env:AZURE_GROUP_KUBERNETES -n $env:IDENTITY_NAME --query principalId -o tsv; } az role assignment create ` --assignee-object-id $env:IDENTITY_PRINCIPAL_ID ` --assignee-principal-type ServicePrincipal ` - --role "Storage File Data SMB Share Contributor" ` - --scope $env:STORAGE_ACCOUNT_ID; + --role "Storage File Data SMB MI Admin" ` + --scope $env:STORAGE_ACCOUNT_ID if ($LastExitCode -ne 0) { @@ -203,7 +203,7 @@ jobs: --resource-group $env:AZURE_GROUP_KUBERNETES ` --identity-name $env:IDENTITY_NAME ` --issuer $env:KUBERNETES_ISSUER_URL ` - --subject system:serviceaccount:$env:KUBERNETES_NAMESPACE:$env:SERVICE_NAME-service-account ` + --subject "system:serviceaccount:${env:KUBERNETES_NAMESPACE}:${env:SERVICE_NAME}-service-account" ` --audience api://AzureADTokenExchange; if ($LastExitCode -ne 0) @@ -211,11 +211,13 @@ jobs: throw "error"; }; + echo "IDENTITY_NAME=$env:IDENTITY_NAME" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:IDENTITY_CLIENT_ID = az identity list -g $env:AZURE_GROUP_STORAGE --query [0].clientId -o tsv; + $env:IDENTITY_CLIENT_ID = az identity show -g $env:AZURE_GROUP_KUBERNETES -n $env:IDENTITY_NAME --query clientId -o tsv; Get-Content .kubernetes/service-account.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service-account.tmp.yaml; kubectl apply -f .kubernetes/service-account.tmp.yaml; diff --git a/Api.Storage.Azure/.kubernetes/storage-pv.yaml b/Api.Storage.Azure/.kubernetes/storage-pv.yaml index 84e11999..330c5e84 100644 --- a/Api.Storage.Azure/.kubernetes/storage-pv.yaml +++ b/Api.Storage.Azure/.kubernetes/storage-pv.yaml @@ -11,10 +11,10 @@ spec: storageClassName: azurefile-static csi: driver: file.csi.azure.com - volumeHandle: %STORAGE_SHARE_NAME% + volumeHandle: %AZURE_GROUP_STORAGE%#%STORAGE_ACCOUNT_NAME%#%STORAGE_SHARE_NAME% volumeAttributes: shareName: %STORAGE_SHARE_NAME% storageAccount: %STORAGE_ACCOUNT_NAME% resourceGroup: %AZURE_GROUP_STORAGE% - azureStorageAuthType: msi - azureStorageIdentityClientID: %STORAGE_IDENTITY_CLIENT_ID% + clientID: %IDENTITY_CLIENT_ID% + mountWithWorkloadIdentityToken: "true" diff --git a/Api.Storage.Azure/README.md b/Api.Storage.Azure/README.md index 58c2c568..b172743d 100644 --- a/Api.Storage.Azure/README.md +++ b/Api.Storage.Azure/README.md @@ -93,7 +93,11 @@ Added two new kubernetes templaets, the `storage-pv.yaml`, `storage-pvc.yaml`, a ```yaml spec: template: + metadata: + labels: + azure.workload.identity/use: "true" spec: + serviceAccountName: %SERVICE_NAME%-service-account containers: volumeMounts: - name: %SERVICE_NAME%-volume @@ -185,7 +189,7 @@ And add this step below as well, ensuring that the fileshare gets created before $env:KUBERNETES_ISSUER_URL = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].['oidcIssuerProfile.issuerUrl'] -o tsv; $env:STORAGE_ACCOUNT_ID = az storage account list -g $env:AZURE_GROUP_STORAGE --query [0].id -o tsv; - if (-not $env:PRINCIPAL_ID) + if (-not $env:IDENTITY_PRINCIPAL_ID) { az identity create ` -g $env:AZURE_GROUP_KUBERNETES ` @@ -196,14 +200,14 @@ And add this step below as well, ensuring that the fileshare gets created before throw "error"; }; - $env:IDENTITY_PRINCIPAL_ID = az identity show -g $env:AZURE_RESOURCE_GROUP -n $env:IDENTITY_NAME --query principalId -o tsv; + $env:IDENTITY_PRINCIPAL_ID = az identity show -g $env:AZURE_GROUP_KUBERNETES -n $env:IDENTITY_NAME --query principalId -o tsv; } az role assignment create ` --assignee-object-id $env:IDENTITY_PRINCIPAL_ID ` --assignee-principal-type ServicePrincipal ` - --role "Storage File Data SMB Share Contributor" ` - --scope $env:STORAGE_ACCOUNT_ID; + --role "Storage File Data SMB MI Admin" ` + --scope $env:STORAGE_ACCOUNT_ID if ($LastExitCode -ne 0) { @@ -215,11 +219,14 @@ And add this step below as well, ensuring that the fileshare gets created before --resource-group $env:AZURE_GROUP_KUBERNETES ` --identity-name $env:IDENTITY_NAME ` --issuer $env:KUBERNETES_ISSUER_URL ` - --subject system:serviceaccount:$env:KUBERNETES_NAMESPACE:$env:SERVICE_NAME-service-account ` + --subject "system:serviceaccount:${env:KUBERNETES_NAMESPACE}:${env:SERVICE_NAME}-service-account" ` --audience api://AzureADTokenExchange; if ($LastExitCode -ne 0) { throw "error"; }; + + echo "IDENTITY_NAME=$env:IDENTITY_NAME" >> $env:GITHUB_ENV; + ``` \ No newline at end of file diff --git a/Console.Eventing.RabbitMq/README.md b/Console.Eventing.RabbitMq/README.md index 2d50e5a2..ba631586 100644 --- a/Console.Eventing.RabbitMq/README.md +++ b/Console.Eventing.RabbitMq/README.md @@ -115,7 +115,6 @@ spec: secretKeyRef: name: rabbitmq-auth key: username - envFrom: - name: Eventing__Credentials__Secret valueFrom: secretKeyRef: diff --git a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml index 7cb38e00..c2188061 100644 --- a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -160,7 +160,7 @@ jobs: $env:KUBERNETES_ISSUER_URL = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].['oidcIssuerProfile.issuerUrl'] -o tsv; $env:STORAGE_ACCOUNT_ID = az storage account list -g $env:AZURE_GROUP_STORAGE --query [0].id -o tsv; - if (-not $env:PRINCIPAL_ID) + if (-not $env:IDENTITY_PRINCIPAL_ID) { az identity create ` -g $env:AZURE_GROUP_KUBERNETES ` @@ -171,14 +171,14 @@ jobs: throw "error"; }; - $env:IDENTITY_PRINCIPAL_ID = az identity show -g $env:AZURE_RESOURCE_GROUP -n $env:IDENTITY_NAME --query principalId -o tsv; + $env:IDENTITY_PRINCIPAL_ID = az identity show -g $env:AZURE_GROUP_KUBERNETES -n $env:IDENTITY_NAME --query principalId -o tsv; } az role assignment create ` --assignee-object-id $env:IDENTITY_PRINCIPAL_ID ` --assignee-principal-type ServicePrincipal ` - --role "Storage File Data SMB Share Contributor" ` - --scope $env:STORAGE_ACCOUNT_ID; + --role "Storage File Data SMB MI Admin" ` + --scope $env:STORAGE_ACCOUNT_ID if ($LastExitCode -ne 0) { @@ -190,7 +190,7 @@ jobs: --resource-group $env:AZURE_GROUP_KUBERNETES ` --identity-name $env:IDENTITY_NAME ` --issuer $env:KUBERNETES_ISSUER_URL ` - --subject system:serviceaccount:$env:KUBERNETES_NAMESPACE:$env:SERVICE_NAME-service-account ` + --subject "system:serviceaccount:${env:KUBERNETES_NAMESPACE}:${env:SERVICE_NAME}-service-account" ` --audience api://AzureADTokenExchange; if ($LastExitCode -ne 0) @@ -198,11 +198,13 @@ jobs: throw "error"; }; + echo "IDENTITY_NAME=$env:IDENTITY_NAME" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $env:IDENTITY_CLIENT_ID = az identity list -g $env:AZURE_GROUP_STORAGE --query [0].clientId -o tsv; + $env:IDENTITY_CLIENT_ID = az identity show -g $env:AZURE_GROUP_KUBERNETES -n $env:IDENTITY_NAME --query clientId -o tsv; Get-Content .kubernetes/service-account.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service-account.tmp.yaml; kubectl apply -f .kubernetes/service-account.tmp.yaml; diff --git a/Console.Storage.Azure/.kubernetes/storage-pv.yaml b/Console.Storage.Azure/.kubernetes/storage-pv.yaml index 84e11999..330c5e84 100644 --- a/Console.Storage.Azure/.kubernetes/storage-pv.yaml +++ b/Console.Storage.Azure/.kubernetes/storage-pv.yaml @@ -11,10 +11,10 @@ spec: storageClassName: azurefile-static csi: driver: file.csi.azure.com - volumeHandle: %STORAGE_SHARE_NAME% + volumeHandle: %AZURE_GROUP_STORAGE%#%STORAGE_ACCOUNT_NAME%#%STORAGE_SHARE_NAME% volumeAttributes: shareName: %STORAGE_SHARE_NAME% storageAccount: %STORAGE_ACCOUNT_NAME% resourceGroup: %AZURE_GROUP_STORAGE% - azureStorageAuthType: msi - azureStorageIdentityClientID: %STORAGE_IDENTITY_CLIENT_ID% + clientID: %IDENTITY_CLIENT_ID% + mountWithWorkloadIdentityToken: "true" diff --git a/Console.Storage.Azure/README.md b/Console.Storage.Azure/README.md index 7645d693..d34d477f 100644 --- a/Console.Storage.Azure/README.md +++ b/Console.Storage.Azure/README.md @@ -160,7 +160,7 @@ run: | $env:KUBERNETES_ISSUER_URL = az aks list -g $env:AZURE_GROUP_KUBERNETES --query [0].['oidcIssuerProfile.issuerUrl'] -o tsv; $env:STORAGE_ACCOUNT_ID = az storage account list -g $env:AZURE_GROUP_STORAGE --query [0].id -o tsv; - if (-not $env:PRINCIPAL_ID) + if (-not $env:IDENTITY_PRINCIPAL_ID) { az identity create ` -g $env:AZURE_GROUP_KUBERNETES ` @@ -171,14 +171,14 @@ run: | throw "error"; }; - $env:IDENTITY_PRINCIPAL_ID = az identity show -g $env:AZURE_RESOURCE_GROUP -n $env:IDENTITY_NAME --query principalId -o tsv; + $env:IDENTITY_PRINCIPAL_ID = az identity show -g $env:AZURE_GROUP_KUBERNETES -n $env:IDENTITY_NAME --query principalId -o tsv; } az role assignment create ` --assignee-object-id $env:IDENTITY_PRINCIPAL_ID ` --assignee-principal-type ServicePrincipal ` - --role "Storage File Data SMB Share Contributor" ` - --scope $env:STORAGE_ACCOUNT_ID; + --role "Storage File Data SMB MI Admin" ` + --scope $env:STORAGE_ACCOUNT_ID if ($LastExitCode -ne 0) { @@ -190,11 +190,14 @@ run: | --resource-group $env:AZURE_GROUP_KUBERNETES ` --identity-name $env:IDENTITY_NAME ` --issuer $env:KUBERNETES_ISSUER_URL ` - --subject system:serviceaccount:$env:KUBERNETES_NAMESPACE:$env:SERVICE_NAME-service-account ` + --subject "system:serviceaccount:${env:KUBERNETES_NAMESPACE}:${env:SERVICE_NAME}-service-account" ` --audience api://AzureADTokenExchange; if ($LastExitCode -ne 0) { throw "error"; }; + + echo "IDENTITY_NAME=$env:IDENTITY_NAME" >> $env:GITHUB_ENV; + ``` From 6fbdefed201a70afc42ad21fdf67b9e79d05728a Mon Sep 17 00:00:00 2001 From: vivet Date: Wed, 8 Jul 2026 08:03:40 +0200 Subject: [PATCH 15/33] Updated --- Api.ApiClients.Audit/Dockerfile | 3 +++ Api.ApiClients.Entity/Dockerfile | 3 +++ Api.ApiClients.RootLogIn/Dockerfile | 3 +++ Api.ApiClients/Dockerfile | 3 +++ Api.Auth.External.Custom/Dockerfile | 3 +++ Api.Auth.RootLogin/Dockerfile | 3 +++ Api.Authorization/Dockerfile | 3 +++ Api.ContentNegotiation/Dockerfile | 3 +++ Api.Cookies/Dockerfile | 3 +++ Api.CustomConfigSection/Dockerfile | 3 +++ Api.CustomMiddleware/Dockerfile | 3 +++ Api.CustomService/Dockerfile | 3 +++ Api.Data.Audit/Dockerfile | 3 +++ Api.Data.EntityEvents/Dockerfile | 3 +++ Api.Data.Identity.Auth.ApiKey/Dockerfile | 3 +++ Api.Data.Identity.Auth.External.Custom/Dockerfile | 3 +++ Api.Data.Identity.Auth.Jwt/Dockerfile | 3 +++ Api.Data.Identity/Dockerfile | 3 +++ Api.Data.InMemory/Dockerfile | 3 +++ Api.Data.LazyLoading/Dockerfile | 3 +++ Api.Data.MySql.Collation/Dockerfile | 3 +++ Api.Data.MySql.Mappings/Dockerfile | 3 +++ Api.Data.MySql.Spatial/Dockerfile | 3 +++ Api.Data.MySql.StoredProcedures/Dockerfile | 3 +++ Api.Data.MySql.Views/Dockerfile | 3 +++ Api.Data.MySql/Dockerfile | 3 +++ Api.Data.PostgreSQL.Spatial/Dockerfile | 3 +++ Api.Data.PostgreSQL/Dockerfile | 3 +++ Api.Data.Repository.AutoSave/Dockerfile | 3 +++ Api.Data.Repository.Includes/Dockerfile | 3 +++ Api.Data.SoftDelete/Dockerfile | 3 +++ Api.Data.SqLite/Dockerfile | 3 +++ Api.Data.SqlServer.Spatial/Dockerfile | 3 +++ Api.Data.SqlServer/Dockerfile | 3 +++ Api.Data.Triggers/Dockerfile | 3 +++ Api.Documentation.Csp/Dockerfile | 3 +++ Api.Documentation/Dockerfile | 3 +++ Api.Documentation/README.md | 1 - Api.ErrorHandling/Dockerfile | 3 +++ Api.Eventing.RabbitMq/Dockerfile | 3 +++ Api.Eventing.RabbitMq/README.md | 1 - Api.HealthChecks/Dockerfile | 3 +++ Api.Hosting.Http/Dockerfile | 3 +++ Api.Hosting.Https/Dockerfile | 3 +++ Api.Hosting.MultipartLimits/Dockerfile | 3 +++ Api.Localization/Dockerfile | 3 +++ Api.Logging.Log4Net/Dockerfile | 3 +++ Api.Logging.Microsoft/Dockerfile | 3 +++ Api.Logging.NLog/Dockerfile | 3 +++ Api.Logging.Serilog/Dockerfile | 3 +++ Api.MultipartJson/Dockerfile | 3 +++ Api.PolicyHeaders.ContentSecurityPolicy/Dockerfile | 3 +++ Api.PolicyHeaders.ContentTypeOptions/Dockerfile | 3 +++ Api.PolicyHeaders.Cors/Dockerfile | 3 +++ Api.PolicyHeaders.ForwardedHeaders/Dockerfile | 3 +++ Api.PolicyHeaders.FrameOptions/Dockerfile | 3 +++ Api.PolicyHeaders.Hsts/Dockerfile | 3 +++ Api.PolicyHeaders.ReferrerPolicy/Dockerfile | 3 +++ Api.PolicyHeaders.Robots/Dockerfile | 3 +++ Api.PolicyHeaders.XssProtection/Dockerfile | 3 +++ Api.RequestTracing/Dockerfile | 3 +++ Api.ResponseCache/Dockerfile | 3 +++ Api.ResponseCompression/Dockerfile | 3 +++ Api.Session/Dockerfile | 3 +++ Api.StartupTasks/Dockerfile | 3 +++ Api.StaticFiles/Dockerfile | 3 +++ Api.Storage.Azure/Dockerfile | 3 +++ Api.Storage.Local/Dockerfile | 3 +++ Api.TimeZone/Dockerfile | 3 +++ Api.Versioning/.kubernetes/deployment.yaml | 1 - Api.Versioning/Dockerfile | 3 +++ Api.VirusScan/Dockerfile | 3 +++ Api._Blank/Dockerfile | 3 +++ Web._Blank/.kubernetes/deployment.yaml | 1 - Web._Blank/Dockerfile | 3 +++ 75 files changed, 213 insertions(+), 4 deletions(-) diff --git a/Api.ApiClients.Audit/Dockerfile b/Api.ApiClients.Audit/Dockerfile index ae5aa0b8..c5fbf044 100644 --- a/Api.ApiClients.Audit/Dockerfile +++ b/Api.ApiClients.Audit/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.ApiClients.Entity/Dockerfile b/Api.ApiClients.Entity/Dockerfile index 961dbddb..f3f3598c 100644 --- a/Api.ApiClients.Entity/Dockerfile +++ b/Api.ApiClients.Entity/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.ApiClients.RootLogIn/Dockerfile b/Api.ApiClients.RootLogIn/Dockerfile index 2fad135c..b30aad79 100644 --- a/Api.ApiClients.RootLogIn/Dockerfile +++ b/Api.ApiClients.RootLogIn/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.ApiClients/Dockerfile b/Api.ApiClients/Dockerfile index 554c9c3f..7f00a073 100644 --- a/Api.ApiClients/Dockerfile +++ b/Api.ApiClients/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Auth.External.Custom/Dockerfile b/Api.Auth.External.Custom/Dockerfile index 2a07e09b..2fbca1d0 100644 --- a/Api.Auth.External.Custom/Dockerfile +++ b/Api.Auth.External.Custom/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Auth.RootLogin/Dockerfile b/Api.Auth.RootLogin/Dockerfile index 3330579b..a620738a 100644 --- a/Api.Auth.RootLogin/Dockerfile +++ b/Api.Auth.RootLogin/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Authorization/Dockerfile b/Api.Authorization/Dockerfile index 3a70d191..4a8a8341 100644 --- a/Api.Authorization/Dockerfile +++ b/Api.Authorization/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.ContentNegotiation/Dockerfile b/Api.ContentNegotiation/Dockerfile index 658250a4..6b668fbf 100644 --- a/Api.ContentNegotiation/Dockerfile +++ b/Api.ContentNegotiation/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Cookies/Dockerfile b/Api.Cookies/Dockerfile index 2f4f37d9..48a646b1 100644 --- a/Api.Cookies/Dockerfile +++ b/Api.Cookies/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.CustomConfigSection/Dockerfile b/Api.CustomConfigSection/Dockerfile index ee947826..616f3a5f 100644 --- a/Api.CustomConfigSection/Dockerfile +++ b/Api.CustomConfigSection/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.CustomMiddleware/Dockerfile b/Api.CustomMiddleware/Dockerfile index a5772da5..fd28696d 100644 --- a/Api.CustomMiddleware/Dockerfile +++ b/Api.CustomMiddleware/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.CustomService/Dockerfile b/Api.CustomService/Dockerfile index 8679c6c7..f739cb77 100644 --- a/Api.CustomService/Dockerfile +++ b/Api.CustomService/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.Audit/Dockerfile b/Api.Data.Audit/Dockerfile index d8e60daa..8f2ef3ec 100644 --- a/Api.Data.Audit/Dockerfile +++ b/Api.Data.Audit/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.EntityEvents/Dockerfile b/Api.Data.EntityEvents/Dockerfile index dca7eca5..bdd7b025 100644 --- a/Api.Data.EntityEvents/Dockerfile +++ b/Api.Data.EntityEvents/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.Identity.Auth.ApiKey/Dockerfile b/Api.Data.Identity.Auth.ApiKey/Dockerfile index 30ab00dc..2b88f129 100644 --- a/Api.Data.Identity.Auth.ApiKey/Dockerfile +++ b/Api.Data.Identity.Auth.ApiKey/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.Identity.Auth.External.Custom/Dockerfile b/Api.Data.Identity.Auth.External.Custom/Dockerfile index 5a2e6a5e..506b837e 100644 --- a/Api.Data.Identity.Auth.External.Custom/Dockerfile +++ b/Api.Data.Identity.Auth.External.Custom/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.Identity.Auth.Jwt/Dockerfile b/Api.Data.Identity.Auth.Jwt/Dockerfile index d166ebde..418e28cc 100644 --- a/Api.Data.Identity.Auth.Jwt/Dockerfile +++ b/Api.Data.Identity.Auth.Jwt/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.Identity/Dockerfile b/Api.Data.Identity/Dockerfile index 0e6712aa..40768f27 100644 --- a/Api.Data.Identity/Dockerfile +++ b/Api.Data.Identity/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.InMemory/Dockerfile b/Api.Data.InMemory/Dockerfile index ff662879..2614b5b2 100644 --- a/Api.Data.InMemory/Dockerfile +++ b/Api.Data.InMemory/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.LazyLoading/Dockerfile b/Api.Data.LazyLoading/Dockerfile index 14732284..b9c0894a 100644 --- a/Api.Data.LazyLoading/Dockerfile +++ b/Api.Data.LazyLoading/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.MySql.Collation/Dockerfile b/Api.Data.MySql.Collation/Dockerfile index 0d24bca4..7c6ed3be 100644 --- a/Api.Data.MySql.Collation/Dockerfile +++ b/Api.Data.MySql.Collation/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.MySql.Mappings/Dockerfile b/Api.Data.MySql.Mappings/Dockerfile index bd6047d9..b3dbeeee 100644 --- a/Api.Data.MySql.Mappings/Dockerfile +++ b/Api.Data.MySql.Mappings/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.MySql.Spatial/Dockerfile b/Api.Data.MySql.Spatial/Dockerfile index dce34833..331844a3 100644 --- a/Api.Data.MySql.Spatial/Dockerfile +++ b/Api.Data.MySql.Spatial/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.MySql.StoredProcedures/Dockerfile b/Api.Data.MySql.StoredProcedures/Dockerfile index 81df7ff6..ca0da4f9 100644 --- a/Api.Data.MySql.StoredProcedures/Dockerfile +++ b/Api.Data.MySql.StoredProcedures/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.MySql.Views/Dockerfile b/Api.Data.MySql.Views/Dockerfile index 9e00750f..f6d6f283 100644 --- a/Api.Data.MySql.Views/Dockerfile +++ b/Api.Data.MySql.Views/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.MySql/Dockerfile b/Api.Data.MySql/Dockerfile index d88ccf17..acb5a69d 100644 --- a/Api.Data.MySql/Dockerfile +++ b/Api.Data.MySql/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.PostgreSQL.Spatial/Dockerfile b/Api.Data.PostgreSQL.Spatial/Dockerfile index a1c9d769..e9e3fb51 100644 --- a/Api.Data.PostgreSQL.Spatial/Dockerfile +++ b/Api.Data.PostgreSQL.Spatial/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.PostgreSQL/Dockerfile b/Api.Data.PostgreSQL/Dockerfile index 754207ea..53dc7519 100644 --- a/Api.Data.PostgreSQL/Dockerfile +++ b/Api.Data.PostgreSQL/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.Repository.AutoSave/Dockerfile b/Api.Data.Repository.AutoSave/Dockerfile index 3c02c42d..3404c638 100644 --- a/Api.Data.Repository.AutoSave/Dockerfile +++ b/Api.Data.Repository.AutoSave/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.Repository.Includes/Dockerfile b/Api.Data.Repository.Includes/Dockerfile index 51c6edab..f3df9f5b 100644 --- a/Api.Data.Repository.Includes/Dockerfile +++ b/Api.Data.Repository.Includes/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.SoftDelete/Dockerfile b/Api.Data.SoftDelete/Dockerfile index 4c606a9e..49d091e3 100644 --- a/Api.Data.SoftDelete/Dockerfile +++ b/Api.Data.SoftDelete/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.SqLite/Dockerfile b/Api.Data.SqLite/Dockerfile index 8c1d942b..77733882 100644 --- a/Api.Data.SqLite/Dockerfile +++ b/Api.Data.SqLite/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.SqlServer.Spatial/Dockerfile b/Api.Data.SqlServer.Spatial/Dockerfile index 1bc24530..bcc054ba 100644 --- a/Api.Data.SqlServer.Spatial/Dockerfile +++ b/Api.Data.SqlServer.Spatial/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.SqlServer/Dockerfile b/Api.Data.SqlServer/Dockerfile index e140c4f8..b47e387f 100644 --- a/Api.Data.SqlServer/Dockerfile +++ b/Api.Data.SqlServer/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.Triggers/Dockerfile b/Api.Data.Triggers/Dockerfile index 6f4ffa68..96c77d82 100644 --- a/Api.Data.Triggers/Dockerfile +++ b/Api.Data.Triggers/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Documentation.Csp/Dockerfile b/Api.Documentation.Csp/Dockerfile index 32d43b6b..a4a45947 100644 --- a/Api.Documentation.Csp/Dockerfile +++ b/Api.Documentation.Csp/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Documentation/Dockerfile b/Api.Documentation/Dockerfile index bc41ebbf..ce680f32 100644 --- a/Api.Documentation/Dockerfile +++ b/Api.Documentation/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Documentation/README.md b/Api.Documentation/README.md index 49195e45..1f878977 100644 --- a/Api.Documentation/README.md +++ b/Api.Documentation/README.md @@ -56,4 +56,3 @@ for the same example endpoint. When set to `true`, Swagger only displays the non } } ``` - diff --git a/Api.ErrorHandling/Dockerfile b/Api.ErrorHandling/Dockerfile index de88ee4d..33a6169e 100644 --- a/Api.ErrorHandling/Dockerfile +++ b/Api.ErrorHandling/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Eventing.RabbitMq/Dockerfile b/Api.Eventing.RabbitMq/Dockerfile index 4775d14f..cf4fc6e7 100644 --- a/Api.Eventing.RabbitMq/Dockerfile +++ b/Api.Eventing.RabbitMq/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Eventing.RabbitMq/README.md b/Api.Eventing.RabbitMq/README.md index b5981655..26521f3f 100644 --- a/Api.Eventing.RabbitMq/README.md +++ b/Api.Eventing.RabbitMq/README.md @@ -140,7 +140,6 @@ spec: secretKeyRef: name: rabbitmq-auth key: username - envFrom: - name: Eventing__Credentials__Secret valueFrom: secretKeyRef: diff --git a/Api.HealthChecks/Dockerfile b/Api.HealthChecks/Dockerfile index 2e170ee4..bb962b2f 100644 --- a/Api.HealthChecks/Dockerfile +++ b/Api.HealthChecks/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Hosting.Http/Dockerfile b/Api.Hosting.Http/Dockerfile index 2d614ac6..025f055b 100644 --- a/Api.Hosting.Http/Dockerfile +++ b/Api.Hosting.Http/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Hosting.Https/Dockerfile b/Api.Hosting.Https/Dockerfile index ed3c969f..c0f9722b 100644 --- a/Api.Hosting.Https/Dockerfile +++ b/Api.Hosting.Https/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Hosting.MultipartLimits/Dockerfile b/Api.Hosting.MultipartLimits/Dockerfile index b205db82..6735a4f4 100644 --- a/Api.Hosting.MultipartLimits/Dockerfile +++ b/Api.Hosting.MultipartLimits/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Localization/Dockerfile b/Api.Localization/Dockerfile index 14247453..a40cd0bf 100644 --- a/Api.Localization/Dockerfile +++ b/Api.Localization/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Logging.Log4Net/Dockerfile b/Api.Logging.Log4Net/Dockerfile index 8ba64365..71755b75 100644 --- a/Api.Logging.Log4Net/Dockerfile +++ b/Api.Logging.Log4Net/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Logging.Microsoft/Dockerfile b/Api.Logging.Microsoft/Dockerfile index d77a0004..1af58d8b 100644 --- a/Api.Logging.Microsoft/Dockerfile +++ b/Api.Logging.Microsoft/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Logging.NLog/Dockerfile b/Api.Logging.NLog/Dockerfile index f7f28f9d..e5eb8fc8 100644 --- a/Api.Logging.NLog/Dockerfile +++ b/Api.Logging.NLog/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Logging.Serilog/Dockerfile b/Api.Logging.Serilog/Dockerfile index e211ed1c..a3245348 100644 --- a/Api.Logging.Serilog/Dockerfile +++ b/Api.Logging.Serilog/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.MultipartJson/Dockerfile b/Api.MultipartJson/Dockerfile index efb0b01a..38b1672b 100644 --- a/Api.MultipartJson/Dockerfile +++ b/Api.MultipartJson/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.PolicyHeaders.ContentSecurityPolicy/Dockerfile b/Api.PolicyHeaders.ContentSecurityPolicy/Dockerfile index 0bcd6f21..ca253a15 100644 --- a/Api.PolicyHeaders.ContentSecurityPolicy/Dockerfile +++ b/Api.PolicyHeaders.ContentSecurityPolicy/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.PolicyHeaders.ContentTypeOptions/Dockerfile b/Api.PolicyHeaders.ContentTypeOptions/Dockerfile index fddba199..61091918 100644 --- a/Api.PolicyHeaders.ContentTypeOptions/Dockerfile +++ b/Api.PolicyHeaders.ContentTypeOptions/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.PolicyHeaders.Cors/Dockerfile b/Api.PolicyHeaders.Cors/Dockerfile index 1c4803ef..eb51a341 100644 --- a/Api.PolicyHeaders.Cors/Dockerfile +++ b/Api.PolicyHeaders.Cors/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.PolicyHeaders.ForwardedHeaders/Dockerfile b/Api.PolicyHeaders.ForwardedHeaders/Dockerfile index 2efeaed7..9fd83bad 100644 --- a/Api.PolicyHeaders.ForwardedHeaders/Dockerfile +++ b/Api.PolicyHeaders.ForwardedHeaders/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.PolicyHeaders.FrameOptions/Dockerfile b/Api.PolicyHeaders.FrameOptions/Dockerfile index dae0c7d9..170ccbbc 100644 --- a/Api.PolicyHeaders.FrameOptions/Dockerfile +++ b/Api.PolicyHeaders.FrameOptions/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.PolicyHeaders.Hsts/Dockerfile b/Api.PolicyHeaders.Hsts/Dockerfile index 477de8f6..a24c0b9a 100644 --- a/Api.PolicyHeaders.Hsts/Dockerfile +++ b/Api.PolicyHeaders.Hsts/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.PolicyHeaders.ReferrerPolicy/Dockerfile b/Api.PolicyHeaders.ReferrerPolicy/Dockerfile index 48e82726..5c0e69ea 100644 --- a/Api.PolicyHeaders.ReferrerPolicy/Dockerfile +++ b/Api.PolicyHeaders.ReferrerPolicy/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.PolicyHeaders.Robots/Dockerfile b/Api.PolicyHeaders.Robots/Dockerfile index f349f074..171c35de 100644 --- a/Api.PolicyHeaders.Robots/Dockerfile +++ b/Api.PolicyHeaders.Robots/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.PolicyHeaders.XssProtection/Dockerfile b/Api.PolicyHeaders.XssProtection/Dockerfile index b9e1371d..ebf3c4ae 100644 --- a/Api.PolicyHeaders.XssProtection/Dockerfile +++ b/Api.PolicyHeaders.XssProtection/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.RequestTracing/Dockerfile b/Api.RequestTracing/Dockerfile index 316aafa3..254a738f 100644 --- a/Api.RequestTracing/Dockerfile +++ b/Api.RequestTracing/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.ResponseCache/Dockerfile b/Api.ResponseCache/Dockerfile index 3dbc645f..07f6a978 100644 --- a/Api.ResponseCache/Dockerfile +++ b/Api.ResponseCache/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.ResponseCompression/Dockerfile b/Api.ResponseCompression/Dockerfile index e0f4803d..1d847de7 100644 --- a/Api.ResponseCompression/Dockerfile +++ b/Api.ResponseCompression/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Session/Dockerfile b/Api.Session/Dockerfile index 7b0f7c94..32695c03 100644 --- a/Api.Session/Dockerfile +++ b/Api.Session/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.StartupTasks/Dockerfile b/Api.StartupTasks/Dockerfile index 13ab1f4e..e87b676a 100644 --- a/Api.StartupTasks/Dockerfile +++ b/Api.StartupTasks/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.StaticFiles/Dockerfile b/Api.StaticFiles/Dockerfile index ab17eafa..2446d18b 100644 --- a/Api.StaticFiles/Dockerfile +++ b/Api.StaticFiles/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Storage.Azure/Dockerfile b/Api.Storage.Azure/Dockerfile index 6b462057..24d5452f 100644 --- a/Api.Storage.Azure/Dockerfile +++ b/Api.Storage.Azure/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Storage.Local/Dockerfile b/Api.Storage.Local/Dockerfile index 657921b0..57c88425 100644 --- a/Api.Storage.Local/Dockerfile +++ b/Api.Storage.Local/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.TimeZone/Dockerfile b/Api.TimeZone/Dockerfile index f7c7188e..12559462 100644 --- a/Api.TimeZone/Dockerfile +++ b/Api.TimeZone/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Versioning/.kubernetes/deployment.yaml b/Api.Versioning/.kubernetes/deployment.yaml index 00eb67cf..9871912e 100644 --- a/Api.Versioning/.kubernetes/deployment.yaml +++ b/Api.Versioning/.kubernetes/deployment.yaml @@ -73,4 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - diff --git a/Api.Versioning/Dockerfile b/Api.Versioning/Dockerfile index 079b95c9..1dfe75f6 100644 --- a/Api.Versioning/Dockerfile +++ b/Api.Versioning/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.VirusScan/Dockerfile b/Api.VirusScan/Dockerfile index 6fde6c7c..b8b3909e 100644 --- a/Api.VirusScan/Dockerfile +++ b/Api.VirusScan/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api._Blank/Dockerfile b/Api._Blank/Dockerfile index c06b6792..4c3ac629 100644 --- a/Api._Blank/Dockerfile +++ b/Api._Blank/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Web._Blank/.kubernetes/deployment.yaml b/Web._Blank/.kubernetes/deployment.yaml index 00eb67cf..9871912e 100644 --- a/Web._Blank/.kubernetes/deployment.yaml +++ b/Web._Blank/.kubernetes/deployment.yaml @@ -73,4 +73,3 @@ spec: periodSeconds: 5 initialDelaySeconds: 20 timeoutSeconds: 2 - diff --git a/Web._Blank/Dockerfile b/Web._Blank/Dockerfile index 119abdb6..6fcb772e 100644 --- a/Web._Blank/Dockerfile +++ b/Web._Blank/Dockerfile @@ -29,6 +29,9 @@ RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . + +RUN mkdir -p /app/wwwroot + ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true From 412d4d44eb167d494cdc0f9ec2d49ab27529cb59 Mon Sep 17 00:00:00 2001 From: vivet Date: Wed, 8 Jul 2026 11:05:07 +0200 Subject: [PATCH 16/33] Updated --- .../.kubernetes/deployment.yaml | 14 ++++++- Api.Eventing.RabbitMq/README.md | 14 ++++++- .../.kubernetes/cronjob.yaml | 30 ++++++++++----- Console.Eventing.RabbitMq/README.md | 38 ++++++++++++------- Console.Storage.Azure/README.md | 4 +- 5 files changed, 71 insertions(+), 29 deletions(-) diff --git a/Api.Eventing.RabbitMq/.kubernetes/deployment.yaml b/Api.Eventing.RabbitMq/.kubernetes/deployment.yaml index c4aa90b6..5a30d851 100644 --- a/Api.Eventing.RabbitMq/.kubernetes/deployment.yaml +++ b/Api.Eventing.RabbitMq/.kubernetes/deployment.yaml @@ -38,15 +38,25 @@ spec: - containerPort: 8080 imagePullPolicy: Always env: + - name: Eventing__Credentials__Host + valueFrom: + secretKeyRef: + name: rabbitmq-default-user + key: host + - name: Eventing__Credentials__Port + valueFrom: + secretKeyRef: + name: rabbitmq-default-user + key: port - name: Eventing__Credentials__Id valueFrom: secretKeyRef: - name: rabbitmq-auth + name: rabbitmq-default-user key: username - name: Eventing__Credentials__Secret valueFrom: secretKeyRef: - name: rabbitmq-auth + name: rabbitmq-default-user key: password envFrom: - configMapRef: diff --git a/Api.Eventing.RabbitMq/README.md b/Api.Eventing.RabbitMq/README.md index 26521f3f..6ea72306 100644 --- a/Api.Eventing.RabbitMq/README.md +++ b/Api.Eventing.RabbitMq/README.md @@ -135,15 +135,25 @@ spec: spec: containers: env: + - name: Eventing__Credentials__Host + valueFrom: + secretKeyRef: + name: rabbitmq-default-user + key: host + - name: Eventing__Credentials__Port + valueFrom: + secretKeyRef: + name: rabbitmq-default-user + key: port - name: Eventing__Credentials__Id valueFrom: secretKeyRef: - name: rabbitmq-auth + name: rabbitmq-default-user key: username - name: Eventing__Credentials__Secret valueFrom: secretKeyRef: - name: rabbitmq-auth + name: rabbitmq-default-user key: password ``` diff --git a/Console.Eventing.RabbitMq/.kubernetes/cronjob.yaml b/Console.Eventing.RabbitMq/.kubernetes/cronjob.yaml index 606ce554..3ceb7bba 100644 --- a/Console.Eventing.RabbitMq/.kubernetes/cronjob.yaml +++ b/Console.Eventing.RabbitMq/.kubernetes/cronjob.yaml @@ -27,16 +27,26 @@ spec: image: %CONTAINER_REGISTRY_HOST%/%IMAGE_NAME%:%VERSION% imagePullPolicy: Always env: - - name: Eventing__Credentials__Id - valueFrom: - secretKeyRef: - name: rabbitmq-auth - key: username - - name: Eventing__Credentials__Secret - valueFrom: - secretKeyRef: - name: rabbitmq-auth - key: password + - name: Eventing__Credentials__Host + valueFrom: + secretKeyRef: + name: rabbitmq-default-user + key: host + - name: Eventing__Credentials__Port + valueFrom: + secretKeyRef: + name: rabbitmq-default-user + key: port + - name: Eventing__Credentials__Id + valueFrom: + secretKeyRef: + name: rabbitmq-default-user + key: username + - name: Eventing__Credentials__Secret + valueFrom: + secretKeyRef: + name: rabbitmq-default-user + key: password envFrom: - configMapRef: name: %SERVICE_NAME%-config diff --git a/Console.Eventing.RabbitMq/README.md b/Console.Eventing.RabbitMq/README.md index ba631586..3a8fd651 100644 --- a/Console.Eventing.RabbitMq/README.md +++ b/Console.Eventing.RabbitMq/README.md @@ -106,20 +106,32 @@ Added the `rabbitmq` secret for password to the `cronjob.yaml`. ```yaml spec: - template: + jobTemplate: spec: - containers: - env: - - name: Eventing__Credentials__Id - valueFrom: - secretKeyRef: - name: rabbitmq-auth - key: username - - name: Eventing__Credentials__Secret - valueFrom: - secretKeyRef: - name: rabbitmq-auth - key: password + template: + spec: + containers: + env: + - name: Eventing__Credentials__Host + valueFrom: + secretKeyRef: + name: rabbitmq-default-user + key: host + - name: Eventing__Credentials__Port + valueFrom: + secretKeyRef: + name: rabbitmq-default-user + key: port + - name: Eventing__Credentials__Id + valueFrom: + secretKeyRef: + name: rabbitmq-default-user + key: username + - name: Eventing__Credentials__Secret + valueFrom: + secretKeyRef: + name: rabbitmq-default-user + key: password ``` > ⚠️ The `rabbitmq` secret is created alongside the **[Nano Azure Kubernetes Eventing](https://github.com/Nano-Core/Nano.Azure.Kubernetes/tree/master/Nano.Azure.Kubernetes.RabbitMQ)** diff --git a/Console.Storage.Azure/README.md b/Console.Storage.Azure/README.md index d34d477f..ab35ece9 100644 --- a/Console.Storage.Azure/README.md +++ b/Console.Storage.Azure/README.md @@ -100,8 +100,8 @@ Additionally, this step has been added to ensure the file share is created befor ```yaml - name: Create Fileshare -shell: pwsh -run: | + shell: pwsh + run: | $env:STORAGE_ACCOUNT_NAME = az storage account list -g $env:AZURE_GROUP_STORAGE --query [0].name -o tsv; $env:FILE_SHARE_EXISTS = az storage share-rm exists ` From 1dec350384dcc836a909871bcaf1d3bb7f91b543 Mon Sep 17 00:00:00 2001 From: vivet Date: Wed, 8 Jul 2026 14:33:04 +0200 Subject: [PATCH 17/33] Updated --- .../Api.ApiClients.Audit.Service/Dockerfile.Local | 2 ++ Api.ApiClients.Audit/Api.ApiClients.Audit/Dockerfile.Local | 2 ++ Api.ApiClients.Audit/Dockerfile | 1 + .../Api.ApiClients.Entity.Service/Dockerfile.Local | 2 ++ .../Api.ApiClients.Entity/Dockerfile.Local | 2 ++ Api.ApiClients.Entity/Dockerfile | 1 + .../Api.ApiClients.RootLogin.Service/Dockerfile.Local | 2 ++ .../Api.ApiClients.RootLogin/Dockerfile.Local | 2 ++ Api.ApiClients.RootLogIn/Dockerfile | 1 + Api.ApiClients/Api.ApiClients.Service/Dockerfile.Local | 2 ++ Api.ApiClients/Api.ApiClients/Dockerfile.Local | 2 ++ Api.ApiClients/Dockerfile | 1 + .../Api.Auth.External.Custom/Dockerfile.Local | 2 ++ Api.Auth.External.Custom/Dockerfile | 1 + Api.Auth.RootLogin/Api.Auth.RootLogin/Dockerfile.Local | 2 ++ Api.Auth.RootLogin/Dockerfile | 1 + Api.Authorization/Api.Authorization/Dockerfile.Local | 2 ++ Api.Authorization/Dockerfile | 1 + .../Api.ContentNegotiation/Dockerfile.Local | 2 ++ Api.ContentNegotiation/Dockerfile | 1 + Api.Cookies/Api.Cookies/Dockerfile.Local | 2 ++ Api.Cookies/Dockerfile | 1 + .../Api.CustomConfigSection/Dockerfile.Local | 2 ++ Api.CustomConfigSection/Dockerfile | 1 + Api.CustomMiddleware/Api.CustomMiddleware/Dockerfile.Local | 2 ++ Api.CustomMiddleware/Dockerfile | 1 + Api.CustomService/Api.CustomService/Dockerfile.Local | 2 ++ Api.CustomService/Dockerfile | 1 + Api.Data.Audit/Api.Data.Audit/Dockerfile.Local | 2 ++ Api.Data.Audit/Dockerfile | 1 + .../Api.Data.EntityEvents.Subscriber/Dockerfile.Local | 2 ++ .../Api.Data.EntityEvents/Dockerfile.Local | 2 ++ Api.Data.EntityEvents/Dockerfile | 1 + .../Api.Data.Identity.Auth.ApiKey/Dockerfile.Local | 2 ++ Api.Data.Identity.Auth.ApiKey/Dockerfile | 1 + .../Api.Data.Identity.Auth.External.Custom/Dockerfile.Local | 2 ++ Api.Data.Identity.Auth.External.Custom/Dockerfile | 1 + .../Api.Data.Identity.Auth.Jwt/Dockerfile.Local | 2 ++ Api.Data.Identity.Auth.Jwt/Dockerfile | 1 + Api.Data.Identity/Api.Data.Identity/Dockerfile.Local | 2 ++ Api.Data.Identity/Dockerfile | 1 + Api.Data.InMemory/Api.Data.InMemory/Dockerfile.Local | 2 ++ Api.Data.InMemory/Dockerfile | 1 + Api.Data.LazyLoading/Api.Data.LazyLoading/Dockerfile.Local | 2 ++ Api.Data.LazyLoading/Dockerfile | 1 + .../Api.Data.MySql.Collation/Dockerfile.Local | 2 ++ Api.Data.MySql.Collation/Dockerfile | 1 + .../Api.Data.MySql.Mappings/Dockerfile.Local | 2 ++ Api.Data.MySql.Mappings/Dockerfile | 1 + .../Api.Data.MySql.Spatial/Dockerfile.Local | 2 ++ Api.Data.MySql.Spatial/Dockerfile | 1 + .../Api.Data.MySql.StoredProcedures/Dockerfile.Local | 2 ++ Api.Data.MySql.StoredProcedures/Dockerfile | 1 + Api.Data.MySql.Views/Api.Data.MySql.Views/Dockerfile.Local | 2 ++ Api.Data.MySql.Views/Dockerfile | 1 + Api.Data.MySql/Api.Data.MySql/Dockerfile.Local | 2 ++ Api.Data.MySql/Dockerfile | 1 + .../Api.Data.PostgreSQL.Spatial/Dockerfile.Local | 2 ++ Api.Data.PostgreSQL.Spatial/Dockerfile | 1 + Api.Data.PostgreSQL/Api.Data.PostgreSQL/Dockerfile.Local | 2 ++ Api.Data.PostgreSQL/Dockerfile | 1 + .../Api.Data.Repository.AutoSave/Dockerfile.Local | 2 ++ Api.Data.Repository.AutoSave/Dockerfile | 1 + .../Api.Data.Repository.Includes/Dockerfile.Local | 2 ++ Api.Data.Repository.Includes/Dockerfile | 1 + Api.Data.SoftDelete/Api.Data.SoftDelete/Dockerfile.Local | 2 ++ Api.Data.SoftDelete/Dockerfile | 1 + Api.Data.SqLite/Api.Data.SqLite/Dockerfile.Local | 2 ++ Api.Data.SqLite/Dockerfile | 1 + .../Api.Data.SqlServer.Spatial/Dockerfile.Local | 2 ++ Api.Data.SqlServer.Spatial/Dockerfile | 1 + Api.Data.SqlServer/Api.Data.SqlServer/Dockerfile.Local | 2 ++ Api.Data.SqlServer/Dockerfile | 1 + Api.Data.Triggers/Api.Data.Triggers/Dockerfile.Local | 2 ++ Api.Data.Triggers/Dockerfile | 1 + .../Api.Documentation.Csp/Dockerfile.Local | 2 ++ Api.Documentation.Csp/Dockerfile | 1 + Api.Documentation/Api.Documentation/Dockerfile.Local | 2 ++ Api.Documentation/Dockerfile | 1 + Api.ErrorHandling/Api.ErrorHandling/Dockerfile.Local | 2 ++ Api.ErrorHandling/Dockerfile | 1 + .../Api.Eventing.RabbitMq/Dockerfile.Local | 2 ++ Api.Eventing.RabbitMq/Dockerfile | 1 + Api.HealthChecks/Api.HealthChecks/Dockerfile.Local | 2 ++ Api.HealthChecks/Dockerfile | 1 + Api.Hosting.Http/Api.Hosting.Http/Dockerfile.Local | 2 ++ Api.Hosting.Http/Dockerfile | 1 + Api.Hosting.Https/Api.Hosting.Https/Dockerfile.Local | 2 ++ Api.Hosting.Https/Dockerfile | 1 + .../Api.Hosting.MultipartLimits/Dockerfile.Local | 2 ++ Api.Hosting.MultipartLimits/Dockerfile | 1 + Api.Localization/Api.Localization/Dockerfile.Local | 2 ++ Api.Localization/Dockerfile | 1 + Api.Logging.Log4Net/Api.Logging.Log4Net/Dockerfile.Local | 2 ++ Api.Logging.Log4Net/Dockerfile | 1 + .../Api.Logging.Microsoft/Dockerfile.Local | 2 ++ Api.Logging.Microsoft/Dockerfile | 1 + Api.Logging.NLog/Api.Logging.NLog/Dockerfile.Local | 2 ++ Api.Logging.NLog/Dockerfile | 1 + Api.Logging.Serilog/Api.Logging.Serilog/Dockerfile.Local | 2 ++ Api.Logging.Serilog/Dockerfile | 1 + Api.MultipartJson/Api.MultipartJson/Dockerfile.Local | 2 ++ Api.MultipartJson/Dockerfile | 1 + .../Dockerfile.Local | 2 ++ Api.PolicyHeaders.ContentSecurityPolicy/Dockerfile | 1 + .../Api.PolicyHeaders.ContentTypeOptions/Dockerfile.Local | 2 ++ Api.PolicyHeaders.ContentTypeOptions/Dockerfile | 1 + .../Api.PolicyHeaders.Cors/Dockerfile.Local | 2 ++ Api.PolicyHeaders.Cors/Dockerfile | 1 + .../Api.PolicyHeaders.ForwardedHeaders/Dockerfile.Local | 2 ++ Api.PolicyHeaders.ForwardedHeaders/Dockerfile | 1 + .../Api.PolicyHeaders.FrameOptions/Dockerfile.Local | 2 ++ Api.PolicyHeaders.FrameOptions/Dockerfile | 1 + .../Api.PolicyHeaders.Hsts/Dockerfile.Local | 2 ++ Api.PolicyHeaders.Hsts/Dockerfile | 1 + .../Api.PolicyHeaders.ReferrerPolicy/Dockerfile.Local | 2 ++ Api.PolicyHeaders.ReferrerPolicy/Dockerfile | 1 + .../Api.PolicyHeaders.Robots/Dockerfile.Local | 2 ++ Api.PolicyHeaders.Robots/Dockerfile | 1 + .../Api.PolicyHeaders.XssProtection/Dockerfile.Local | 2 ++ Api.PolicyHeaders.XssProtection/Dockerfile | 1 + Api.RequestTracing/Api.RequestTracing/Dockerfile.Local | 2 ++ Api.RequestTracing/Dockerfile | 1 + Api.ResponseCache/Api.ResponseCache/Dockerfile.Local | 2 ++ Api.ResponseCache/Dockerfile | 1 + .../Api.ResponseCompression/Dockerfile.Local | 2 ++ Api.ResponseCompression/Dockerfile | 1 + Api.Session/Api.Session/Dockerfile.Local | 2 ++ Api.Session/Dockerfile | 1 + Api.StartupTasks/Api.StartupTasks/Dockerfile.Local | 2 ++ Api.StartupTasks/Dockerfile | 1 + Api.StaticFiles/Api.StaticFiles/Dockerfile.Local | 2 ++ Api.StaticFiles/Dockerfile | 1 + Api.Storage.Azure/.kubernetes/configmap.yaml | 1 - Api.Storage.Azure/Api.Storage.Azure/Dockerfile.Local | 2 ++ Api.Storage.Azure/Api.Storage.Azure/appsettings.json | 3 +-- Api.Storage.Azure/Dockerfile | 1 + Api.Storage.Azure/README.md | 6 +----- Api.Storage.Local/Api.Storage.Local/Dockerfile.Local | 2 ++ Api.Storage.Local/Dockerfile | 1 + Api.Storage.Local/README.md | 2 +- Api.TimeZone/Api.TimeZone/Dockerfile.Local | 2 ++ Api.TimeZone/Dockerfile | 1 + Api.Versioning/Api.Versioning/Dockerfile.Local | 2 ++ Api.Versioning/Dockerfile | 1 + Api.VirusScan/Api.VirusScan/Dockerfile.Local | 2 ++ Api.VirusScan/Dockerfile | 1 + Api._Blank/Api.Blank/Dockerfile.Local | 2 ++ Api._Blank/Dockerfile | 1 + Web._Blank/Dockerfile | 1 + Web._Blank/Web.Blank/Dockerfile.Local | 2 ++ 151 files changed, 226 insertions(+), 9 deletions(-) diff --git a/Api.ApiClients.Audit/Api.ApiClients.Audit.Service/Dockerfile.Local b/Api.ApiClients.Audit/Api.ApiClients.Audit.Service/Dockerfile.Local index 1e6d12c6..4310acdb 100644 --- a/Api.ApiClients.Audit/Api.ApiClients.Audit.Service/Dockerfile.Local +++ b/Api.ApiClients.Audit/Api.ApiClients.Audit.Service/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.ApiClients.Audit.Service.dll"] \ No newline at end of file diff --git a/Api.ApiClients.Audit/Api.ApiClients.Audit/Dockerfile.Local b/Api.ApiClients.Audit/Api.ApiClients.Audit/Dockerfile.Local index f55f6733..383c565c 100644 --- a/Api.ApiClients.Audit/Api.ApiClients.Audit/Dockerfile.Local +++ b/Api.ApiClients.Audit/Api.ApiClients.Audit/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.ApiClients.Audit.dll"] \ No newline at end of file diff --git a/Api.ApiClients.Audit/Dockerfile b/Api.ApiClients.Audit/Dockerfile index c5fbf044..18cc52ae 100644 --- a/Api.ApiClients.Audit/Dockerfile +++ b/Api.ApiClients.Audit/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.ApiClients.Entity/Api.ApiClients.Entity.Service/Dockerfile.Local b/Api.ApiClients.Entity/Api.ApiClients.Entity.Service/Dockerfile.Local index 9223f500..7ed69ae9 100644 --- a/Api.ApiClients.Entity/Api.ApiClients.Entity.Service/Dockerfile.Local +++ b/Api.ApiClients.Entity/Api.ApiClients.Entity.Service/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.ApiClients.Entity.Service.dll"] \ No newline at end of file diff --git a/Api.ApiClients.Entity/Api.ApiClients.Entity/Dockerfile.Local b/Api.ApiClients.Entity/Api.ApiClients.Entity/Dockerfile.Local index 72d7216b..3a6a08e0 100644 --- a/Api.ApiClients.Entity/Api.ApiClients.Entity/Dockerfile.Local +++ b/Api.ApiClients.Entity/Api.ApiClients.Entity/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.ApiClients.Entity.dll"] \ No newline at end of file diff --git a/Api.ApiClients.Entity/Dockerfile b/Api.ApiClients.Entity/Dockerfile index f3f3598c..b6bc2925 100644 --- a/Api.ApiClients.Entity/Dockerfile +++ b/Api.ApiClients.Entity/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.ApiClients.RootLogIn/Api.ApiClients.RootLogin.Service/Dockerfile.Local b/Api.ApiClients.RootLogIn/Api.ApiClients.RootLogin.Service/Dockerfile.Local index e6afa324..18c597d8 100644 --- a/Api.ApiClients.RootLogIn/Api.ApiClients.RootLogin.Service/Dockerfile.Local +++ b/Api.ApiClients.RootLogIn/Api.ApiClients.RootLogin.Service/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Auth.RootLogin.Service.dll"] \ No newline at end of file diff --git a/Api.ApiClients.RootLogIn/Api.ApiClients.RootLogin/Dockerfile.Local b/Api.ApiClients.RootLogIn/Api.ApiClients.RootLogin/Dockerfile.Local index 557a434d..e09e773f 100644 --- a/Api.ApiClients.RootLogIn/Api.ApiClients.RootLogin/Dockerfile.Local +++ b/Api.ApiClients.RootLogIn/Api.ApiClients.RootLogin/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.ApiClients.RootLogIn.dll"] \ No newline at end of file diff --git a/Api.ApiClients.RootLogIn/Dockerfile b/Api.ApiClients.RootLogIn/Dockerfile index b30aad79..f48b44c8 100644 --- a/Api.ApiClients.RootLogIn/Dockerfile +++ b/Api.ApiClients.RootLogIn/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.ApiClients/Api.ApiClients.Service/Dockerfile.Local b/Api.ApiClients/Api.ApiClients.Service/Dockerfile.Local index 5d914dde..17025cf0 100644 --- a/Api.ApiClients/Api.ApiClients.Service/Dockerfile.Local +++ b/Api.ApiClients/Api.ApiClients.Service/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.ApiClients.Service.dll"] \ No newline at end of file diff --git a/Api.ApiClients/Api.ApiClients/Dockerfile.Local b/Api.ApiClients/Api.ApiClients/Dockerfile.Local index ce847262..6ef7cfd1 100644 --- a/Api.ApiClients/Api.ApiClients/Dockerfile.Local +++ b/Api.ApiClients/Api.ApiClients/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.ApiClients.dll"] \ No newline at end of file diff --git a/Api.ApiClients/Dockerfile b/Api.ApiClients/Dockerfile index 7f00a073..42ba7394 100644 --- a/Api.ApiClients/Dockerfile +++ b/Api.ApiClients/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Auth.External.Custom/Api.Auth.External.Custom/Dockerfile.Local b/Api.Auth.External.Custom/Api.Auth.External.Custom/Dockerfile.Local index 4d00259a..d95cf1e7 100644 --- a/Api.Auth.External.Custom/Api.Auth.External.Custom/Dockerfile.Local +++ b/Api.Auth.External.Custom/Api.Auth.External.Custom/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Auth.External.Custom.dll"] \ No newline at end of file diff --git a/Api.Auth.External.Custom/Dockerfile b/Api.Auth.External.Custom/Dockerfile index 2fbca1d0..63fc7b88 100644 --- a/Api.Auth.External.Custom/Dockerfile +++ b/Api.Auth.External.Custom/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Auth.RootLogin/Api.Auth.RootLogin/Dockerfile.Local b/Api.Auth.RootLogin/Api.Auth.RootLogin/Dockerfile.Local index d87906a5..97c76dbc 100644 --- a/Api.Auth.RootLogin/Api.Auth.RootLogin/Dockerfile.Local +++ b/Api.Auth.RootLogin/Api.Auth.RootLogin/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Auth.RootLogin.dll"] \ No newline at end of file diff --git a/Api.Auth.RootLogin/Dockerfile b/Api.Auth.RootLogin/Dockerfile index a620738a..30705e8f 100644 --- a/Api.Auth.RootLogin/Dockerfile +++ b/Api.Auth.RootLogin/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Authorization/Api.Authorization/Dockerfile.Local b/Api.Authorization/Api.Authorization/Dockerfile.Local index bd2f4fec..a4fd5442 100644 --- a/Api.Authorization/Api.Authorization/Dockerfile.Local +++ b/Api.Authorization/Api.Authorization/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Authorization.dll"] \ No newline at end of file diff --git a/Api.Authorization/Dockerfile b/Api.Authorization/Dockerfile index 4a8a8341..19ff6910 100644 --- a/Api.Authorization/Dockerfile +++ b/Api.Authorization/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.ContentNegotiation/Api.ContentNegotiation/Dockerfile.Local b/Api.ContentNegotiation/Api.ContentNegotiation/Dockerfile.Local index dc9daf88..f9204f6d 100644 --- a/Api.ContentNegotiation/Api.ContentNegotiation/Dockerfile.Local +++ b/Api.ContentNegotiation/Api.ContentNegotiation/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.ContentNegotiation.dll"] \ No newline at end of file diff --git a/Api.ContentNegotiation/Dockerfile b/Api.ContentNegotiation/Dockerfile index 6b668fbf..d2576397 100644 --- a/Api.ContentNegotiation/Dockerfile +++ b/Api.ContentNegotiation/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Cookies/Api.Cookies/Dockerfile.Local b/Api.Cookies/Api.Cookies/Dockerfile.Local index 09cc9dd0..04fd490c 100644 --- a/Api.Cookies/Api.Cookies/Dockerfile.Local +++ b/Api.Cookies/Api.Cookies/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Cookies.dll"] \ No newline at end of file diff --git a/Api.Cookies/Dockerfile b/Api.Cookies/Dockerfile index 48a646b1..7985f6cc 100644 --- a/Api.Cookies/Dockerfile +++ b/Api.Cookies/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.CustomConfigSection/Api.CustomConfigSection/Dockerfile.Local b/Api.CustomConfigSection/Api.CustomConfigSection/Dockerfile.Local index 96d8dc2e..5e73c684 100644 --- a/Api.CustomConfigSection/Api.CustomConfigSection/Dockerfile.Local +++ b/Api.CustomConfigSection/Api.CustomConfigSection/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.CustomConfigSection.dll"] \ No newline at end of file diff --git a/Api.CustomConfigSection/Dockerfile b/Api.CustomConfigSection/Dockerfile index 616f3a5f..8bf39f61 100644 --- a/Api.CustomConfigSection/Dockerfile +++ b/Api.CustomConfigSection/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.CustomMiddleware/Api.CustomMiddleware/Dockerfile.Local b/Api.CustomMiddleware/Api.CustomMiddleware/Dockerfile.Local index e059926f..40ba371d 100644 --- a/Api.CustomMiddleware/Api.CustomMiddleware/Dockerfile.Local +++ b/Api.CustomMiddleware/Api.CustomMiddleware/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.CustomMiddleware.dll"] \ No newline at end of file diff --git a/Api.CustomMiddleware/Dockerfile b/Api.CustomMiddleware/Dockerfile index fd28696d..102e9115 100644 --- a/Api.CustomMiddleware/Dockerfile +++ b/Api.CustomMiddleware/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.CustomService/Api.CustomService/Dockerfile.Local b/Api.CustomService/Api.CustomService/Dockerfile.Local index 83ac0c36..21f64860 100644 --- a/Api.CustomService/Api.CustomService/Dockerfile.Local +++ b/Api.CustomService/Api.CustomService/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.CustomService.dll"] \ No newline at end of file diff --git a/Api.CustomService/Dockerfile b/Api.CustomService/Dockerfile index f739cb77..4265f374 100644 --- a/Api.CustomService/Dockerfile +++ b/Api.CustomService/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.Audit/Api.Data.Audit/Dockerfile.Local b/Api.Data.Audit/Api.Data.Audit/Dockerfile.Local index 02405ae6..4660beaf 100644 --- a/Api.Data.Audit/Api.Data.Audit/Dockerfile.Local +++ b/Api.Data.Audit/Api.Data.Audit/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.Audit.dll"] \ No newline at end of file diff --git a/Api.Data.Audit/Dockerfile b/Api.Data.Audit/Dockerfile index 8f2ef3ec..a58c06ab 100644 --- a/Api.Data.Audit/Dockerfile +++ b/Api.Data.Audit/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.EntityEvents/Api.Data.EntityEvents.Subscriber/Dockerfile.Local b/Api.Data.EntityEvents/Api.Data.EntityEvents.Subscriber/Dockerfile.Local index 6d48bd26..7b2731b0 100644 --- a/Api.Data.EntityEvents/Api.Data.EntityEvents.Subscriber/Dockerfile.Local +++ b/Api.Data.EntityEvents/Api.Data.EntityEvents.Subscriber/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.EntityEvents.Subscriber.dll"] \ No newline at end of file diff --git a/Api.Data.EntityEvents/Api.Data.EntityEvents/Dockerfile.Local b/Api.Data.EntityEvents/Api.Data.EntityEvents/Dockerfile.Local index b78f25ae..019c7fef 100644 --- a/Api.Data.EntityEvents/Api.Data.EntityEvents/Dockerfile.Local +++ b/Api.Data.EntityEvents/Api.Data.EntityEvents/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.EntityEvents.dll"] \ No newline at end of file diff --git a/Api.Data.EntityEvents/Dockerfile b/Api.Data.EntityEvents/Dockerfile index bdd7b025..5d8feeb5 100644 --- a/Api.Data.EntityEvents/Dockerfile +++ b/Api.Data.EntityEvents/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.Identity.Auth.ApiKey/Api.Data.Identity.Auth.ApiKey/Dockerfile.Local b/Api.Data.Identity.Auth.ApiKey/Api.Data.Identity.Auth.ApiKey/Dockerfile.Local index bab003df..4b93dba9 100644 --- a/Api.Data.Identity.Auth.ApiKey/Api.Data.Identity.Auth.ApiKey/Dockerfile.Local +++ b/Api.Data.Identity.Auth.ApiKey/Api.Data.Identity.Auth.ApiKey/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.Identity.Auth.ApiKey.dll"] \ No newline at end of file diff --git a/Api.Data.Identity.Auth.ApiKey/Dockerfile b/Api.Data.Identity.Auth.ApiKey/Dockerfile index 2b88f129..94f9f717 100644 --- a/Api.Data.Identity.Auth.ApiKey/Dockerfile +++ b/Api.Data.Identity.Auth.ApiKey/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.Identity.Auth.External.Custom/Api.Data.Identity.Auth.External.Custom/Dockerfile.Local b/Api.Data.Identity.Auth.External.Custom/Api.Data.Identity.Auth.External.Custom/Dockerfile.Local index a00c6450..8a572c27 100644 --- a/Api.Data.Identity.Auth.External.Custom/Api.Data.Identity.Auth.External.Custom/Dockerfile.Local +++ b/Api.Data.Identity.Auth.External.Custom/Api.Data.Identity.Auth.External.Custom/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.Identity.Auth.External.Custom.dll"] \ No newline at end of file diff --git a/Api.Data.Identity.Auth.External.Custom/Dockerfile b/Api.Data.Identity.Auth.External.Custom/Dockerfile index 506b837e..38d1a8bd 100644 --- a/Api.Data.Identity.Auth.External.Custom/Dockerfile +++ b/Api.Data.Identity.Auth.External.Custom/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.Identity.Auth.Jwt/Api.Data.Identity.Auth.Jwt/Dockerfile.Local b/Api.Data.Identity.Auth.Jwt/Api.Data.Identity.Auth.Jwt/Dockerfile.Local index 678ca81b..ee5ad4a0 100644 --- a/Api.Data.Identity.Auth.Jwt/Api.Data.Identity.Auth.Jwt/Dockerfile.Local +++ b/Api.Data.Identity.Auth.Jwt/Api.Data.Identity.Auth.Jwt/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.Identity.Auth.Jwt.dll"] \ No newline at end of file diff --git a/Api.Data.Identity.Auth.Jwt/Dockerfile b/Api.Data.Identity.Auth.Jwt/Dockerfile index 418e28cc..9c666c21 100644 --- a/Api.Data.Identity.Auth.Jwt/Dockerfile +++ b/Api.Data.Identity.Auth.Jwt/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.Identity/Api.Data.Identity/Dockerfile.Local b/Api.Data.Identity/Api.Data.Identity/Dockerfile.Local index a05f0920..44a50c05 100644 --- a/Api.Data.Identity/Api.Data.Identity/Dockerfile.Local +++ b/Api.Data.Identity/Api.Data.Identity/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.Identity.dll"] \ No newline at end of file diff --git a/Api.Data.Identity/Dockerfile b/Api.Data.Identity/Dockerfile index 40768f27..bdbd7948 100644 --- a/Api.Data.Identity/Dockerfile +++ b/Api.Data.Identity/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.InMemory/Api.Data.InMemory/Dockerfile.Local b/Api.Data.InMemory/Api.Data.InMemory/Dockerfile.Local index a61be1c9..e4500893 100644 --- a/Api.Data.InMemory/Api.Data.InMemory/Dockerfile.Local +++ b/Api.Data.InMemory/Api.Data.InMemory/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.InMemory.dll"] \ No newline at end of file diff --git a/Api.Data.InMemory/Dockerfile b/Api.Data.InMemory/Dockerfile index 2614b5b2..d56f83d7 100644 --- a/Api.Data.InMemory/Dockerfile +++ b/Api.Data.InMemory/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.LazyLoading/Api.Data.LazyLoading/Dockerfile.Local b/Api.Data.LazyLoading/Api.Data.LazyLoading/Dockerfile.Local index ad93161d..4aeaeeb0 100644 --- a/Api.Data.LazyLoading/Api.Data.LazyLoading/Dockerfile.Local +++ b/Api.Data.LazyLoading/Api.Data.LazyLoading/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.LazyLoading.dll"] \ No newline at end of file diff --git a/Api.Data.LazyLoading/Dockerfile b/Api.Data.LazyLoading/Dockerfile index b9c0894a..42bbc82f 100644 --- a/Api.Data.LazyLoading/Dockerfile +++ b/Api.Data.LazyLoading/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.MySql.Collation/Api.Data.MySql.Collation/Dockerfile.Local b/Api.Data.MySql.Collation/Api.Data.MySql.Collation/Dockerfile.Local index f2716c69..bb8d99b2 100644 --- a/Api.Data.MySql.Collation/Api.Data.MySql.Collation/Dockerfile.Local +++ b/Api.Data.MySql.Collation/Api.Data.MySql.Collation/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.MySql.Collation.dll"] \ No newline at end of file diff --git a/Api.Data.MySql.Collation/Dockerfile b/Api.Data.MySql.Collation/Dockerfile index 7c6ed3be..7a43e461 100644 --- a/Api.Data.MySql.Collation/Dockerfile +++ b/Api.Data.MySql.Collation/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.MySql.Mappings/Api.Data.MySql.Mappings/Dockerfile.Local b/Api.Data.MySql.Mappings/Api.Data.MySql.Mappings/Dockerfile.Local index 88ec81d2..7532a55f 100644 --- a/Api.Data.MySql.Mappings/Api.Data.MySql.Mappings/Dockerfile.Local +++ b/Api.Data.MySql.Mappings/Api.Data.MySql.Mappings/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.MySql.Mappings.dll"] \ No newline at end of file diff --git a/Api.Data.MySql.Mappings/Dockerfile b/Api.Data.MySql.Mappings/Dockerfile index b3dbeeee..c10505dc 100644 --- a/Api.Data.MySql.Mappings/Dockerfile +++ b/Api.Data.MySql.Mappings/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.MySql.Spatial/Api.Data.MySql.Spatial/Dockerfile.Local b/Api.Data.MySql.Spatial/Api.Data.MySql.Spatial/Dockerfile.Local index 33203aa6..414bb67a 100644 --- a/Api.Data.MySql.Spatial/Api.Data.MySql.Spatial/Dockerfile.Local +++ b/Api.Data.MySql.Spatial/Api.Data.MySql.Spatial/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.MySql.Spatial.dll"] \ No newline at end of file diff --git a/Api.Data.MySql.Spatial/Dockerfile b/Api.Data.MySql.Spatial/Dockerfile index 331844a3..2579789c 100644 --- a/Api.Data.MySql.Spatial/Dockerfile +++ b/Api.Data.MySql.Spatial/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.MySql.StoredProcedures/Api.Data.MySql.StoredProcedures/Dockerfile.Local b/Api.Data.MySql.StoredProcedures/Api.Data.MySql.StoredProcedures/Dockerfile.Local index e3651ec7..b1585bdc 100644 --- a/Api.Data.MySql.StoredProcedures/Api.Data.MySql.StoredProcedures/Dockerfile.Local +++ b/Api.Data.MySql.StoredProcedures/Api.Data.MySql.StoredProcedures/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.MySql.StoredProcedures.dll"] \ No newline at end of file diff --git a/Api.Data.MySql.StoredProcedures/Dockerfile b/Api.Data.MySql.StoredProcedures/Dockerfile index ca0da4f9..feba0098 100644 --- a/Api.Data.MySql.StoredProcedures/Dockerfile +++ b/Api.Data.MySql.StoredProcedures/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.MySql.Views/Api.Data.MySql.Views/Dockerfile.Local b/Api.Data.MySql.Views/Api.Data.MySql.Views/Dockerfile.Local index bac8ec3f..a71eddd5 100644 --- a/Api.Data.MySql.Views/Api.Data.MySql.Views/Dockerfile.Local +++ b/Api.Data.MySql.Views/Api.Data.MySql.Views/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.MySql.Views.dll"] \ No newline at end of file diff --git a/Api.Data.MySql.Views/Dockerfile b/Api.Data.MySql.Views/Dockerfile index f6d6f283..7922740b 100644 --- a/Api.Data.MySql.Views/Dockerfile +++ b/Api.Data.MySql.Views/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.MySql/Api.Data.MySql/Dockerfile.Local b/Api.Data.MySql/Api.Data.MySql/Dockerfile.Local index 2c0d1470..daf3f124 100644 --- a/Api.Data.MySql/Api.Data.MySql/Dockerfile.Local +++ b/Api.Data.MySql/Api.Data.MySql/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.MySql.dll"] \ No newline at end of file diff --git a/Api.Data.MySql/Dockerfile b/Api.Data.MySql/Dockerfile index acb5a69d..680e6c3b 100644 --- a/Api.Data.MySql/Dockerfile +++ b/Api.Data.MySql/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.PostgreSQL.Spatial/Api.Data.PostgreSQL.Spatial/Dockerfile.Local b/Api.Data.PostgreSQL.Spatial/Api.Data.PostgreSQL.Spatial/Dockerfile.Local index 9e8b385b..67d117e3 100644 --- a/Api.Data.PostgreSQL.Spatial/Api.Data.PostgreSQL.Spatial/Dockerfile.Local +++ b/Api.Data.PostgreSQL.Spatial/Api.Data.PostgreSQL.Spatial/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.PostgreSQL.Spatial.dll"] \ No newline at end of file diff --git a/Api.Data.PostgreSQL.Spatial/Dockerfile b/Api.Data.PostgreSQL.Spatial/Dockerfile index e9e3fb51..5231bcb9 100644 --- a/Api.Data.PostgreSQL.Spatial/Dockerfile +++ b/Api.Data.PostgreSQL.Spatial/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.PostgreSQL/Api.Data.PostgreSQL/Dockerfile.Local b/Api.Data.PostgreSQL/Api.Data.PostgreSQL/Dockerfile.Local index e3fe4a49..2ed1cd4f 100644 --- a/Api.Data.PostgreSQL/Api.Data.PostgreSQL/Dockerfile.Local +++ b/Api.Data.PostgreSQL/Api.Data.PostgreSQL/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.PostgreSQL.dll"] \ No newline at end of file diff --git a/Api.Data.PostgreSQL/Dockerfile b/Api.Data.PostgreSQL/Dockerfile index 53dc7519..5afe6e4b 100644 --- a/Api.Data.PostgreSQL/Dockerfile +++ b/Api.Data.PostgreSQL/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.Repository.AutoSave/Api.Data.Repository.AutoSave/Dockerfile.Local b/Api.Data.Repository.AutoSave/Api.Data.Repository.AutoSave/Dockerfile.Local index 265ee7c3..c7eec079 100644 --- a/Api.Data.Repository.AutoSave/Api.Data.Repository.AutoSave/Dockerfile.Local +++ b/Api.Data.Repository.AutoSave/Api.Data.Repository.AutoSave/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.Repository.AutoSave.dll"] \ No newline at end of file diff --git a/Api.Data.Repository.AutoSave/Dockerfile b/Api.Data.Repository.AutoSave/Dockerfile index 3404c638..04f4949f 100644 --- a/Api.Data.Repository.AutoSave/Dockerfile +++ b/Api.Data.Repository.AutoSave/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.Repository.Includes/Api.Data.Repository.Includes/Dockerfile.Local b/Api.Data.Repository.Includes/Api.Data.Repository.Includes/Dockerfile.Local index f67686a8..d346cc6b 100644 --- a/Api.Data.Repository.Includes/Api.Data.Repository.Includes/Dockerfile.Local +++ b/Api.Data.Repository.Includes/Api.Data.Repository.Includes/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.Repository.Includes.dll"] \ No newline at end of file diff --git a/Api.Data.Repository.Includes/Dockerfile b/Api.Data.Repository.Includes/Dockerfile index f3df9f5b..25101994 100644 --- a/Api.Data.Repository.Includes/Dockerfile +++ b/Api.Data.Repository.Includes/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.SoftDelete/Api.Data.SoftDelete/Dockerfile.Local b/Api.Data.SoftDelete/Api.Data.SoftDelete/Dockerfile.Local index f0398733..00faa108 100644 --- a/Api.Data.SoftDelete/Api.Data.SoftDelete/Dockerfile.Local +++ b/Api.Data.SoftDelete/Api.Data.SoftDelete/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.SoftDelete.dll"] \ No newline at end of file diff --git a/Api.Data.SoftDelete/Dockerfile b/Api.Data.SoftDelete/Dockerfile index 49d091e3..a494a421 100644 --- a/Api.Data.SoftDelete/Dockerfile +++ b/Api.Data.SoftDelete/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.SqLite/Api.Data.SqLite/Dockerfile.Local b/Api.Data.SqLite/Api.Data.SqLite/Dockerfile.Local index 28ad6e11..0dd334f1 100644 --- a/Api.Data.SqLite/Api.Data.SqLite/Dockerfile.Local +++ b/Api.Data.SqLite/Api.Data.SqLite/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.SqLite.dll"] \ No newline at end of file diff --git a/Api.Data.SqLite/Dockerfile b/Api.Data.SqLite/Dockerfile index 77733882..aa01ca87 100644 --- a/Api.Data.SqLite/Dockerfile +++ b/Api.Data.SqLite/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.SqlServer.Spatial/Api.Data.SqlServer.Spatial/Dockerfile.Local b/Api.Data.SqlServer.Spatial/Api.Data.SqlServer.Spatial/Dockerfile.Local index cb81de7f..8b5fa640 100644 --- a/Api.Data.SqlServer.Spatial/Api.Data.SqlServer.Spatial/Dockerfile.Local +++ b/Api.Data.SqlServer.Spatial/Api.Data.SqlServer.Spatial/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.SqlServer.Spatial.dll"] \ No newline at end of file diff --git a/Api.Data.SqlServer.Spatial/Dockerfile b/Api.Data.SqlServer.Spatial/Dockerfile index bcc054ba..e05b9d4b 100644 --- a/Api.Data.SqlServer.Spatial/Dockerfile +++ b/Api.Data.SqlServer.Spatial/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.SqlServer/Api.Data.SqlServer/Dockerfile.Local b/Api.Data.SqlServer/Api.Data.SqlServer/Dockerfile.Local index 8297641c..4cae4ffe 100644 --- a/Api.Data.SqlServer/Api.Data.SqlServer/Dockerfile.Local +++ b/Api.Data.SqlServer/Api.Data.SqlServer/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.SqlServer.dll"] \ No newline at end of file diff --git a/Api.Data.SqlServer/Dockerfile b/Api.Data.SqlServer/Dockerfile index b47e387f..d260d7a1 100644 --- a/Api.Data.SqlServer/Dockerfile +++ b/Api.Data.SqlServer/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Data.Triggers/Api.Data.Triggers/Dockerfile.Local b/Api.Data.Triggers/Api.Data.Triggers/Dockerfile.Local index b8b7fc64..72600b85 100644 --- a/Api.Data.Triggers/Api.Data.Triggers/Dockerfile.Local +++ b/Api.Data.Triggers/Api.Data.Triggers/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Data.Triggers.dll"] \ No newline at end of file diff --git a/Api.Data.Triggers/Dockerfile b/Api.Data.Triggers/Dockerfile index 96c77d82..0225e47b 100644 --- a/Api.Data.Triggers/Dockerfile +++ b/Api.Data.Triggers/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Documentation.Csp/Api.Documentation.Csp/Dockerfile.Local b/Api.Documentation.Csp/Api.Documentation.Csp/Dockerfile.Local index 8f4d7cbf..69031946 100644 --- a/Api.Documentation.Csp/Api.Documentation.Csp/Dockerfile.Local +++ b/Api.Documentation.Csp/Api.Documentation.Csp/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 4443 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Documentation.Csp.dll"] \ No newline at end of file diff --git a/Api.Documentation.Csp/Dockerfile b/Api.Documentation.Csp/Dockerfile index a4a45947..145a982f 100644 --- a/Api.Documentation.Csp/Dockerfile +++ b/Api.Documentation.Csp/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Documentation/Api.Documentation/Dockerfile.Local b/Api.Documentation/Api.Documentation/Dockerfile.Local index 8304fa2a..29c326a8 100644 --- a/Api.Documentation/Api.Documentation/Dockerfile.Local +++ b/Api.Documentation/Api.Documentation/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Documentation.dll"] \ No newline at end of file diff --git a/Api.Documentation/Dockerfile b/Api.Documentation/Dockerfile index ce680f32..d928e41b 100644 --- a/Api.Documentation/Dockerfile +++ b/Api.Documentation/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.ErrorHandling/Api.ErrorHandling/Dockerfile.Local b/Api.ErrorHandling/Api.ErrorHandling/Dockerfile.Local index 77abb0b3..c4679092 100644 --- a/Api.ErrorHandling/Api.ErrorHandling/Dockerfile.Local +++ b/Api.ErrorHandling/Api.ErrorHandling/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.ErrorHandling.dll"] \ No newline at end of file diff --git a/Api.ErrorHandling/Dockerfile b/Api.ErrorHandling/Dockerfile index 33a6169e..621e601b 100644 --- a/Api.ErrorHandling/Dockerfile +++ b/Api.ErrorHandling/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Eventing.RabbitMq/Api.Eventing.RabbitMq/Dockerfile.Local b/Api.Eventing.RabbitMq/Api.Eventing.RabbitMq/Dockerfile.Local index e183367d..7efce886 100644 --- a/Api.Eventing.RabbitMq/Api.Eventing.RabbitMq/Dockerfile.Local +++ b/Api.Eventing.RabbitMq/Api.Eventing.RabbitMq/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Eventing.RabbitMq.dll"] \ No newline at end of file diff --git a/Api.Eventing.RabbitMq/Dockerfile b/Api.Eventing.RabbitMq/Dockerfile index cf4fc6e7..487adf44 100644 --- a/Api.Eventing.RabbitMq/Dockerfile +++ b/Api.Eventing.RabbitMq/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.HealthChecks/Api.HealthChecks/Dockerfile.Local b/Api.HealthChecks/Api.HealthChecks/Dockerfile.Local index 927b61e9..896d1208 100644 --- a/Api.HealthChecks/Api.HealthChecks/Dockerfile.Local +++ b/Api.HealthChecks/Api.HealthChecks/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.HealthChecks.dll"] \ No newline at end of file diff --git a/Api.HealthChecks/Dockerfile b/Api.HealthChecks/Dockerfile index bb962b2f..2dfeea28 100644 --- a/Api.HealthChecks/Dockerfile +++ b/Api.HealthChecks/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Hosting.Http/Api.Hosting.Http/Dockerfile.Local b/Api.Hosting.Http/Api.Hosting.Http/Dockerfile.Local index 272c1ffb..3a443213 100644 --- a/Api.Hosting.Http/Api.Hosting.Http/Dockerfile.Local +++ b/Api.Hosting.Http/Api.Hosting.Http/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Hosting.Http.dll"] \ No newline at end of file diff --git a/Api.Hosting.Http/Dockerfile b/Api.Hosting.Http/Dockerfile index 025f055b..b5601062 100644 --- a/Api.Hosting.Http/Dockerfile +++ b/Api.Hosting.Http/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Hosting.Https/Api.Hosting.Https/Dockerfile.Local b/Api.Hosting.Https/Api.Hosting.Https/Dockerfile.Local index e15900e2..c0b93077 100644 --- a/Api.Hosting.Https/Api.Hosting.Https/Dockerfile.Local +++ b/Api.Hosting.Https/Api.Hosting.Https/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 4443 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Hosting.Https.dll"] \ No newline at end of file diff --git a/Api.Hosting.Https/Dockerfile b/Api.Hosting.Https/Dockerfile index c0f9722b..c001d061 100644 --- a/Api.Hosting.Https/Dockerfile +++ b/Api.Hosting.Https/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Hosting.MultipartLimits/Api.Hosting.MultipartLimits/Dockerfile.Local b/Api.Hosting.MultipartLimits/Api.Hosting.MultipartLimits/Dockerfile.Local index e80d58e4..81a4ac08 100644 --- a/Api.Hosting.MultipartLimits/Api.Hosting.MultipartLimits/Dockerfile.Local +++ b/Api.Hosting.MultipartLimits/Api.Hosting.MultipartLimits/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Hosting.MultipartLimits.dll"] \ No newline at end of file diff --git a/Api.Hosting.MultipartLimits/Dockerfile b/Api.Hosting.MultipartLimits/Dockerfile index 6735a4f4..8c3a1f9a 100644 --- a/Api.Hosting.MultipartLimits/Dockerfile +++ b/Api.Hosting.MultipartLimits/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Localization/Api.Localization/Dockerfile.Local b/Api.Localization/Api.Localization/Dockerfile.Local index 4cb9e786..9cdf2a5a 100644 --- a/Api.Localization/Api.Localization/Dockerfile.Local +++ b/Api.Localization/Api.Localization/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Localization.dll"] \ No newline at end of file diff --git a/Api.Localization/Dockerfile b/Api.Localization/Dockerfile index a40cd0bf..8d9dd6a6 100644 --- a/Api.Localization/Dockerfile +++ b/Api.Localization/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Logging.Log4Net/Api.Logging.Log4Net/Dockerfile.Local b/Api.Logging.Log4Net/Api.Logging.Log4Net/Dockerfile.Local index 722f4503..9e7afe28 100644 --- a/Api.Logging.Log4Net/Api.Logging.Log4Net/Dockerfile.Local +++ b/Api.Logging.Log4Net/Api.Logging.Log4Net/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Logging.Log4Net.dll"] \ No newline at end of file diff --git a/Api.Logging.Log4Net/Dockerfile b/Api.Logging.Log4Net/Dockerfile index 71755b75..13e88f32 100644 --- a/Api.Logging.Log4Net/Dockerfile +++ b/Api.Logging.Log4Net/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Logging.Microsoft/Api.Logging.Microsoft/Dockerfile.Local b/Api.Logging.Microsoft/Api.Logging.Microsoft/Dockerfile.Local index adaac8c3..db46c6db 100644 --- a/Api.Logging.Microsoft/Api.Logging.Microsoft/Dockerfile.Local +++ b/Api.Logging.Microsoft/Api.Logging.Microsoft/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Logging.Microsoft.dll"] \ No newline at end of file diff --git a/Api.Logging.Microsoft/Dockerfile b/Api.Logging.Microsoft/Dockerfile index 1af58d8b..efecbaea 100644 --- a/Api.Logging.Microsoft/Dockerfile +++ b/Api.Logging.Microsoft/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Logging.NLog/Api.Logging.NLog/Dockerfile.Local b/Api.Logging.NLog/Api.Logging.NLog/Dockerfile.Local index e47db8d4..189a4a79 100644 --- a/Api.Logging.NLog/Api.Logging.NLog/Dockerfile.Local +++ b/Api.Logging.NLog/Api.Logging.NLog/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Logging.NLog.dll"] \ No newline at end of file diff --git a/Api.Logging.NLog/Dockerfile b/Api.Logging.NLog/Dockerfile index e5eb8fc8..7a27e439 100644 --- a/Api.Logging.NLog/Dockerfile +++ b/Api.Logging.NLog/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Logging.Serilog/Api.Logging.Serilog/Dockerfile.Local b/Api.Logging.Serilog/Api.Logging.Serilog/Dockerfile.Local index 006fb412..8e77303a 100644 --- a/Api.Logging.Serilog/Api.Logging.Serilog/Dockerfile.Local +++ b/Api.Logging.Serilog/Api.Logging.Serilog/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Logging.Serilog.dll"] \ No newline at end of file diff --git a/Api.Logging.Serilog/Dockerfile b/Api.Logging.Serilog/Dockerfile index a3245348..f77d36b0 100644 --- a/Api.Logging.Serilog/Dockerfile +++ b/Api.Logging.Serilog/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.MultipartJson/Api.MultipartJson/Dockerfile.Local b/Api.MultipartJson/Api.MultipartJson/Dockerfile.Local index 8d1d3884..84d21494 100644 --- a/Api.MultipartJson/Api.MultipartJson/Dockerfile.Local +++ b/Api.MultipartJson/Api.MultipartJson/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.MultipartJson.dll"] \ No newline at end of file diff --git a/Api.MultipartJson/Dockerfile b/Api.MultipartJson/Dockerfile index 38b1672b..17fae898 100644 --- a/Api.MultipartJson/Dockerfile +++ b/Api.MultipartJson/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.PolicyHeaders.ContentSecurityPolicy/Api.PolicyHeaders.ContentSecurityPolicy/Dockerfile.Local b/Api.PolicyHeaders.ContentSecurityPolicy/Api.PolicyHeaders.ContentSecurityPolicy/Dockerfile.Local index c6f98fe9..b9640a76 100644 --- a/Api.PolicyHeaders.ContentSecurityPolicy/Api.PolicyHeaders.ContentSecurityPolicy/Dockerfile.Local +++ b/Api.PolicyHeaders.ContentSecurityPolicy/Api.PolicyHeaders.ContentSecurityPolicy/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 4443 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.PolicyHeaders.ContentSecurityPolicy.dll"] \ No newline at end of file diff --git a/Api.PolicyHeaders.ContentSecurityPolicy/Dockerfile b/Api.PolicyHeaders.ContentSecurityPolicy/Dockerfile index ca253a15..72e4073d 100644 --- a/Api.PolicyHeaders.ContentSecurityPolicy/Dockerfile +++ b/Api.PolicyHeaders.ContentSecurityPolicy/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.PolicyHeaders.ContentTypeOptions/Api.PolicyHeaders.ContentTypeOptions/Dockerfile.Local b/Api.PolicyHeaders.ContentTypeOptions/Api.PolicyHeaders.ContentTypeOptions/Dockerfile.Local index c7050317..7e1bd286 100644 --- a/Api.PolicyHeaders.ContentTypeOptions/Api.PolicyHeaders.ContentTypeOptions/Dockerfile.Local +++ b/Api.PolicyHeaders.ContentTypeOptions/Api.PolicyHeaders.ContentTypeOptions/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.PolicyHeaders.ContentTypeOptions.dll"] \ No newline at end of file diff --git a/Api.PolicyHeaders.ContentTypeOptions/Dockerfile b/Api.PolicyHeaders.ContentTypeOptions/Dockerfile index 61091918..40f7676f 100644 --- a/Api.PolicyHeaders.ContentTypeOptions/Dockerfile +++ b/Api.PolicyHeaders.ContentTypeOptions/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.PolicyHeaders.Cors/Api.PolicyHeaders.Cors/Dockerfile.Local b/Api.PolicyHeaders.Cors/Api.PolicyHeaders.Cors/Dockerfile.Local index 27de0430..97f391eb 100644 --- a/Api.PolicyHeaders.Cors/Api.PolicyHeaders.Cors/Dockerfile.Local +++ b/Api.PolicyHeaders.Cors/Api.PolicyHeaders.Cors/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.PolicyHeaders.Cors.dll"] \ No newline at end of file diff --git a/Api.PolicyHeaders.Cors/Dockerfile b/Api.PolicyHeaders.Cors/Dockerfile index eb51a341..bb8e8846 100644 --- a/Api.PolicyHeaders.Cors/Dockerfile +++ b/Api.PolicyHeaders.Cors/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.PolicyHeaders.ForwardedHeaders/Api.PolicyHeaders.ForwardedHeaders/Dockerfile.Local b/Api.PolicyHeaders.ForwardedHeaders/Api.PolicyHeaders.ForwardedHeaders/Dockerfile.Local index dcca3656..0d524c40 100644 --- a/Api.PolicyHeaders.ForwardedHeaders/Api.PolicyHeaders.ForwardedHeaders/Dockerfile.Local +++ b/Api.PolicyHeaders.ForwardedHeaders/Api.PolicyHeaders.ForwardedHeaders/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.PolicyHeaders.ForwardedHeaders.dll"] \ No newline at end of file diff --git a/Api.PolicyHeaders.ForwardedHeaders/Dockerfile b/Api.PolicyHeaders.ForwardedHeaders/Dockerfile index 9fd83bad..93f98ec7 100644 --- a/Api.PolicyHeaders.ForwardedHeaders/Dockerfile +++ b/Api.PolicyHeaders.ForwardedHeaders/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.PolicyHeaders.FrameOptions/Api.PolicyHeaders.FrameOptions/Dockerfile.Local b/Api.PolicyHeaders.FrameOptions/Api.PolicyHeaders.FrameOptions/Dockerfile.Local index bac6d4bb..f96b4e8e 100644 --- a/Api.PolicyHeaders.FrameOptions/Api.PolicyHeaders.FrameOptions/Dockerfile.Local +++ b/Api.PolicyHeaders.FrameOptions/Api.PolicyHeaders.FrameOptions/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.PolicyHeaders.FrameOptions.dll"] \ No newline at end of file diff --git a/Api.PolicyHeaders.FrameOptions/Dockerfile b/Api.PolicyHeaders.FrameOptions/Dockerfile index 170ccbbc..b77e2d56 100644 --- a/Api.PolicyHeaders.FrameOptions/Dockerfile +++ b/Api.PolicyHeaders.FrameOptions/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.PolicyHeaders.Hsts/Api.PolicyHeaders.Hsts/Dockerfile.Local b/Api.PolicyHeaders.Hsts/Api.PolicyHeaders.Hsts/Dockerfile.Local index 86fa8383..800bceb7 100644 --- a/Api.PolicyHeaders.Hsts/Api.PolicyHeaders.Hsts/Dockerfile.Local +++ b/Api.PolicyHeaders.Hsts/Api.PolicyHeaders.Hsts/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 4443 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.PolicyHeaders.Hsts.dll"] \ No newline at end of file diff --git a/Api.PolicyHeaders.Hsts/Dockerfile b/Api.PolicyHeaders.Hsts/Dockerfile index a24c0b9a..ae132a12 100644 --- a/Api.PolicyHeaders.Hsts/Dockerfile +++ b/Api.PolicyHeaders.Hsts/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.PolicyHeaders.ReferrerPolicy/Api.PolicyHeaders.ReferrerPolicy/Dockerfile.Local b/Api.PolicyHeaders.ReferrerPolicy/Api.PolicyHeaders.ReferrerPolicy/Dockerfile.Local index fc184f16..e33b2091 100644 --- a/Api.PolicyHeaders.ReferrerPolicy/Api.PolicyHeaders.ReferrerPolicy/Dockerfile.Local +++ b/Api.PolicyHeaders.ReferrerPolicy/Api.PolicyHeaders.ReferrerPolicy/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.PolicyHeaders.ReferrerPolicy.dll"] \ No newline at end of file diff --git a/Api.PolicyHeaders.ReferrerPolicy/Dockerfile b/Api.PolicyHeaders.ReferrerPolicy/Dockerfile index 5c0e69ea..1337ee8f 100644 --- a/Api.PolicyHeaders.ReferrerPolicy/Dockerfile +++ b/Api.PolicyHeaders.ReferrerPolicy/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.PolicyHeaders.Robots/Api.PolicyHeaders.Robots/Dockerfile.Local b/Api.PolicyHeaders.Robots/Api.PolicyHeaders.Robots/Dockerfile.Local index 8a943b01..19cdffd3 100644 --- a/Api.PolicyHeaders.Robots/Api.PolicyHeaders.Robots/Dockerfile.Local +++ b/Api.PolicyHeaders.Robots/Api.PolicyHeaders.Robots/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.PolicyHeaders.Robots.dll"] \ No newline at end of file diff --git a/Api.PolicyHeaders.Robots/Dockerfile b/Api.PolicyHeaders.Robots/Dockerfile index 171c35de..f7203acb 100644 --- a/Api.PolicyHeaders.Robots/Dockerfile +++ b/Api.PolicyHeaders.Robots/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.PolicyHeaders.XssProtection/Api.PolicyHeaders.XssProtection/Dockerfile.Local b/Api.PolicyHeaders.XssProtection/Api.PolicyHeaders.XssProtection/Dockerfile.Local index 0564fe65..59bc4b13 100644 --- a/Api.PolicyHeaders.XssProtection/Api.PolicyHeaders.XssProtection/Dockerfile.Local +++ b/Api.PolicyHeaders.XssProtection/Api.PolicyHeaders.XssProtection/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.PolicyHeaders.XssProtection.dll"] \ No newline at end of file diff --git a/Api.PolicyHeaders.XssProtection/Dockerfile b/Api.PolicyHeaders.XssProtection/Dockerfile index ebf3c4ae..605a1811 100644 --- a/Api.PolicyHeaders.XssProtection/Dockerfile +++ b/Api.PolicyHeaders.XssProtection/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.RequestTracing/Api.RequestTracing/Dockerfile.Local b/Api.RequestTracing/Api.RequestTracing/Dockerfile.Local index 87cc5040..85a3edd9 100644 --- a/Api.RequestTracing/Api.RequestTracing/Dockerfile.Local +++ b/Api.RequestTracing/Api.RequestTracing/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.RequestTracing.dll"] \ No newline at end of file diff --git a/Api.RequestTracing/Dockerfile b/Api.RequestTracing/Dockerfile index 254a738f..30be91b7 100644 --- a/Api.RequestTracing/Dockerfile +++ b/Api.RequestTracing/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.ResponseCache/Api.ResponseCache/Dockerfile.Local b/Api.ResponseCache/Api.ResponseCache/Dockerfile.Local index 7062f25b..ef77c5cf 100644 --- a/Api.ResponseCache/Api.ResponseCache/Dockerfile.Local +++ b/Api.ResponseCache/Api.ResponseCache/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.ResponseCache.dll"] \ No newline at end of file diff --git a/Api.ResponseCache/Dockerfile b/Api.ResponseCache/Dockerfile index 07f6a978..66a2a6df 100644 --- a/Api.ResponseCache/Dockerfile +++ b/Api.ResponseCache/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.ResponseCompression/Api.ResponseCompression/Dockerfile.Local b/Api.ResponseCompression/Api.ResponseCompression/Dockerfile.Local index 53c17eb8..02cb186b 100644 --- a/Api.ResponseCompression/Api.ResponseCompression/Dockerfile.Local +++ b/Api.ResponseCompression/Api.ResponseCompression/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.ResponseCompression.dll"] \ No newline at end of file diff --git a/Api.ResponseCompression/Dockerfile b/Api.ResponseCompression/Dockerfile index 1d847de7..32666ffc 100644 --- a/Api.ResponseCompression/Dockerfile +++ b/Api.ResponseCompression/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Session/Api.Session/Dockerfile.Local b/Api.Session/Api.Session/Dockerfile.Local index fb4b06aa..93481dcb 100644 --- a/Api.Session/Api.Session/Dockerfile.Local +++ b/Api.Session/Api.Session/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Session.dll"] \ No newline at end of file diff --git a/Api.Session/Dockerfile b/Api.Session/Dockerfile index 32695c03..cc1fda5c 100644 --- a/Api.Session/Dockerfile +++ b/Api.Session/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.StartupTasks/Api.StartupTasks/Dockerfile.Local b/Api.StartupTasks/Api.StartupTasks/Dockerfile.Local index 1a5748f0..cd848c63 100644 --- a/Api.StartupTasks/Api.StartupTasks/Dockerfile.Local +++ b/Api.StartupTasks/Api.StartupTasks/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.StartupTasks.dll"] \ No newline at end of file diff --git a/Api.StartupTasks/Dockerfile b/Api.StartupTasks/Dockerfile index e87b676a..3551b58d 100644 --- a/Api.StartupTasks/Dockerfile +++ b/Api.StartupTasks/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.StaticFiles/Api.StaticFiles/Dockerfile.Local b/Api.StaticFiles/Api.StaticFiles/Dockerfile.Local index ad327791..93bccd3d 100644 --- a/Api.StaticFiles/Api.StaticFiles/Dockerfile.Local +++ b/Api.StaticFiles/Api.StaticFiles/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.StaticFiles.dll"] \ No newline at end of file diff --git a/Api.StaticFiles/Dockerfile b/Api.StaticFiles/Dockerfile index 2446d18b..1c0bbf52 100644 --- a/Api.StaticFiles/Dockerfile +++ b/Api.StaticFiles/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Storage.Azure/.kubernetes/configmap.yaml b/Api.Storage.Azure/.kubernetes/configmap.yaml index 6b410e80..d13013d1 100644 --- a/Api.Storage.Azure/.kubernetes/configmap.yaml +++ b/Api.Storage.Azure/.kubernetes/configmap.yaml @@ -5,5 +5,4 @@ metadata: namespace: %KUBERNETES_NAMESPACE% data: App__Version: %VERSION% - Storage__HealthCheck__AccountName: %STORAGE_ACCOUNT_NAME% ASPNETCORE_ENVIRONMENT: %ASPNETCORE_ENVIRONMENT% diff --git a/Api.Storage.Azure/Api.Storage.Azure/Dockerfile.Local b/Api.Storage.Azure/Api.Storage.Azure/Dockerfile.Local index eeb40cec..772f5036 100644 --- a/Api.Storage.Azure/Api.Storage.Azure/Dockerfile.Local +++ b/Api.Storage.Azure/Api.Storage.Azure/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Storage.Azure.dll"] \ No newline at end of file diff --git a/Api.Storage.Azure/Api.Storage.Azure/appsettings.json b/Api.Storage.Azure/Api.Storage.Azure/appsettings.json index 645e4243..2c668037 100644 --- a/Api.Storage.Azure/Api.Storage.Azure/appsettings.json +++ b/Api.Storage.Azure/Api.Storage.Azure/appsettings.json @@ -15,8 +15,7 @@ "Storage": { "ShareName": "nano-storage-azure", "HealthCheck": { - "AccountName": null, - "UnhealthyStatus": "Degraded" + "UnhealthyStatus": "Unhealthy" } } } \ No newline at end of file diff --git a/Api.Storage.Azure/Dockerfile b/Api.Storage.Azure/Dockerfile index 24d5452f..606c0e91 100644 --- a/Api.Storage.Azure/Dockerfile +++ b/Api.Storage.Azure/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Storage.Azure/README.md b/Api.Storage.Azure/README.md index b172743d..6720bdb5 100644 --- a/Api.Storage.Azure/README.md +++ b/Api.Storage.Azure/README.md @@ -62,8 +62,7 @@ Add the storage configuration. "Storage": { "ShareName": "nano-storage-azure", "HealthCheck": { - "AccountName": null, - "UnhealthyStatus": "Degraded" + "UnhealthyStatus": "Unhealthy" } } ``` @@ -112,8 +111,6 @@ spec: emptyDir: {} ``` -Additionally, the `configmap.yaml` file stores the `$env:STORAGE_ACCOUNT_NAME` value, which is used by the TCP-based health check to validate connectivity to the Azure File Share endpoint. - ## GitHub Actions Add the following environment variables to the `buid-and-deply.yml`. @@ -228,5 +225,4 @@ And add this step below as well, ensuring that the fileshare gets created before }; echo "IDENTITY_NAME=$env:IDENTITY_NAME" >> $env:GITHUB_ENV; - ``` \ No newline at end of file diff --git a/Api.Storage.Local/Api.Storage.Local/Dockerfile.Local b/Api.Storage.Local/Api.Storage.Local/Dockerfile.Local index 6512ea12..2f0019a3 100644 --- a/Api.Storage.Local/Api.Storage.Local/Dockerfile.Local +++ b/Api.Storage.Local/Api.Storage.Local/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Storage.Local.dll"] \ No newline at end of file diff --git a/Api.Storage.Local/Dockerfile b/Api.Storage.Local/Dockerfile index 57c88425..ceeec3ed 100644 --- a/Api.Storage.Local/Dockerfile +++ b/Api.Storage.Local/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Storage.Local/README.md b/Api.Storage.Local/README.md index 9033e725..cab69c6b 100644 --- a/Api.Storage.Local/README.md +++ b/Api.Storage.Local/README.md @@ -57,7 +57,7 @@ Configured the application with the necessary storage setup. "Storage": { "ShareName": "nano-storage-local", "HealthCheck": { - "UnhealthyStatus": "Degraded" + "UnhealthyStatus": "Unhealthy" } } ``` diff --git a/Api.TimeZone/Api.TimeZone/Dockerfile.Local b/Api.TimeZone/Api.TimeZone/Dockerfile.Local index 0ab8570b..b64cb62b 100644 --- a/Api.TimeZone/Api.TimeZone/Dockerfile.Local +++ b/Api.TimeZone/Api.TimeZone/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.TimeZone.dll"] \ No newline at end of file diff --git a/Api.TimeZone/Dockerfile b/Api.TimeZone/Dockerfile index 12559462..31423bbd 100644 --- a/Api.TimeZone/Dockerfile +++ b/Api.TimeZone/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.Versioning/Api.Versioning/Dockerfile.Local b/Api.Versioning/Api.Versioning/Dockerfile.Local index 273713a4..41c3c823 100644 --- a/Api.Versioning/Api.Versioning/Dockerfile.Local +++ b/Api.Versioning/Api.Versioning/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Versioning.dll"] \ No newline at end of file diff --git a/Api.Versioning/Dockerfile b/Api.Versioning/Dockerfile index 1dfe75f6..aa2c3f66 100644 --- a/Api.Versioning/Dockerfile +++ b/Api.Versioning/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api.VirusScan/Api.VirusScan/Dockerfile.Local b/Api.VirusScan/Api.VirusScan/Dockerfile.Local index bcc73a22..a9fc193d 100644 --- a/Api.VirusScan/Api.VirusScan/Dockerfile.Local +++ b/Api.VirusScan/Api.VirusScan/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.VirusScan.dll"] \ No newline at end of file diff --git a/Api.VirusScan/Dockerfile b/Api.VirusScan/Dockerfile index b8b3909e..7ff85e3b 100644 --- a/Api.VirusScan/Dockerfile +++ b/Api.VirusScan/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Api._Blank/Api.Blank/Dockerfile.Local b/Api._Blank/Api.Blank/Dockerfile.Local index 9c84943b..a43abac6 100644 --- a/Api._Blank/Api.Blank/Dockerfile.Local +++ b/Api._Blank/Api.Blank/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Api.Blank.dll"] \ No newline at end of file diff --git a/Api._Blank/Dockerfile b/Api._Blank/Dockerfile index 4c3ac629..ce52c1c9 100644 --- a/Api._Blank/Dockerfile +++ b/Api._Blank/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Web._Blank/Dockerfile b/Web._Blank/Dockerfile index 6fcb772e..7be1dee3 100644 --- a/Web._Blank/Dockerfile +++ b/Web._Blank/Dockerfile @@ -32,6 +32,7 @@ COPY --from=publish /app . RUN mkdir -p /app/wwwroot +ENV ASPNETCORE_HTTP_PORTS= ENV COMPlus_EnableDiagnostics=0 ENV DOTNET_USE_POLLING_FILE_WATCHER=true diff --git a/Web._Blank/Web.Blank/Dockerfile.Local b/Web._Blank/Web.Blank/Dockerfile.Local index 207af714..ccb45e06 100644 --- a/Web._Blank/Web.Blank/Dockerfile.Local +++ b/Web._Blank/Web.Blank/Dockerfile.Local @@ -3,4 +3,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:$DOTNET_ASPNET_VERSION AS base EXPOSE 8080 +ENV ASPNETCORE_HTTP_PORTS= + ENTRYPOINT ["dotnet", "Web.Blank.dll"] \ No newline at end of file From e7de6366728c38327e12357d922b04180b9a35e6 Mon Sep 17 00:00:00 2001 From: vivet Date: Wed, 8 Jul 2026 15:08:23 +0200 Subject: [PATCH 18/33] Updated --- Api.Auth.RootLogin/README.md | 8 -- Api.Data.Identity.Auth.Jwt/README.md | 11 +-- Api.Data.MySql/README.md | 47 ++++++---- Api.Data.PostgreSQL/README.md | 18 ++-- Api.Data.SqLite/README.md | 27 ------ Api.Data.SqlServer/README.md | 64 +++++++------- Api.HealthChecks/README.md | 124 +++++++++++++-------------- Api.Hosting.Https/README.md | 8 -- Console.Data.MySql/README.md | 47 ++++++---- Console.Data.PostgreSQL/README.md | 18 ++-- Console.Data.SqLite/README.md | 27 ------ Console.Data.SqlServer/README.md | 64 +++++++------- 12 files changed, 219 insertions(+), 244 deletions(-) diff --git a/Api.Auth.RootLogin/README.md b/Api.Auth.RootLogin/README.md index a7c64602..1e64ec11 100644 --- a/Api.Auth.RootLogin/README.md +++ b/Api.Auth.RootLogin/README.md @@ -114,11 +114,3 @@ env: ``` ...and created during the Kubernetes deploy step. - -```yaml -sudo kubectl create secret generic auth-jwt-secret --from-literal=jwt-public-key=$env:AUTH_JWT_PUBLIC_KEY --from-literal=jwt-private-key=$env:AUTH_JWT_PRIVATE_KEY --save-config --dry-run=client -o yaml | sudo kubectl apply -f -; -if ($LastExitCode -ne 0) -{ - throw "error"; -}; -``` diff --git a/Api.Data.Identity.Auth.Jwt/README.md b/Api.Data.Identity.Auth.Jwt/README.md index bfbaf354..8ef2d782 100644 --- a/Api.Data.Identity.Auth.Jwt/README.md +++ b/Api.Data.Identity.Auth.Jwt/README.md @@ -76,7 +76,7 @@ Configured the application with the necessary authentication setup, in addition ``` ## Kubernetes -For `Staging` and `Production` environments, a secret must be created to securely store the public and private keys, and optionally the credentials for `RootLogin` if it shoud be +For `Staging` and `Production` environments, a `auth-jwt-secret.yaml` is also created to securely store the public and private keys, and optionally the credentials for `RootLogin` if it shoud be enabled. Below demonstrates how to map the secret containing the JWT keys. ```yaml @@ -107,12 +107,3 @@ env: ``` ...and created during the Kubernetes deploy step. - -```yaml -sudo kubectl create secret generic auth-jwt-secret --from-literal=jwt-public-key=$env:AUTH_JWT_PUBLIC_KEY --from-literal=jwt-private-key=$env:AUTH_JWT_PRIVATE_KEY --save-config --dry-run=client -o yaml | sudo kubectl apply -f -; -if ($LastExitCode -ne 0) -{ - throw "error"; -}; -``` - diff --git a/Api.Data.MySql/README.md b/Api.Data.MySql/README.md index 46fe26e3..40778eed 100644 --- a/Api.Data.MySql/README.md +++ b/Api.Data.MySql/README.md @@ -157,33 +157,50 @@ Additionally, this step has been added to ensure database migrations are applied - name: Database Migration & User shell: pwsh run: | - $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName; - $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort; - $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Preferred"; + $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName -o tsv; + $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort -o tsv; + $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin -o tsv; - dotnet ef database update ` - --no-build ` - --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING "; + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Required"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` + --no-build ` + --configuration Release ` + --startup-project $env:APP_NAME ` + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; - apt-get update; - apt-get install -y mysql-client; + $env:MYSQL_PWD = $env:SQL_ADMIN_PASSWORD - $userExists = mysql --batch -e "SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = '$env:SQL_USER');" $env:SQL_MIGRATION_CONNECTIONSTRING; + $userExists = mysql ` + --host $env:SQL_HOST ` + --port $env:SQL_PORT ` + --user $env:SQL_ADMIN_USER ` + --ssl-mode=REQUIRED ` + -e "SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = '$env:SQL_USER');"; if ($userExists -eq 0) { - mysql --connect-expired-password -e " ` - CREATE USER '$env:SQL_USER'@'%' IDENTIFIED BY '$env:SQL_PASSWORD'; ` - GRANT SELECT, INSERT, UPDATE, DELETE ON $database.* TO '$env:SQL_USER'@'%'; ` - FLUSH PRIVILEGES;" $env:SQL_MIGRATION_CONNECTIONSTRING; + mysql ` + --host $env:SQL_HOST ` + --port $env:SQL_PORT ` + --user $env:SQL_ADMIN_USER ` + --ssl-mode=REQUIRED ` + -e "CREATE USER '$env:SQL_USER'@'%' IDENTIFIED BY '$env:SQL_PASSWORD'; GRANT SELECT, INSERT, UPDATE, DELETE ON $env:SQL_NAME.* TO '$env:SQL_USER'@'%'; FLUSH PRIVILEGES;"; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; } + + echo "SQL_HOST=$env:SQL_HOST" >> $env:GITHUB_ENV; + echo "SQL_PORT=$env:SQL_PORT" >> $env:GITHUB_ENV; ``` Last, an additional template has been added to the deployment for storing the application connectionstring in a Kuberntes secret. diff --git a/Api.Data.PostgreSQL/README.md b/Api.Data.PostgreSQL/README.md index ed09dfa9..4c6c0271 100644 --- a/Api.Data.PostgreSQL/README.md +++ b/Api.Data.PostgreSQL/README.md @@ -160,18 +160,19 @@ Additionally, this step has been added to ensure database migrations are applied $env:SQL_ADMIN_USER = az postgres flexible-server list -g $env:AZURE_GROUP_DATABASE --query "[0].username" -o tsv; $env:SQL_MIGRATION_CONNECTIONSTRING = "Host=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Username=$env:SQL_ADMIN_USER;Password=$env:SQL_ADMIN_PASSWORD;SSL Mode=Prefer;Trust Server Certificate=true"; - dotnet ef database update ` - --no-build ` - --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING" `; + $env:DATA__CONNECTIONSTRING = $env:SQL_MIGRATION_CONNECTIONSTRING; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` + --no-build ` + --configuration Release ` + --startup-project $env:APP_NAME ` + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; - - apt-get update - apt-get install -y postgresql-client $userExists = psql "$env:SQL_MIGRATION_CONNECTIONSTRING" ` -tAc "SELECT 1 FROM pg_roles WHERE rolname='$env:SQL_USER';" @@ -199,6 +200,9 @@ Additionally, this step has been added to ensure database migrations are applied psql "$env:SQL_MIGRATION_CONNECTIONSTRING" ` -c "ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO $env:SQL_USER;" } + + echo "SQL_HOST=$env:SQL_HOST" >> $env:GITHUB_ENV; + echo "SQL_PORT=$env:SQL_PORT" >> $env:GITHUB_ENV; ``` Last, an additional template has been added to the deployment for storing the application connectionstring in a Kuberntes secret. diff --git a/Api.Data.SqLite/README.md b/Api.Data.SqLite/README.md index 464dd2b5..9aef9986 100644 --- a/Api.Data.SqLite/README.md +++ b/Api.Data.SqLite/README.md @@ -128,34 +128,7 @@ Add the following environment variables to the `buid-and-deply.yml`. ```yaml env: - SQL_NAME: nanoDb SQL_SIZE: 10Gi - SQL_CONNECTIONSTRING: "Data Source=/mnt/data/{{ env.nanoDb }}.sqlite" -``` - -Additionally, this step has been added to ensure database migrations are applied. - -```yaml -- name: Database Migration - shell: pwsh - run: | - dotnet ef database update ` - --no-build ` - --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING" `; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; ``` Deployment commands have also been updated to apply each of the new Kubernetes templates. - -```powershell -Get-Content .kubernetes/{resource-name}.yaml ` - | foreach { [Environment]::ExpandEnvironmentVariables($_) } ` - | Set-Content .kubernetes/{resource-name}.tmp.yaml; - -sudo kubectl apply -f .kubernetes/{resource-name}.tmp.yaml; -``` diff --git a/Api.Data.SqlServer/README.md b/Api.Data.SqlServer/README.md index e6f7c574..ca45c391 100644 --- a/Api.Data.SqlServer/README.md +++ b/Api.Data.SqlServer/README.md @@ -158,12 +158,15 @@ Additionally, this step has been added to ensure database migrations are applied $env:SQL_HOST = az sql server list -g $env:AZURE_GROUP_DATABASE --query "[0].fullyQualifiedDomainName" -o tsv; $env:SQL_PORT = "1433" $env:SQL_ADMIN_USER = az sql server list -g $env:AZURE_GROUP_DATABASE --query "[0].administratorLogin" -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST,$env:SQL_PORT;Database=$env:SQL_NAME;User Id=$env:SQL_ADMIN_USER;Password=$env:SQL_ADMIN_PASSWORD;Encrypt=True;TrustServerCertificate=True;"; - dotnet ef database update ` - --no-build ` - --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING"; + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST,$env:SQL_PORT;Database=$env:SQL_NAME;User Id=$env:SQL_ADMIN_USER;Password=$env:SQL_ADMIN_PASSWORD;Encrypt=True;TrustServerCertificate=True;"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` + --no-build ` + --configuration Release ` + --startup-project $env:APP_NAME ` + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { @@ -174,42 +177,45 @@ Additionally, this step has been added to ensure database migrations are applied apt-get install -y mssql-tools unixodbc-dev $loginExists = sqlcmd ` - -S "$env:SQL_HOST,$env:SQL_PORT" ` - -U $env:SQL_ADMIN_USER ` - -P $env:SQL_ADMIN_PASSWORD ` - -d master ` - -h -1 ` - -Q "SET NOCOUNT ON; SELECT COUNT(*) FROM sys.server_principals WHERE name = '$env:SQL_USER';" + -S "$env:SQL_HOST,$env:SQL_PORT" ` + -U $env:SQL_ADMIN_USER ` + -P $env:SQL_ADMIN_PASSWORD ` + -d main ` + -h -1 ` + -Q "SET NOCOUNT ON; SELECT COUNT(*) FROM sys.server_principals WHERE name = '$env:SQL_USER';" if ($loginExists -eq 0) { sqlcmd ` - -S "$env:SQL_HOST,$env:SQL_PORT" ` - -U $env:SQL_ADMIN_USER ` - -P $env:SQL_ADMIN_PASSWORD ` - -d master ` - -Q "CREATE LOGIN [$env:SQL_USER] WITH PASSWORD = '$env:SQL_PASSWORD';" + -S "$env:SQL_HOST,$env:SQL_PORT" ` + -U $env:SQL_ADMIN_USER ` + -P $env:SQL_ADMIN_PASSWORD ` + -d main ` + -Q "CREATE LOGIN [$env:SQL_USER] WITH PASSWORD = '$env:SQL_PASSWORD';" }; $userExists = sqlcmd ` - -S "$env:SQL_HOST,$env:SQL_PORT" ` - -U $env:SQL_ADMIN_USER ` - -P $env:SQL_ADMIN_PASSWORD ` - -d $env:SQL_NAME ` - -h -1 ` - -Q "SET NOCOUNT ON; SELECT COUNT(*) FROM sys.database_principals WHERE name = '$env:SQL_USER';" + -S "$env:SQL_HOST,$env:SQL_PORT" ` + -U $env:SQL_ADMIN_USER ` + -P $env:SQL_ADMIN_PASSWORD ` + -d $env:SQL_NAME ` + -h -1 ` + -Q "SET NOCOUNT ON; SELECT COUNT(*) FROM sys.database_principals WHERE name = '$env:SQL_USER';" if ($userExists -eq 0) { sqlcmd ` - -S "$env:SQL_HOST,$env:SQL_PORT" ` - -U $env:SQL_ADMIN_USER ` - -P $env:SQL_ADMIN_PASSWORD ` - -d $env:SQL_NAME ` - -Q "CREATE USER [$env:SQL_USER] FOR LOGIN [$env:SQL_USER]; - ALTER ROLE db_datareader ADD MEMBER [$env:SQL_USER]; - ALTER ROLE db_datawriter ADD MEMBER [$env:SQL_USER];" + -S "$env:SQL_HOST,$env:SQL_PORT" ` + -U $env:SQL_ADMIN_USER ` + -P $env:SQL_ADMIN_PASSWORD ` + -d $env:SQL_NAME ` + -Q "CREATE USER [$env:SQL_USER] FOR LOGIN [$env:SQL_USER]; + ALTER ROLE db_datareader ADD MEMBER [$env:SQL_USER]; + ALTER ROLE db_datawriter ADD MEMBER [$env:SQL_USER];" }; + + echo "SQL_HOST=$env:SQL_HOST" >> $env:GITHUB_ENV; + echo "SQL_PORT=$env:SQL_PORT" >> $env:GITHUB_ENV; ``` Last, the application connectionstring must be added in a secret in Kuberntes. The `Kubernetes Deploy` step has been updated with the following. diff --git a/Api.HealthChecks/README.md b/Api.HealthChecks/README.md index 18536976..5a7ce516 100644 --- a/Api.HealthChecks/README.md +++ b/Api.HealthChecks/README.md @@ -59,66 +59,66 @@ env: ...and then add the `Add Availability Check` step to the action pipeline. ```yaml - - name: Add Availability Check - id: add-availability-check - shell: pwsh - run: | - sudo az extension add -n application-insights; - - $env:SERVICE_NAME_INSIGTHS = $env:SERVICE_NAME + "-insights"; - $env:APPLICATION_INSIGHT_ID = sudo az monitor app-insights component show --query "[?contains(name, '$env:SERVICE_NAME_INSIGTHS')].[id]" -o tsv; - - if ([string]::IsNullOrEmpty($env:APPLICATION_INSIGHT_ID)) - { - $env:WORKSPACE_ID = sudo az monitor log-analytics workspace list --query "[?contains(name, 'log-analytics')].[id]" -o tsv; - - if (-not [string]::IsNullOrEmpty($env:WORKSPACE_ID)) - { - $env:APPLICATION_INSIGHT_ID = sudo az monitor app-insights component create ` - -a $env:SERVICE_NAME_INSIGTHS ` - -l $env:AZURE_LOCATION ` - -g $env:AZURE_GROUP ` - --workspace $env:WORKSPACE_ID ` - --query "[id]" -o tsv; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; - } - }; - - $env:SERVICE_NAME_AVAILABILITY = $env:SERVICE_NAME + '-availability-' + $env:ASPNETCORE_ENVIRONMENT.ToLower(); - $env:AVAILABILITY_ID = sudo az monitor app-insights web-test list -g $env:AZURE_GROUP --query "[?contains(name, '$env:SERVICE_NAME_AVAILABILITY')].[id]" -o tsv; - - if ([string]::IsNullOrEmpty($env:AVAILABILITY_ID)) - { - $env:APPLICATION_INSIGHT_HIDDEN_LINK = 'hidden-link:' + $env:APPLICATION_INSIGHT_ID + '=Resource'; - sudo az monitor app-insights web-test create ` - -n $env:SERVICE_NAME_AVAILABILITY ` - --defined-web-test-name $env:SERVICE_NAME_AVAILABILITY ` - -g $env:AZURE_GROUP ` - -l $env:AZURE_LOCATION ` - --kind multistep ` - --web-test-kind standard ` - --frequency $env:AVAILABILITY_CHECK_FREQUENCY ` - --enabled true ` - --retry-enabled true ` - --ssl-check true ` - --ssl-lifetime-check 30 ` - --http-verb GET ` - --request-url $env:AVAILABILITY_URI ` - --expected-status-code 200 ` - --content-validation content-match='\"status\":\"unhealthy\"' ignore-case=true pass-if-text-found=false ` - --tags $env:APPLICATION_INSIGHT_HIDDEN_LINK ` - --locations Id='us-ca-sjc-azr' ` - --locations Id='us-va-ash-azr' ` - --locations Id='emea-gb-db3-azr' ` - --locations Id='emea-nl-ams-azr' ` - --locations Id='apac-hk-hkn-azr'; - }; - if ($LastExitCode -ne 0) - { - throw "error"; - }; +- name: Add Availability Check + shell: pwsh + run: | + az extension add -n application-insights; + + $env:SERVICE_NAME_INSIGTHS = $env:SERVICE_NAME + "-insights"; + $env:APPLICATION_INSIGHT_ID = az monitor app-insights component show --query "[?contains(name, '$env:SERVICE_NAME_INSIGTHS')].[id]" -o tsv; + + if ([string]::IsNullOrEmpty($env:APPLICATION_INSIGHT_ID)) + { + $env:WORKSPACE_ID = az monitor log-analytics workspace list --query "[?contains(name, 'log-analytics')].[id]" -o tsv; + + if (-not [string]::IsNullOrEmpty($env:WORKSPACE_ID)) + { + $env:APPLICATION_INSIGHT_ID = az monitor app-insights component create ` + -a $env:SERVICE_NAME_INSIGTHS ` + -l $env:AZURE_LOCATION ` + -g $env:AZURE_GROUP ` + --workspace $env:WORKSPACE_ID ` + --query "[id]" -o tsv; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; + } + }; + + $env:SERVICE_NAME_AVAILABILITY = $env:SERVICE_NAME + '-availability-' + $env:ASPNETCORE_ENVIRONMENT.ToLower(); + $env:AVAILABILITY_ID = az monitor app-insights web-test list -g $env:AZURE_GROUP --query "[?contains(name, '$env:SERVICE_NAME_AVAILABILITY')].[id]" -o tsv; + + if ([string]::IsNullOrEmpty($env:AVAILABILITY_ID)) + { + $env:APPLICATION_INSIGHT_HIDDEN_LINK = 'hidden-link:' + $env:APPLICATION_INSIGHT_ID + '=Resource'; + az monitor app-insights web-test create ` + -n $env:SERVICE_NAME_AVAILABILITY ` + --defined-web-test-name $env:SERVICE_NAME_AVAILABILITY ` + -g $env:AZURE_GROUP ` + -l $env:AZURE_LOCATION ` + --kind multistep ` + --web-test-kind standard ` + --frequency $env:AVAILABILITY_CHECK_FREQUENCY ` + --enabled true ` + --retry-enabled true ` + --ssl-check true ` + --ssl-lifetime-check 30 ` + --http-verb GET ` + --request-url $env:AVAILABILITY_URI ` + --expected-status-code 200 ` + --content-validation content-match='\"status\":\"unhealthy\"' ignore-case=true pass-if-text-found=false ` + --tags $env:APPLICATION_INSIGHT_HIDDEN_LINK ` + --locations Id='us-ca-sjc-azr' ` + --locations Id='us-va-ash-azr' ` + --locations Id='emea-gb-db3-azr' ` + --locations Id='emea-nl-ams-azr' ` + --locations Id='apac-hk-hkn-azr'; + }; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; ``` diff --git a/Api.Hosting.Https/README.md b/Api.Hosting.Https/README.md index b9bf791d..6190976a 100644 --- a/Api.Hosting.Https/README.md +++ b/Api.Hosting.Https/README.md @@ -84,11 +84,3 @@ A `httproute.yaml` resource has been added to the `.kubernetes` folder. ## GitHub Actions Deployment commands have been updated to apply the new Kubernetes `HTTPRoute` template. - -```powershell -Get-Content .kubernetes/{resource-name}.yaml ` - | foreach { [Environment]::ExpandEnvironmentVariables($_) } ` - | Set-Content .kubernetes/{resource-name}.tmp.yaml; - -sudo kubectl apply -f .kubernetes/{resource-name}.tmp.yaml; -``` diff --git a/Console.Data.MySql/README.md b/Console.Data.MySql/README.md index 7d5948c4..b00788d1 100644 --- a/Console.Data.MySql/README.md +++ b/Console.Data.MySql/README.md @@ -141,33 +141,50 @@ Additionally, this step has been added to ensure database migrations are applied - name: Database Migration & User shell: pwsh run: | - $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName; - $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort; - $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Preferred"; + $env:SQL_HOST = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].fullyQualifiedDomainName -o tsv; + $env:SQL_PORT = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].databasePort -o tsv; + $env:SQL_ADMIN_USER = az mysql flexible-server list -g $env:AZURE_GROUP_DATABASE --query [0].administratorLogin -o tsv; - dotnet ef database update ` - --no-build ` - --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING "; + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_ADMIN_USER;Pwd=$env:SQL_ADMIN_PASSWORD;SslMode=Required"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` + --no-build ` + --configuration Release ` + --startup-project $env:APP_NAME ` + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; - apt-get update; - apt-get install -y mysql-client; + $env:MYSQL_PWD = $env:SQL_ADMIN_PASSWORD - $userExists = mysql --batch -e "SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = '$env:SQL_USER');" $env:SQL_MIGRATION_CONNECTIONSTRING; + $userExists = mysql ` + --host $env:SQL_HOST ` + --port $env:SQL_PORT ` + --user $env:SQL_ADMIN_USER ` + --ssl-mode=REQUIRED ` + -e "SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = '$env:SQL_USER');"; if ($userExists -eq 0) { - mysql --connect-expired-password -e " ` - CREATE USER '$env:SQL_USER'@'%' IDENTIFIED BY '$env:SQL_PASSWORD'; ` - GRANT SELECT, INSERT, UPDATE, DELETE ON $database.* TO '$env:SQL_USER'@'%'; ` - FLUSH PRIVILEGES;" $env:SQL_MIGRATION_CONNECTIONSTRING; + mysql ` + --host $env:SQL_HOST ` + --port $env:SQL_PORT ` + --user $env:SQL_ADMIN_USER ` + --ssl-mode=REQUIRED ` + -e "CREATE USER '$env:SQL_USER'@'%' IDENTIFIED BY '$env:SQL_PASSWORD'; GRANT SELECT, INSERT, UPDATE, DELETE ON $env:SQL_NAME.* TO '$env:SQL_USER'@'%'; FLUSH PRIVILEGES;"; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; } + + echo "SQL_HOST=$env:SQL_HOST" >> $env:GITHUB_ENV; + echo "SQL_PORT=$env:SQL_PORT" >> $env:GITHUB_ENV; ``` Last, an additional template has been added to the deployment for storing the application connectionstring in a Kuberntes secret. diff --git a/Console.Data.PostgreSQL/README.md b/Console.Data.PostgreSQL/README.md index d27443e3..a249d0d0 100644 --- a/Console.Data.PostgreSQL/README.md +++ b/Console.Data.PostgreSQL/README.md @@ -142,18 +142,19 @@ Additionally, this step has been added to ensure database migrations are applied $env:SQL_ADMIN_USER = az postgres flexible-server list -g $env:AZURE_GROUP_DATABASE --query "[0].username" -o tsv; $env:SQL_MIGRATION_CONNECTIONSTRING = "Host=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Username=$env:SQL_ADMIN_USER;Password=$env:SQL_ADMIN_PASSWORD;SSL Mode=Prefer;Trust Server Certificate=true"; - dotnet ef database update ` - --no-build ` - --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING" `; + $env:DATA__CONNECTIONSTRING = $env:SQL_MIGRATION_CONNECTIONSTRING; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` + --no-build ` + --configuration Release ` + --startup-project $env:APP_NAME ` + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { throw "error"; }; - - apt-get update - apt-get install -y postgresql-client $userExists = psql "$env:SQL_MIGRATION_CONNECTIONSTRING" ` -tAc "SELECT 1 FROM pg_roles WHERE rolname='$env:SQL_USER';" @@ -181,6 +182,9 @@ Additionally, this step has been added to ensure database migrations are applied psql "$env:SQL_MIGRATION_CONNECTIONSTRING" ` -c "ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO $env:SQL_USER;" } + + echo "SQL_HOST=$env:SQL_HOST" >> $env:GITHUB_ENV; + echo "SQL_PORT=$env:SQL_PORT" >> $env:GITHUB_ENV; ``` Last, an additional template has been added to the deployment for storing the application connectionstring in a Kuberntes secret. diff --git a/Console.Data.SqLite/README.md b/Console.Data.SqLite/README.md index 1317308d..5733e80a 100644 --- a/Console.Data.SqLite/README.md +++ b/Console.Data.SqLite/README.md @@ -112,34 +112,7 @@ Add the following environment variables to the `buid-and-deply.yml`. ```yaml env: - SQL_NAME: nanoDb SQL_SIZE: 10Gi - SQL_CONNECTIONSTRING: "Data Source=/mnt/data/{{ env.nanoDb }}.sqlite" -``` - -Additionally, this step has been added to ensure database migrations are applied. - -```yaml -- name: Database Migration - shell: pwsh - run: | - dotnet ef database update ` - --no-build ` - --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING" `; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; ``` Deployment commands have also been updated to apply each of the new Kubernetes templates. - -```powershell -Get-Content .kubernetes/{resource-name}.yaml ` - | foreach { [Environment]::ExpandEnvironmentVariables($_) } ` - | Set-Content .kubernetes/{resource-name}.tmp.yaml; - -sudo kubectl apply -f .kubernetes/{resource-name}.tmp.yaml; -``` diff --git a/Console.Data.SqlServer/README.md b/Console.Data.SqlServer/README.md index cdae2e12..a08e87c6 100644 --- a/Console.Data.SqlServer/README.md +++ b/Console.Data.SqlServer/README.md @@ -141,12 +141,15 @@ Additionally, this step has been added to ensure database migrations are applied $env:SQL_HOST = az sql server list -g $env:AZURE_GROUP_DATABASE --query "[0].fullyQualifiedDomainName" -o tsv; $env:SQL_PORT = "1433" $env:SQL_ADMIN_USER = az sql server list -g $env:AZURE_GROUP_DATABASE --query "[0].administratorLogin" -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Server=$env:SQL_HOST,$env:SQL_PORT;Database=$env:SQL_NAME;User Id=$env:SQL_ADMIN_USER;Password=$env:SQL_ADMIN_PASSWORD;Encrypt=True;TrustServerCertificate=True;"; - dotnet ef database update ` - --no-build ` - --startup-project $env:APP_NAME ` - --connection "$env:SQL_MIGRATION_CONNECTIONSTRING"; + $env:DATA__CONNECTIONSTRING = "Server=$env:SQL_HOST,$env:SQL_PORT;Database=$env:SQL_NAME;User Id=$env:SQL_ADMIN_USER;Password=$env:SQL_ADMIN_PASSWORD;Encrypt=True;TrustServerCertificate=True;"; + + & "/opt/ef-tools/$env:DOTNET_EF_TOOLS_VERSION/dotnet-ef" database update ` + --no-build ` + --configuration Release ` + --startup-project $env:APP_NAME ` + -- ` + --environment $env:ASPNETCORE_ENVIRONMENT; if ($LastExitCode -ne 0) { @@ -157,42 +160,45 @@ Additionally, this step has been added to ensure database migrations are applied apt-get install -y mssql-tools unixodbc-dev $loginExists = sqlcmd ` - -S "$env:SQL_HOST,$env:SQL_PORT" ` - -U $env:SQL_ADMIN_USER ` - -P $env:SQL_ADMIN_PASSWORD ` - -d master ` - -h -1 ` - -Q "SET NOCOUNT ON; SELECT COUNT(*) FROM sys.server_principals WHERE name = '$env:SQL_USER';" + -S "$env:SQL_HOST,$env:SQL_PORT" ` + -U $env:SQL_ADMIN_USER ` + -P $env:SQL_ADMIN_PASSWORD ` + -d main ` + -h -1 ` + -Q "SET NOCOUNT ON; SELECT COUNT(*) FROM sys.server_principals WHERE name = '$env:SQL_USER';" if ($loginExists -eq 0) { sqlcmd ` - -S "$env:SQL_HOST,$env:SQL_PORT" ` - -U $env:SQL_ADMIN_USER ` - -P $env:SQL_ADMIN_PASSWORD ` - -d master ` - -Q "CREATE LOGIN [$env:SQL_USER] WITH PASSWORD = '$env:SQL_PASSWORD';" + -S "$env:SQL_HOST,$env:SQL_PORT" ` + -U $env:SQL_ADMIN_USER ` + -P $env:SQL_ADMIN_PASSWORD ` + -d main ` + -Q "CREATE LOGIN [$env:SQL_USER] WITH PASSWORD = '$env:SQL_PASSWORD';" }; $userExists = sqlcmd ` - -S "$env:SQL_HOST,$env:SQL_PORT" ` - -U $env:SQL_ADMIN_USER ` - -P $env:SQL_ADMIN_PASSWORD ` - -d $env:SQL_NAME ` - -h -1 ` - -Q "SET NOCOUNT ON; SELECT COUNT(*) FROM sys.database_principals WHERE name = '$env:SQL_USER';" + -S "$env:SQL_HOST,$env:SQL_PORT" ` + -U $env:SQL_ADMIN_USER ` + -P $env:SQL_ADMIN_PASSWORD ` + -d $env:SQL_NAME ` + -h -1 ` + -Q "SET NOCOUNT ON; SELECT COUNT(*) FROM sys.database_principals WHERE name = '$env:SQL_USER';" if ($userExists -eq 0) { sqlcmd ` - -S "$env:SQL_HOST,$env:SQL_PORT" ` - -U $env:SQL_ADMIN_USER ` - -P $env:SQL_ADMIN_PASSWORD ` - -d $env:SQL_NAME ` - -Q "CREATE USER [$env:SQL_USER] FOR LOGIN [$env:SQL_USER]; - ALTER ROLE db_datareader ADD MEMBER [$env:SQL_USER]; - ALTER ROLE db_datawriter ADD MEMBER [$env:SQL_USER];" + -S "$env:SQL_HOST,$env:SQL_PORT" ` + -U $env:SQL_ADMIN_USER ` + -P $env:SQL_ADMIN_PASSWORD ` + -d $env:SQL_NAME ` + -Q "CREATE USER [$env:SQL_USER] FOR LOGIN [$env:SQL_USER]; + ALTER ROLE db_datareader ADD MEMBER [$env:SQL_USER]; + ALTER ROLE db_datawriter ADD MEMBER [$env:SQL_USER];" }; + + echo "SQL_HOST=$env:SQL_HOST" >> $env:GITHUB_ENV; + echo "SQL_PORT=$env:SQL_PORT" >> $env:GITHUB_ENV; ``` Last, an additional template has been added to the deployment for storing the application connectionstring in a Kuberntes secret. From 6bdb03ce111bf41b2f6e8d2ebe4f1a7ea844baad Mon Sep 17 00:00:00 2001 From: vivet Date: Fri, 10 Jul 2026 13:18:25 +0200 Subject: [PATCH 19/33] Updated --- .../Api.ApiClients.Audit.Models.csproj | 16 +++++----------- .../Api.ApiClients.Audit.Service.Models.csproj | 16 +++++----------- .../Api.ApiClients.Entity.Models.csproj | 16 +++++----------- .../Api.ApiClients.Entity.Service.Models.csproj | 16 +++++----------- .../Api.ApiClients.RootLogIn.Models.csproj | 16 +++++----------- ...pi.ApiClients.RootLogin.Service.Models.csproj | 16 +++++----------- .../Api.ApiClients.Models.csproj | 16 +++++----------- .../Api.ApiClients.Service.Models.csproj | 16 +++++----------- .../Api.Auth.External.Custom.Models.csproj | 16 +++++----------- .../Api.Auth.RootLogin.Models.csproj | 16 +++++----------- .../Api.Authorization.Models.csproj | 16 +++++----------- .../Api.ContentNegotiation.Models.csproj | 16 +++++----------- .../Api.Cookies.Models/Api.Cookies.Models.csproj | 16 +++++----------- .../Api.CustomConfigSection.Models.csproj | 16 +++++----------- .../Api.CustomMiddleware.Models.csproj | 16 +++++----------- .../Api.CustomService.Models.csproj | 16 +++++----------- .../Api.Data.Audit.Models.csproj | 16 +++++----------- .../Api.Data.EntityEvents.Models.csproj | 16 +++++----------- ...pi.Data.EntityEvents.Subscriber.Models.csproj | 16 +++++----------- .../Api.Data.Identity.Auth.ApiKey.Models.csproj | 16 +++++----------- ...a.Identity.Auth.External.Custom.Models.csproj | 16 +++++----------- .../Api.Data.Identity.Auth.Jwt.Models.csproj | 16 +++++----------- .../Api.Data.Identity.Models.csproj | 16 +++++----------- .../Api.Data.InMemory.Models.csproj | 16 +++++----------- .../Api.Data.LazyLoading.Models.csproj | 16 +++++----------- .../Api.Data.MySql.Collation.Models.csproj | 16 +++++----------- .../Api.Data.MySql.Mappings.Models.csproj | 16 +++++----------- .../Api.Data.MySql.Spatial.Models.csproj | 16 +++++----------- ...Api.Data.MySql.StoredProcedures.Models.csproj | 16 +++++----------- .../Api.Data.MySql.Views.Models.csproj | 16 +++++----------- .../Api.Data.MySql.Models.csproj | 16 +++++----------- .../Api.Data.PostgreSQL.Spatial.Models.csproj | 16 +++++----------- .../Api.Data.PostgreSQL.Models.csproj | 16 +++++----------- .../Api.Data.Repository.AutoSave.Models.csproj | 16 +++++----------- .../Api.Data.Repository.Includes.Models.csproj | 16 +++++----------- .../Api.Data.SoftDelete.Models.csproj | 16 +++++----------- .../Api.Data.SqLite.Models.csproj | 16 +++++----------- .../Api.Data.SqlServer.Spatial.Models.csproj | 16 +++++----------- .../Api.Data.SqlServer.Models.csproj | 16 +++++----------- .../Api.Data.Triggers.Models.csproj | 16 +++++----------- .../Api.Documentation.Csp.Models.csproj | 16 +++++----------- .../Api.Documentation.Models.csproj | 16 +++++----------- .../Api.ErrorHandling.Models.csproj | 16 +++++----------- .../Api.Eventing.RabbitMq.Models.csproj | 16 +++++----------- .../Api.HealthChecks.Models.csproj | 16 +++++----------- .../Api.Hosting.Http.Models.csproj | 16 +++++----------- .../Api.Hosting.Https.Models.csproj | 16 +++++----------- .../Api.Hosting.MultipartLimits.Models.csproj | 16 +++++----------- .../Api.Localization.Models.csproj | 16 +++++----------- .../Api.Logging.Log4Net.Models.csproj | 16 +++++----------- .../Api.Logging.Microsoft.Models.csproj | 16 +++++----------- .../Api.Logging.NLog.Models.csproj | 16 +++++----------- .../Api.Logging.Serilog.Models.csproj | 16 +++++----------- .../Api.MultipartJson.Models.csproj | 16 +++++----------- ...cyHeaders.ContentSecurityPolicy.Models.csproj | 16 +++++----------- ...olicyHeaders.ContentTypeOptions.Models.csproj | 16 +++++----------- .../Api.PolicyHeaders.Cors.Models.csproj | 16 +++++----------- ....PolicyHeaders.ForwardedHeaders.Models.csproj | 16 +++++----------- .../Api.PolicyHeaders.FrameOptions.Models.csproj | 16 +++++----------- .../Api.PolicyHeaders.Hsts.Models.csproj | 16 +++++----------- ...pi.PolicyHeaders.ReferrerPolicy.Models.csproj | 16 +++++----------- .../Api.PolicyHeaders.Robots.Models.csproj | 16 +++++----------- ...Api.PolicyHeaders.XssProtection.Models.csproj | 16 +++++----------- .../Api.RequestTracing.Models.csproj | 16 +++++----------- .../Api.ResponseCache.Models.csproj | 16 +++++----------- .../Api.ResponseCompression.Models.csproj | 16 +++++----------- .../Api.Session.Models/Api.Session.Models.csproj | 16 +++++----------- .../Api.StartupTasks.Models.csproj | 16 +++++----------- .../Api.StaticFiles.Models.csproj | 16 +++++----------- .../Api.Storage.Azure.Models.csproj | 16 +++++----------- .../Api.Storage.Local.Models.csproj | 16 +++++----------- .../Api.TimeZone.Models.csproj | 16 +++++----------- .../Api.Versioning.Models.csproj | 16 +++++----------- .../Api.VirusScan.Models.csproj | 16 +++++----------- .../Api.Blank.Models/Api.Blank.Models.csproj | 16 +++++----------- .../Web.Blank.Models/Web.Blank.Models.csproj | 16 +++++----------- 76 files changed, 380 insertions(+), 836 deletions(-) diff --git a/Api.ApiClients.Audit/Api.ApiClients.Audit.Models/Api.ApiClients.Audit.Models.csproj b/Api.ApiClients.Audit/Api.ApiClients.Audit.Models/Api.ApiClients.Audit.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.ApiClients.Audit/Api.ApiClients.Audit.Models/Api.ApiClients.Audit.Models.csproj +++ b/Api.ApiClients.Audit/Api.ApiClients.Audit.Models/Api.ApiClients.Audit.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.ApiClients.Audit/Api.ApiClients.Audit.Service.Models/Api.ApiClients.Audit.Service.Models.csproj b/Api.ApiClients.Audit/Api.ApiClients.Audit.Service.Models/Api.ApiClients.Audit.Service.Models.csproj index 82be9b94..8fc5868b 100644 --- a/Api.ApiClients.Audit/Api.ApiClients.Audit.Service.Models/Api.ApiClients.Audit.Service.Models.csproj +++ b/Api.ApiClients.Audit/Api.ApiClients.Audit.Service.Models/Api.ApiClients.Audit.Service.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.ApiClients.Entity/Api.ApiClients.Entity.Models/Api.ApiClients.Entity.Models.csproj b/Api.ApiClients.Entity/Api.ApiClients.Entity.Models/Api.ApiClients.Entity.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.ApiClients.Entity/Api.ApiClients.Entity.Models/Api.ApiClients.Entity.Models.csproj +++ b/Api.ApiClients.Entity/Api.ApiClients.Entity.Models/Api.ApiClients.Entity.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.ApiClients.Entity/Api.ApiClients.Entity.Service.Models/Api.ApiClients.Entity.Service.Models.csproj b/Api.ApiClients.Entity/Api.ApiClients.Entity.Service.Models/Api.ApiClients.Entity.Service.Models.csproj index 82be9b94..8fc5868b 100644 --- a/Api.ApiClients.Entity/Api.ApiClients.Entity.Service.Models/Api.ApiClients.Entity.Service.Models.csproj +++ b/Api.ApiClients.Entity/Api.ApiClients.Entity.Service.Models/Api.ApiClients.Entity.Service.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.ApiClients.RootLogIn/Api.ApiClients.RootLogIn.Models/Api.ApiClients.RootLogIn.Models.csproj b/Api.ApiClients.RootLogIn/Api.ApiClients.RootLogIn.Models/Api.ApiClients.RootLogIn.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.ApiClients.RootLogIn/Api.ApiClients.RootLogIn.Models/Api.ApiClients.RootLogIn.Models.csproj +++ b/Api.ApiClients.RootLogIn/Api.ApiClients.RootLogIn.Models/Api.ApiClients.RootLogIn.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.ApiClients.RootLogIn/Api.ApiClients.RootLogin.Service.Models/Api.ApiClients.RootLogin.Service.Models.csproj b/Api.ApiClients.RootLogIn/Api.ApiClients.RootLogin.Service.Models/Api.ApiClients.RootLogin.Service.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.ApiClients.RootLogIn/Api.ApiClients.RootLogin.Service.Models/Api.ApiClients.RootLogin.Service.Models.csproj +++ b/Api.ApiClients.RootLogIn/Api.ApiClients.RootLogin.Service.Models/Api.ApiClients.RootLogin.Service.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.ApiClients/Api.ApiClients.Models/Api.ApiClients.Models.csproj b/Api.ApiClients/Api.ApiClients.Models/Api.ApiClients.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.ApiClients/Api.ApiClients.Models/Api.ApiClients.Models.csproj +++ b/Api.ApiClients/Api.ApiClients.Models/Api.ApiClients.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.ApiClients/Api.ApiClients.Service.Models/Api.ApiClients.Service.Models.csproj b/Api.ApiClients/Api.ApiClients.Service.Models/Api.ApiClients.Service.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.ApiClients/Api.ApiClients.Service.Models/Api.ApiClients.Service.Models.csproj +++ b/Api.ApiClients/Api.ApiClients.Service.Models/Api.ApiClients.Service.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Auth.External.Custom/Api.Auth.External.Custom.Models/Api.Auth.External.Custom.Models.csproj b/Api.Auth.External.Custom/Api.Auth.External.Custom.Models/Api.Auth.External.Custom.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.Auth.External.Custom/Api.Auth.External.Custom.Models/Api.Auth.External.Custom.Models.csproj +++ b/Api.Auth.External.Custom/Api.Auth.External.Custom.Models/Api.Auth.External.Custom.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Auth.RootLogin/Api.Auth.RootLogin.Models/Api.Auth.RootLogin.Models.csproj b/Api.Auth.RootLogin/Api.Auth.RootLogin.Models/Api.Auth.RootLogin.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.Auth.RootLogin/Api.Auth.RootLogin.Models/Api.Auth.RootLogin.Models.csproj +++ b/Api.Auth.RootLogin/Api.Auth.RootLogin.Models/Api.Auth.RootLogin.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Authorization/Api.Authorization.Models/Api.Authorization.Models.csproj b/Api.Authorization/Api.Authorization.Models/Api.Authorization.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.Authorization/Api.Authorization.Models/Api.Authorization.Models.csproj +++ b/Api.Authorization/Api.Authorization.Models/Api.Authorization.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.ContentNegotiation/Api.ContentNegotiation.Models/Api.ContentNegotiation.Models.csproj b/Api.ContentNegotiation/Api.ContentNegotiation.Models/Api.ContentNegotiation.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.ContentNegotiation/Api.ContentNegotiation.Models/Api.ContentNegotiation.Models.csproj +++ b/Api.ContentNegotiation/Api.ContentNegotiation.Models/Api.ContentNegotiation.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Cookies/Api.Cookies.Models/Api.Cookies.Models.csproj b/Api.Cookies/Api.Cookies.Models/Api.Cookies.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.Cookies/Api.Cookies.Models/Api.Cookies.Models.csproj +++ b/Api.Cookies/Api.Cookies.Models/Api.Cookies.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.CustomConfigSection/Api.CustomConfigSection.Models/Api.CustomConfigSection.Models.csproj b/Api.CustomConfigSection/Api.CustomConfigSection.Models/Api.CustomConfigSection.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.CustomConfigSection/Api.CustomConfigSection.Models/Api.CustomConfigSection.Models.csproj +++ b/Api.CustomConfigSection/Api.CustomConfigSection.Models/Api.CustomConfigSection.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.CustomMiddleware/Api.CustomMiddleware.Models/Api.CustomMiddleware.Models.csproj b/Api.CustomMiddleware/Api.CustomMiddleware.Models/Api.CustomMiddleware.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.CustomMiddleware/Api.CustomMiddleware.Models/Api.CustomMiddleware.Models.csproj +++ b/Api.CustomMiddleware/Api.CustomMiddleware.Models/Api.CustomMiddleware.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.CustomService/Api.CustomService.Models/Api.CustomService.Models.csproj b/Api.CustomService/Api.CustomService.Models/Api.CustomService.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.CustomService/Api.CustomService.Models/Api.CustomService.Models.csproj +++ b/Api.CustomService/Api.CustomService.Models/Api.CustomService.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.Audit/Api.Data.Audit.Models/Api.Data.Audit.Models.csproj b/Api.Data.Audit/Api.Data.Audit.Models/Api.Data.Audit.Models.csproj index 82be9b94..8fc5868b 100644 --- a/Api.Data.Audit/Api.Data.Audit.Models/Api.Data.Audit.Models.csproj +++ b/Api.Data.Audit/Api.Data.Audit.Models/Api.Data.Audit.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.EntityEvents/Api.Data.EntityEvents.Models/Api.Data.EntityEvents.Models.csproj b/Api.Data.EntityEvents/Api.Data.EntityEvents.Models/Api.Data.EntityEvents.Models.csproj index c58bf942..1a71ff2f 100644 --- a/Api.Data.EntityEvents/Api.Data.EntityEvents.Models/Api.Data.EntityEvents.Models.csproj +++ b/Api.Data.EntityEvents/Api.Data.EntityEvents.Models/Api.Data.EntityEvents.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.EntityEvents/Api.Data.EntityEvents.Subscriber.Models/Api.Data.EntityEvents.Subscriber.Models.csproj b/Api.Data.EntityEvents/Api.Data.EntityEvents.Subscriber.Models/Api.Data.EntityEvents.Subscriber.Models.csproj index c58bf942..1a71ff2f 100644 --- a/Api.Data.EntityEvents/Api.Data.EntityEvents.Subscriber.Models/Api.Data.EntityEvents.Subscriber.Models.csproj +++ b/Api.Data.EntityEvents/Api.Data.EntityEvents.Subscriber.Models/Api.Data.EntityEvents.Subscriber.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.Identity.Auth.ApiKey/Api.Data.Identity.Auth.ApiKey.Models/Api.Data.Identity.Auth.ApiKey.Models.csproj b/Api.Data.Identity.Auth.ApiKey/Api.Data.Identity.Auth.ApiKey.Models/Api.Data.Identity.Auth.ApiKey.Models.csproj index 82be9b94..8fc5868b 100644 --- a/Api.Data.Identity.Auth.ApiKey/Api.Data.Identity.Auth.ApiKey.Models/Api.Data.Identity.Auth.ApiKey.Models.csproj +++ b/Api.Data.Identity.Auth.ApiKey/Api.Data.Identity.Auth.ApiKey.Models/Api.Data.Identity.Auth.ApiKey.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.Identity.Auth.External.Custom/Api.Data.Identity.Auth.External.Custom.Models/Api.Data.Identity.Auth.External.Custom.Models.csproj b/Api.Data.Identity.Auth.External.Custom/Api.Data.Identity.Auth.External.Custom.Models/Api.Data.Identity.Auth.External.Custom.Models.csproj index 82be9b94..8fc5868b 100644 --- a/Api.Data.Identity.Auth.External.Custom/Api.Data.Identity.Auth.External.Custom.Models/Api.Data.Identity.Auth.External.Custom.Models.csproj +++ b/Api.Data.Identity.Auth.External.Custom/Api.Data.Identity.Auth.External.Custom.Models/Api.Data.Identity.Auth.External.Custom.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.Identity.Auth.Jwt/Api.Data.Identity.Auth.Jwt.Models/Api.Data.Identity.Auth.Jwt.Models.csproj b/Api.Data.Identity.Auth.Jwt/Api.Data.Identity.Auth.Jwt.Models/Api.Data.Identity.Auth.Jwt.Models.csproj index 82be9b94..8fc5868b 100644 --- a/Api.Data.Identity.Auth.Jwt/Api.Data.Identity.Auth.Jwt.Models/Api.Data.Identity.Auth.Jwt.Models.csproj +++ b/Api.Data.Identity.Auth.Jwt/Api.Data.Identity.Auth.Jwt.Models/Api.Data.Identity.Auth.Jwt.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.Identity/Api.Data.Identity.Models/Api.Data.Identity.Models.csproj b/Api.Data.Identity/Api.Data.Identity.Models/Api.Data.Identity.Models.csproj index 82be9b94..8fc5868b 100644 --- a/Api.Data.Identity/Api.Data.Identity.Models/Api.Data.Identity.Models.csproj +++ b/Api.Data.Identity/Api.Data.Identity.Models/Api.Data.Identity.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.InMemory/Api.Data.InMemory.Models/Api.Data.InMemory.Models.csproj b/Api.Data.InMemory/Api.Data.InMemory.Models/Api.Data.InMemory.Models.csproj index f949c7de..c706da29 100644 --- a/Api.Data.InMemory/Api.Data.InMemory.Models/Api.Data.InMemory.Models.csproj +++ b/Api.Data.InMemory/Api.Data.InMemory.Models/Api.Data.InMemory.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.LazyLoading/Api.Data.LazyLoading.Models/Api.Data.LazyLoading.Models.csproj b/Api.Data.LazyLoading/Api.Data.LazyLoading.Models/Api.Data.LazyLoading.Models.csproj index 82be9b94..8fc5868b 100644 --- a/Api.Data.LazyLoading/Api.Data.LazyLoading.Models/Api.Data.LazyLoading.Models.csproj +++ b/Api.Data.LazyLoading/Api.Data.LazyLoading.Models/Api.Data.LazyLoading.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.MySql.Collation/Api.Data.MySql.Collation.Models/Api.Data.MySql.Collation.Models.csproj b/Api.Data.MySql.Collation/Api.Data.MySql.Collation.Models/Api.Data.MySql.Collation.Models.csproj index 82be9b94..8fc5868b 100644 --- a/Api.Data.MySql.Collation/Api.Data.MySql.Collation.Models/Api.Data.MySql.Collation.Models.csproj +++ b/Api.Data.MySql.Collation/Api.Data.MySql.Collation.Models/Api.Data.MySql.Collation.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.MySql.Mappings/Api.Data.MySql.Mappings.Models/Api.Data.MySql.Mappings.Models.csproj b/Api.Data.MySql.Mappings/Api.Data.MySql.Mappings.Models/Api.Data.MySql.Mappings.Models.csproj index 82be9b94..8fc5868b 100644 --- a/Api.Data.MySql.Mappings/Api.Data.MySql.Mappings.Models/Api.Data.MySql.Mappings.Models.csproj +++ b/Api.Data.MySql.Mappings/Api.Data.MySql.Mappings.Models/Api.Data.MySql.Mappings.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.MySql.Spatial/Api.Data.MySql.Spatial.Models/Api.Data.MySql.Spatial.Models.csproj b/Api.Data.MySql.Spatial/Api.Data.MySql.Spatial.Models/Api.Data.MySql.Spatial.Models.csproj index 82be9b94..8fc5868b 100644 --- a/Api.Data.MySql.Spatial/Api.Data.MySql.Spatial.Models/Api.Data.MySql.Spatial.Models.csproj +++ b/Api.Data.MySql.Spatial/Api.Data.MySql.Spatial.Models/Api.Data.MySql.Spatial.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.MySql.StoredProcedures/Api.Data.MySql.StoredProcedures.Models/Api.Data.MySql.StoredProcedures.Models.csproj b/Api.Data.MySql.StoredProcedures/Api.Data.MySql.StoredProcedures.Models/Api.Data.MySql.StoredProcedures.Models.csproj index 82be9b94..8fc5868b 100644 --- a/Api.Data.MySql.StoredProcedures/Api.Data.MySql.StoredProcedures.Models/Api.Data.MySql.StoredProcedures.Models.csproj +++ b/Api.Data.MySql.StoredProcedures/Api.Data.MySql.StoredProcedures.Models/Api.Data.MySql.StoredProcedures.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.MySql.Views/Api.Data.MySql.Views.Models/Api.Data.MySql.Views.Models.csproj b/Api.Data.MySql.Views/Api.Data.MySql.Views.Models/Api.Data.MySql.Views.Models.csproj index 82be9b94..8fc5868b 100644 --- a/Api.Data.MySql.Views/Api.Data.MySql.Views.Models/Api.Data.MySql.Views.Models.csproj +++ b/Api.Data.MySql.Views/Api.Data.MySql.Views.Models/Api.Data.MySql.Views.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.MySql/Api.Data.MySql.Models/Api.Data.MySql.Models.csproj b/Api.Data.MySql/Api.Data.MySql.Models/Api.Data.MySql.Models.csproj index 1a34a185..0c881493 100644 --- a/Api.Data.MySql/Api.Data.MySql.Models/Api.Data.MySql.Models.csproj +++ b/Api.Data.MySql/Api.Data.MySql.Models/Api.Data.MySql.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.PostgreSQL.Spatial/Api.Data.PostgreSQL.Spatial.Models/Api.Data.PostgreSQL.Spatial.Models.csproj b/Api.Data.PostgreSQL.Spatial/Api.Data.PostgreSQL.Spatial.Models/Api.Data.PostgreSQL.Spatial.Models.csproj index 9b2d874d..9fb055c4 100644 --- a/Api.Data.PostgreSQL.Spatial/Api.Data.PostgreSQL.Spatial.Models/Api.Data.PostgreSQL.Spatial.Models.csproj +++ b/Api.Data.PostgreSQL.Spatial/Api.Data.PostgreSQL.Spatial.Models/Api.Data.PostgreSQL.Spatial.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.PostgreSQL/Api.Data.PostgreSQL.Models/Api.Data.PostgreSQL.Models.csproj b/Api.Data.PostgreSQL/Api.Data.PostgreSQL.Models/Api.Data.PostgreSQL.Models.csproj index 9b2d874d..9fb055c4 100644 --- a/Api.Data.PostgreSQL/Api.Data.PostgreSQL.Models/Api.Data.PostgreSQL.Models.csproj +++ b/Api.Data.PostgreSQL/Api.Data.PostgreSQL.Models/Api.Data.PostgreSQL.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.Repository.AutoSave/Api.Data.Repository.AutoSave.Models/Api.Data.Repository.AutoSave.Models.csproj b/Api.Data.Repository.AutoSave/Api.Data.Repository.AutoSave.Models/Api.Data.Repository.AutoSave.Models.csproj index 82be9b94..8fc5868b 100644 --- a/Api.Data.Repository.AutoSave/Api.Data.Repository.AutoSave.Models/Api.Data.Repository.AutoSave.Models.csproj +++ b/Api.Data.Repository.AutoSave/Api.Data.Repository.AutoSave.Models/Api.Data.Repository.AutoSave.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.Repository.Includes/Api.Data.Repository.Includes.Models/Api.Data.Repository.Includes.Models.csproj b/Api.Data.Repository.Includes/Api.Data.Repository.Includes.Models/Api.Data.Repository.Includes.Models.csproj index 82be9b94..8fc5868b 100644 --- a/Api.Data.Repository.Includes/Api.Data.Repository.Includes.Models/Api.Data.Repository.Includes.Models.csproj +++ b/Api.Data.Repository.Includes/Api.Data.Repository.Includes.Models/Api.Data.Repository.Includes.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.SoftDelete/Api.Data.SoftDelete.Models/Api.Data.SoftDelete.Models.csproj b/Api.Data.SoftDelete/Api.Data.SoftDelete.Models/Api.Data.SoftDelete.Models.csproj index 82be9b94..8fc5868b 100644 --- a/Api.Data.SoftDelete/Api.Data.SoftDelete.Models/Api.Data.SoftDelete.Models.csproj +++ b/Api.Data.SoftDelete/Api.Data.SoftDelete.Models/Api.Data.SoftDelete.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.SqLite/Api.Data.SqLite.Models/Api.Data.SqLite.Models.csproj b/Api.Data.SqLite/Api.Data.SqLite.Models/Api.Data.SqLite.Models.csproj index 796675d7..4fd03943 100644 --- a/Api.Data.SqLite/Api.Data.SqLite.Models/Api.Data.SqLite.Models.csproj +++ b/Api.Data.SqLite/Api.Data.SqLite.Models/Api.Data.SqLite.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.SqlServer.Spatial/Api.Data.SqlServer.Spatial.Models/Api.Data.SqlServer.Spatial.Models.csproj b/Api.Data.SqlServer.Spatial/Api.Data.SqlServer.Spatial.Models/Api.Data.SqlServer.Spatial.Models.csproj index 8c31e7ba..396d24b3 100644 --- a/Api.Data.SqlServer.Spatial/Api.Data.SqlServer.Spatial.Models/Api.Data.SqlServer.Spatial.Models.csproj +++ b/Api.Data.SqlServer.Spatial/Api.Data.SqlServer.Spatial.Models/Api.Data.SqlServer.Spatial.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.SqlServer/Api.Data.SqlServer.Models/Api.Data.SqlServer.Models.csproj b/Api.Data.SqlServer/Api.Data.SqlServer.Models/Api.Data.SqlServer.Models.csproj index 8c31e7ba..396d24b3 100644 --- a/Api.Data.SqlServer/Api.Data.SqlServer.Models/Api.Data.SqlServer.Models.csproj +++ b/Api.Data.SqlServer/Api.Data.SqlServer.Models/Api.Data.SqlServer.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Data.Triggers/Api.Data.Triggers.Models/Api.Data.Triggers.Models.csproj b/Api.Data.Triggers/Api.Data.Triggers.Models/Api.Data.Triggers.Models.csproj index 82be9b94..8fc5868b 100644 --- a/Api.Data.Triggers/Api.Data.Triggers.Models/Api.Data.Triggers.Models.csproj +++ b/Api.Data.Triggers/Api.Data.Triggers.Models/Api.Data.Triggers.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Documentation.Csp/Api.Documentation.Csp.Models/Api.Documentation.Csp.Models.csproj b/Api.Documentation.Csp/Api.Documentation.Csp.Models/Api.Documentation.Csp.Models.csproj index 7a4d41f3..5721d8ef 100644 --- a/Api.Documentation.Csp/Api.Documentation.Csp.Models/Api.Documentation.Csp.Models.csproj +++ b/Api.Documentation.Csp/Api.Documentation.Csp.Models/Api.Documentation.Csp.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Documentation/Api.Documentation.Models/Api.Documentation.Models.csproj b/Api.Documentation/Api.Documentation.Models/Api.Documentation.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.Documentation/Api.Documentation.Models/Api.Documentation.Models.csproj +++ b/Api.Documentation/Api.Documentation.Models/Api.Documentation.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.ErrorHandling/Api.ErrorHandling.Models/Api.ErrorHandling.Models.csproj b/Api.ErrorHandling/Api.ErrorHandling.Models/Api.ErrorHandling.Models.csproj index 890be2f1..9b70eeab 100644 --- a/Api.ErrorHandling/Api.ErrorHandling.Models/Api.ErrorHandling.Models.csproj +++ b/Api.ErrorHandling/Api.ErrorHandling.Models/Api.ErrorHandling.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Eventing.RabbitMq/Api.Eventing.RabbitMq.Models/Api.Eventing.RabbitMq.Models.csproj b/Api.Eventing.RabbitMq/Api.Eventing.RabbitMq.Models/Api.Eventing.RabbitMq.Models.csproj index 04328227..0a22c469 100644 --- a/Api.Eventing.RabbitMq/Api.Eventing.RabbitMq.Models/Api.Eventing.RabbitMq.Models.csproj +++ b/Api.Eventing.RabbitMq/Api.Eventing.RabbitMq.Models/Api.Eventing.RabbitMq.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.HealthChecks/Api.HealthChecks.Models/Api.HealthChecks.Models.csproj b/Api.HealthChecks/Api.HealthChecks.Models/Api.HealthChecks.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.HealthChecks/Api.HealthChecks.Models/Api.HealthChecks.Models.csproj +++ b/Api.HealthChecks/Api.HealthChecks.Models/Api.HealthChecks.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Hosting.Http/Api.Hosting.Http.Models/Api.Hosting.Http.Models.csproj b/Api.Hosting.Http/Api.Hosting.Http.Models/Api.Hosting.Http.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.Hosting.Http/Api.Hosting.Http.Models/Api.Hosting.Http.Models.csproj +++ b/Api.Hosting.Http/Api.Hosting.Http.Models/Api.Hosting.Http.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Hosting.Https/Api.Hosting.Https.Models/Api.Hosting.Https.Models.csproj b/Api.Hosting.Https/Api.Hosting.Https.Models/Api.Hosting.Https.Models.csproj index 7a4d41f3..5721d8ef 100644 --- a/Api.Hosting.Https/Api.Hosting.Https.Models/Api.Hosting.Https.Models.csproj +++ b/Api.Hosting.Https/Api.Hosting.Https.Models/Api.Hosting.Https.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Hosting.MultipartLimits/Api.Hosting.MultipartLimits.Models/Api.Hosting.MultipartLimits.Models.csproj b/Api.Hosting.MultipartLimits/Api.Hosting.MultipartLimits.Models/Api.Hosting.MultipartLimits.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.Hosting.MultipartLimits/Api.Hosting.MultipartLimits.Models/Api.Hosting.MultipartLimits.Models.csproj +++ b/Api.Hosting.MultipartLimits/Api.Hosting.MultipartLimits.Models/Api.Hosting.MultipartLimits.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Localization/Api.Localization.Models/Api.Localization.Models.csproj b/Api.Localization/Api.Localization.Models/Api.Localization.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.Localization/Api.Localization.Models/Api.Localization.Models.csproj +++ b/Api.Localization/Api.Localization.Models/Api.Localization.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Logging.Log4Net/Api.Logging.Log4Net.Models/Api.Logging.Log4Net.Models.csproj b/Api.Logging.Log4Net/Api.Logging.Log4Net.Models/Api.Logging.Log4Net.Models.csproj index 6d16235d..efa590a5 100644 --- a/Api.Logging.Log4Net/Api.Logging.Log4Net.Models/Api.Logging.Log4Net.Models.csproj +++ b/Api.Logging.Log4Net/Api.Logging.Log4Net.Models/Api.Logging.Log4Net.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Logging.Microsoft/Api.Logging.Microsoft.Models/Api.Logging.Microsoft.Models.csproj b/Api.Logging.Microsoft/Api.Logging.Microsoft.Models/Api.Logging.Microsoft.Models.csproj index a284b2dc..2bf37abf 100644 --- a/Api.Logging.Microsoft/Api.Logging.Microsoft.Models/Api.Logging.Microsoft.Models.csproj +++ b/Api.Logging.Microsoft/Api.Logging.Microsoft.Models/Api.Logging.Microsoft.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Logging.NLog/Api.Logging.NLog.Models/Api.Logging.NLog.Models.csproj b/Api.Logging.NLog/Api.Logging.NLog.Models/Api.Logging.NLog.Models.csproj index 8989e105..6a72671e 100644 --- a/Api.Logging.NLog/Api.Logging.NLog.Models/Api.Logging.NLog.Models.csproj +++ b/Api.Logging.NLog/Api.Logging.NLog.Models/Api.Logging.NLog.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Logging.Serilog/Api.Logging.Serilog.Models/Api.Logging.Serilog.Models.csproj b/Api.Logging.Serilog/Api.Logging.Serilog.Models/Api.Logging.Serilog.Models.csproj index d1fa3771..ded626a7 100644 --- a/Api.Logging.Serilog/Api.Logging.Serilog.Models/Api.Logging.Serilog.Models.csproj +++ b/Api.Logging.Serilog/Api.Logging.Serilog.Models/Api.Logging.Serilog.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.MultipartJson/Api.MultipartJson.Models/Api.MultipartJson.Models.csproj b/Api.MultipartJson/Api.MultipartJson.Models/Api.MultipartJson.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.MultipartJson/Api.MultipartJson.Models/Api.MultipartJson.Models.csproj +++ b/Api.MultipartJson/Api.MultipartJson.Models/Api.MultipartJson.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.PolicyHeaders.ContentSecurityPolicy/Api.PolicyHeaders.ContentSecurityPolicy.Models/Api.PolicyHeaders.ContentSecurityPolicy.Models.csproj b/Api.PolicyHeaders.ContentSecurityPolicy/Api.PolicyHeaders.ContentSecurityPolicy.Models/Api.PolicyHeaders.ContentSecurityPolicy.Models.csproj index 890be2f1..9b70eeab 100644 --- a/Api.PolicyHeaders.ContentSecurityPolicy/Api.PolicyHeaders.ContentSecurityPolicy.Models/Api.PolicyHeaders.ContentSecurityPolicy.Models.csproj +++ b/Api.PolicyHeaders.ContentSecurityPolicy/Api.PolicyHeaders.ContentSecurityPolicy.Models/Api.PolicyHeaders.ContentSecurityPolicy.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.PolicyHeaders.ContentTypeOptions/Api.PolicyHeaders.ContentTypeOptions.Models/Api.PolicyHeaders.ContentTypeOptions.Models.csproj b/Api.PolicyHeaders.ContentTypeOptions/Api.PolicyHeaders.ContentTypeOptions.Models/Api.PolicyHeaders.ContentTypeOptions.Models.csproj index 890be2f1..9b70eeab 100644 --- a/Api.PolicyHeaders.ContentTypeOptions/Api.PolicyHeaders.ContentTypeOptions.Models/Api.PolicyHeaders.ContentTypeOptions.Models.csproj +++ b/Api.PolicyHeaders.ContentTypeOptions/Api.PolicyHeaders.ContentTypeOptions.Models/Api.PolicyHeaders.ContentTypeOptions.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.PolicyHeaders.Cors/Api.PolicyHeaders.Cors.Models/Api.PolicyHeaders.Cors.Models.csproj b/Api.PolicyHeaders.Cors/Api.PolicyHeaders.Cors.Models/Api.PolicyHeaders.Cors.Models.csproj index 890be2f1..9b70eeab 100644 --- a/Api.PolicyHeaders.Cors/Api.PolicyHeaders.Cors.Models/Api.PolicyHeaders.Cors.Models.csproj +++ b/Api.PolicyHeaders.Cors/Api.PolicyHeaders.Cors.Models/Api.PolicyHeaders.Cors.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.PolicyHeaders.ForwardedHeaders/Api.PolicyHeaders.ForwardedHeaders.Models/Api.PolicyHeaders.ForwardedHeaders.Models.csproj b/Api.PolicyHeaders.ForwardedHeaders/Api.PolicyHeaders.ForwardedHeaders.Models/Api.PolicyHeaders.ForwardedHeaders.Models.csproj index 890be2f1..9b70eeab 100644 --- a/Api.PolicyHeaders.ForwardedHeaders/Api.PolicyHeaders.ForwardedHeaders.Models/Api.PolicyHeaders.ForwardedHeaders.Models.csproj +++ b/Api.PolicyHeaders.ForwardedHeaders/Api.PolicyHeaders.ForwardedHeaders.Models/Api.PolicyHeaders.ForwardedHeaders.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.PolicyHeaders.FrameOptions/Api.PolicyHeaders.FrameOptions.Models/Api.PolicyHeaders.FrameOptions.Models.csproj b/Api.PolicyHeaders.FrameOptions/Api.PolicyHeaders.FrameOptions.Models/Api.PolicyHeaders.FrameOptions.Models.csproj index 890be2f1..9b70eeab 100644 --- a/Api.PolicyHeaders.FrameOptions/Api.PolicyHeaders.FrameOptions.Models/Api.PolicyHeaders.FrameOptions.Models.csproj +++ b/Api.PolicyHeaders.FrameOptions/Api.PolicyHeaders.FrameOptions.Models/Api.PolicyHeaders.FrameOptions.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.PolicyHeaders.Hsts/Api.PolicyHeaders.Hsts.Models/Api.PolicyHeaders.Hsts.Models.csproj b/Api.PolicyHeaders.Hsts/Api.PolicyHeaders.Hsts.Models/Api.PolicyHeaders.Hsts.Models.csproj index 890be2f1..9b70eeab 100644 --- a/Api.PolicyHeaders.Hsts/Api.PolicyHeaders.Hsts.Models/Api.PolicyHeaders.Hsts.Models.csproj +++ b/Api.PolicyHeaders.Hsts/Api.PolicyHeaders.Hsts.Models/Api.PolicyHeaders.Hsts.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.PolicyHeaders.ReferrerPolicy/Api.PolicyHeaders.ReferrerPolicy.Models/Api.PolicyHeaders.ReferrerPolicy.Models.csproj b/Api.PolicyHeaders.ReferrerPolicy/Api.PolicyHeaders.ReferrerPolicy.Models/Api.PolicyHeaders.ReferrerPolicy.Models.csproj index 890be2f1..9b70eeab 100644 --- a/Api.PolicyHeaders.ReferrerPolicy/Api.PolicyHeaders.ReferrerPolicy.Models/Api.PolicyHeaders.ReferrerPolicy.Models.csproj +++ b/Api.PolicyHeaders.ReferrerPolicy/Api.PolicyHeaders.ReferrerPolicy.Models/Api.PolicyHeaders.ReferrerPolicy.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.PolicyHeaders.Robots/Api.PolicyHeaders.Robots.Models/Api.PolicyHeaders.Robots.Models.csproj b/Api.PolicyHeaders.Robots/Api.PolicyHeaders.Robots.Models/Api.PolicyHeaders.Robots.Models.csproj index 890be2f1..9b70eeab 100644 --- a/Api.PolicyHeaders.Robots/Api.PolicyHeaders.Robots.Models/Api.PolicyHeaders.Robots.Models.csproj +++ b/Api.PolicyHeaders.Robots/Api.PolicyHeaders.Robots.Models/Api.PolicyHeaders.Robots.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.PolicyHeaders.XssProtection/Api.PolicyHeaders.XssProtection.Models/Api.PolicyHeaders.XssProtection.Models.csproj b/Api.PolicyHeaders.XssProtection/Api.PolicyHeaders.XssProtection.Models/Api.PolicyHeaders.XssProtection.Models.csproj index 890be2f1..9b70eeab 100644 --- a/Api.PolicyHeaders.XssProtection/Api.PolicyHeaders.XssProtection.Models/Api.PolicyHeaders.XssProtection.Models.csproj +++ b/Api.PolicyHeaders.XssProtection/Api.PolicyHeaders.XssProtection.Models/Api.PolicyHeaders.XssProtection.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.RequestTracing/Api.RequestTracing.Models/Api.RequestTracing.Models.csproj b/Api.RequestTracing/Api.RequestTracing.Models/Api.RequestTracing.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.RequestTracing/Api.RequestTracing.Models/Api.RequestTracing.Models.csproj +++ b/Api.RequestTracing/Api.RequestTracing.Models/Api.RequestTracing.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.ResponseCache/Api.ResponseCache.Models/Api.ResponseCache.Models.csproj b/Api.ResponseCache/Api.ResponseCache.Models/Api.ResponseCache.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.ResponseCache/Api.ResponseCache.Models/Api.ResponseCache.Models.csproj +++ b/Api.ResponseCache/Api.ResponseCache.Models/Api.ResponseCache.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.ResponseCompression/Api.ResponseCompression.Models/Api.ResponseCompression.Models.csproj b/Api.ResponseCompression/Api.ResponseCompression.Models/Api.ResponseCompression.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.ResponseCompression/Api.ResponseCompression.Models/Api.ResponseCompression.Models.csproj +++ b/Api.ResponseCompression/Api.ResponseCompression.Models/Api.ResponseCompression.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Session/Api.Session.Models/Api.Session.Models.csproj b/Api.Session/Api.Session.Models/Api.Session.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.Session/Api.Session.Models/Api.Session.Models.csproj +++ b/Api.Session/Api.Session.Models/Api.Session.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.StartupTasks/Api.StartupTasks.Models/Api.StartupTasks.Models.csproj b/Api.StartupTasks/Api.StartupTasks.Models/Api.StartupTasks.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.StartupTasks/Api.StartupTasks.Models/Api.StartupTasks.Models.csproj +++ b/Api.StartupTasks/Api.StartupTasks.Models/Api.StartupTasks.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.StaticFiles/Api.StaticFiles.Models/Api.StaticFiles.Models.csproj b/Api.StaticFiles/Api.StaticFiles.Models/Api.StaticFiles.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.StaticFiles/Api.StaticFiles.Models/Api.StaticFiles.Models.csproj +++ b/Api.StaticFiles/Api.StaticFiles.Models/Api.StaticFiles.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Storage.Azure/Api.Storage.Azure.Models/Api.Storage.Azure.Models.csproj b/Api.Storage.Azure/Api.Storage.Azure.Models/Api.Storage.Azure.Models.csproj index 2865dfbb..df88cb1c 100644 --- a/Api.Storage.Azure/Api.Storage.Azure.Models/Api.Storage.Azure.Models.csproj +++ b/Api.Storage.Azure/Api.Storage.Azure.Models/Api.Storage.Azure.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Storage.Local/Api.Storage.Local.Models/Api.Storage.Local.Models.csproj b/Api.Storage.Local/Api.Storage.Local.Models/Api.Storage.Local.Models.csproj index 8f47aa23..08ff690d 100644 --- a/Api.Storage.Local/Api.Storage.Local.Models/Api.Storage.Local.Models.csproj +++ b/Api.Storage.Local/Api.Storage.Local.Models/Api.Storage.Local.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.TimeZone/Api.TimeZone.Models/Api.TimeZone.Models.csproj b/Api.TimeZone/Api.TimeZone.Models/Api.TimeZone.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.TimeZone/Api.TimeZone.Models/Api.TimeZone.Models.csproj +++ b/Api.TimeZone/Api.TimeZone.Models/Api.TimeZone.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.Versioning/Api.Versioning.Models/Api.Versioning.Models.csproj b/Api.Versioning/Api.Versioning.Models/Api.Versioning.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.Versioning/Api.Versioning.Models/Api.Versioning.Models.csproj +++ b/Api.Versioning/Api.Versioning.Models/Api.Versioning.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api.VirusScan/Api.VirusScan.Models/Api.VirusScan.Models.csproj b/Api.VirusScan/Api.VirusScan.Models/Api.VirusScan.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api.VirusScan/Api.VirusScan.Models/Api.VirusScan.Models.csproj +++ b/Api.VirusScan/Api.VirusScan.Models/Api.VirusScan.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Api._Blank/Api.Blank.Models/Api.Blank.Models.csproj b/Api._Blank/Api.Blank.Models/Api.Blank.Models.csproj index c33a8e9a..e4188943 100644 --- a/Api._Blank/Api.Blank.Models/Api.Blank.Models.csproj +++ b/Api._Blank/Api.Blank.Models/Api.Blank.Models.csproj @@ -22,17 +22,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -41,7 +35,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md diff --git a/Web._Blank/Web.Blank.Models/Web.Blank.Models.csproj b/Web._Blank/Web.Blank.Models/Web.Blank.Models.csproj index df35117b..c8a0992a 100644 --- a/Web._Blank/Web.Blank.Models/Web.Blank.Models.csproj +++ b/Web._Blank/Web.Blank.Models/Web.Blank.Models.csproj @@ -21,17 +21,11 @@ Michael Vivet $(ProjectName) Example project demonstrating a focused aspect of the Nano Library. - - A practical example highlighting a specific area or scenario of Nano for learning - and experimentation. Shows how features or patterns can be applied without - representing a full application or complete reference. - - - - Added .NET 10 support - + A practical example highlighting a specific area or scenario of Nano for learning and experimentation. Shows how features or patterns can be applied without representing a full application or complete reference. + git - master - https://github.com/Nano-Core/Nano.Examples.git + main + https://github.com/Nano-Core/Nano.Lessons.git $(GitCommitHash) true true @@ -40,7 +34,7 @@ true $(Version) nano;example;sample;framework;library;learning;showcase - https://github.com/Nano-Core/Nano.Library/$(ProjectName) + https://github.com/Nano-Core/Nano.Lessons/$(ProjectName) LICENSE icon.png README.md From a35889fb28016c93883b6cb87bfdc7a9c90e0dd0 Mon Sep 17 00:00:00 2001 From: vivet Date: Sun, 12 Jul 2026 08:47:19 +0200 Subject: [PATCH 20/33] Updated --- Api.Storage.Azure/.kubernetes/configmap.yaml | 1 + Api.Storage.Local/.kubernetes/configmap.yaml | 1 + Console.Storage.Azure/.kubernetes/configmap.yaml | 1 + Console.Storage.Local/.kubernetes/configmap.yaml | 1 + 4 files changed, 4 insertions(+) diff --git a/Api.Storage.Azure/.kubernetes/configmap.yaml b/Api.Storage.Azure/.kubernetes/configmap.yaml index d13013d1..ef1e83f5 100644 --- a/Api.Storage.Azure/.kubernetes/configmap.yaml +++ b/Api.Storage.Azure/.kubernetes/configmap.yaml @@ -5,4 +5,5 @@ metadata: namespace: %KUBERNETES_NAMESPACE% data: App__Version: %VERSION% + Storage__ShareName: %STORAGE_SHARE_NAME% ASPNETCORE_ENVIRONMENT: %ASPNETCORE_ENVIRONMENT% diff --git a/Api.Storage.Local/.kubernetes/configmap.yaml b/Api.Storage.Local/.kubernetes/configmap.yaml index d13013d1..ef1e83f5 100644 --- a/Api.Storage.Local/.kubernetes/configmap.yaml +++ b/Api.Storage.Local/.kubernetes/configmap.yaml @@ -5,4 +5,5 @@ metadata: namespace: %KUBERNETES_NAMESPACE% data: App__Version: %VERSION% + Storage__ShareName: %STORAGE_SHARE_NAME% ASPNETCORE_ENVIRONMENT: %ASPNETCORE_ENVIRONMENT% diff --git a/Console.Storage.Azure/.kubernetes/configmap.yaml b/Console.Storage.Azure/.kubernetes/configmap.yaml index f2293b0f..dbc85e41 100644 --- a/Console.Storage.Azure/.kubernetes/configmap.yaml +++ b/Console.Storage.Azure/.kubernetes/configmap.yaml @@ -5,4 +5,5 @@ metadata: namespace: %KUBERNETES_NAMESPACE% data: App__Version: %VERSION% + Storage__ShareName: %STORAGE_SHARE_NAME% DOTNET_ENVIRONMENT: %DOTNET_ENVIRONMENT% \ No newline at end of file diff --git a/Console.Storage.Local/.kubernetes/configmap.yaml b/Console.Storage.Local/.kubernetes/configmap.yaml index f2293b0f..dbc85e41 100644 --- a/Console.Storage.Local/.kubernetes/configmap.yaml +++ b/Console.Storage.Local/.kubernetes/configmap.yaml @@ -5,4 +5,5 @@ metadata: namespace: %KUBERNETES_NAMESPACE% data: App__Version: %VERSION% + Storage__ShareName: %STORAGE_SHARE_NAME% DOTNET_ENVIRONMENT: %DOTNET_ENVIRONMENT% \ No newline at end of file From 0926c3aaec70b12ac0a0c722d16ecd5516bdaa20 Mon Sep 17 00:00:00 2001 From: vivet Date: Sun, 12 Jul 2026 11:27:44 +0200 Subject: [PATCH 21/33] Updated --- Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- Api.ApiClients/.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml | 5 +++-- Api.Authorization/.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- Api.Cookies/.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- Api.CustomMiddleware/.github/workflows/build-and-deploy.yml | 5 +++-- Api.CustomService/.github/workflows/build-and-deploy.yml | 5 +++-- Api.Data.Audit/.github/workflows/build-and-deploy.yml | 4 +++- .../.github/workflows/build-and-deploy.yml | 4 +++- .../.github/workflows/build-and-deploy.yml | 4 +++- .../.github/workflows/build-and-deploy.yml | 4 +++- .../.github/workflows/build-and-deploy.yml | 4 +++- Api.Data.Identity/.github/workflows/build-and-deploy.yml | 4 +++- Api.Data.InMemory/.github/workflows/build-and-deploy.yml | 5 +++-- Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml | 4 +++- .../.github/workflows/build-and-deploy.yml | 4 +++- .../.github/workflows/build-and-deploy.yml | 4 +++- .../.github/workflows/build-and-deploy.yml | 4 +++- .../.github/workflows/build-and-deploy.yml | 4 +++- Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml | 4 +++- Api.Data.MySql/.github/workflows/build-and-deploy.yml | 4 +++- .../.github/workflows/build-and-deploy.yml | 4 +++- Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml | 4 +++- .../.github/workflows/build-and-deploy.yml | 4 +++- .../.github/workflows/build-and-deploy.yml | 4 +++- Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml | 4 +++- Api.Data.SqLite/.github/workflows/build-and-deploy.yml | 4 +++- .../.github/workflows/build-and-deploy.yml | 4 +++- Api.Data.SqlServer/.github/workflows/build-and-deploy.yml | 4 +++- Api.Data.Triggers/.github/workflows/build-and-deploy.yml | 4 +++- .../.github/workflows/build-and-deploy.yml | 4 +++- Api.Documentation/.github/workflows/build-and-deploy.yml | 6 +++--- Api.ErrorHandling/.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- Api.HealthChecks/.github/workflows/build-and-deploy.yml | 5 +++-- Api.Hosting.Http/.github/workflows/build-and-deploy.yml | 5 +++-- Api.Hosting.Https/.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- Api.Localization/.github/workflows/build-and-deploy.yml | 5 +++-- Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- Api.Logging.NLog/.github/workflows/build-and-deploy.yml | 5 +++-- Api.Logging.Serilog/.github/workflows/build-and-deploy.yml | 5 +++-- Api.MultipartJson/.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- Api.RequestTracing/.github/workflows/build-and-deploy.yml | 5 +++-- Api.ResponseCache/.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- Api.Session/.github/workflows/build-and-deploy.yml | 5 +++-- Api.StartupTasks/.github/workflows/build-and-deploy.yml | 5 +++-- Api.StaticFiles/.github/workflows/build-and-deploy.yml | 5 +++-- Api.Storage.Azure/.github/workflows/build-and-deploy.yml | 4 +++- Api.Storage.Local/.github/workflows/build-and-deploy.yml | 5 +++-- Api.TimeZone/.github/workflows/build-and-deploy.yml | 5 +++-- Api.Versioning/.github/workflows/build-and-deploy.yml | 5 +++-- Api.VirusScan/.github/workflows/build-and-deploy.yml | 5 +++-- Api._Blank/.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- Console.Data.MySql/.github/workflows/build-and-deploy.yml | 4 +++- .../.github/workflows/build-and-deploy.yml | 4 +++- Console.Data.SqLite/.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 4 +++- .../.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- Console.Localization/.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- Console.Logging.NLog/.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 5 +++-- Console.StartupTasks/.github/workflows/build-and-deploy.yml | 5 +++-- .../.github/workflows/build-and-deploy.yml | 4 +++- .../.github/workflows/build-and-deploy.yml | 5 +++-- Console.Workers/.github/workflows/build-and-deploy.yml | 5 +++-- Console._Blank/.github/workflows/build-and-deploy.yml | 5 +++-- Web._Blank/.github/workflows/build-and-deploy.yml | 5 +++-- 90 files changed, 270 insertions(+), 153 deletions(-) diff --git a/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml b/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml index f7d5b3a4..3d59297e 100644 --- a/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients.Audit/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml b/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml index 93ecbabf..3aeb1fe2 100644 --- a/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients.Entity/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml b/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml index 29ac3562..e3a91aa2 100644 --- a/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients.RootLogIn/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.ApiClients/.github/workflows/build-and-deploy.yml b/Api.ApiClients/.github/workflows/build-and-deploy.yml index b9844e7b..9ba21814 100644 --- a/Api.ApiClients/.github/workflows/build-and-deploy.yml +++ b/Api.ApiClients/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml b/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml index 793da7fb..15b8896d 100644 --- a/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml +++ b/Api.Auth.External.Custom/.github/workflows/build-and-deploy.yml @@ -102,6 +102,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -117,11 +118,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/auth-jwt-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-jwt-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-jwt-secret.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml b/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml index 52296fa4..8283c158 100644 --- a/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml +++ b/Api.Auth.RootLogin/.github/workflows/build-and-deploy.yml @@ -102,6 +102,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -117,11 +118,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/auth-jwt-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-jwt-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-jwt-secret.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.Authorization/.github/workflows/build-and-deploy.yml b/Api.Authorization/.github/workflows/build-and-deploy.yml index 1d494a3b..3be9faad 100644 --- a/Api.Authorization/.github/workflows/build-and-deploy.yml +++ b/Api.Authorization/.github/workflows/build-and-deploy.yml @@ -102,6 +102,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -117,11 +118,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/auth-jwt-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-jwt-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-jwt-secret.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml b/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml index e71dc309..d64e353f 100644 --- a/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml +++ b/Api.ContentNegotiation/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.Cookies/.github/workflows/build-and-deploy.yml b/Api.Cookies/.github/workflows/build-and-deploy.yml index 74e573b1..0e78026c 100644 --- a/Api.Cookies/.github/workflows/build-and-deploy.yml +++ b/Api.Cookies/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml b/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml index 8c55f060..56f5faa3 100644 --- a/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml +++ b/Api.CustomConfigSection/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml b/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml index 1540abd7..ee9281bc 100644 --- a/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml +++ b/Api.CustomMiddleware/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.CustomService/.github/workflows/build-and-deploy.yml b/Api.CustomService/.github/workflows/build-and-deploy.yml index 6f5807eb..8f88f093 100644 --- a/Api.CustomService/.github/workflows/build-and-deploy.yml +++ b/Api.CustomService/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.Data.Audit/.github/workflows/build-and-deploy.yml b/Api.Data.Audit/.github/workflows/build-and-deploy.yml index 614a9e88..d5c6262c 100644 --- a/Api.Data.Audit/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Audit/.github/workflows/build-and-deploy.yml @@ -106,6 +106,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -121,6 +122,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -172,7 +175,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml b/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml index 51ca0b1a..7ebe9759 100644 --- a/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml +++ b/Api.Data.EntityEvents/.github/workflows/build-and-deploy.yml @@ -106,6 +106,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -121,6 +122,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -172,7 +175,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml index 22c43e8b..66e9d4cd 100644 --- a/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.ApiKey/.github/workflows/build-and-deploy.yml @@ -109,6 +109,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -124,6 +125,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -175,7 +178,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml index 2bfae90b..31fc303f 100644 --- a/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.External.Custom/.github/workflows/build-and-deploy.yml @@ -108,6 +108,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -123,6 +124,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -174,7 +177,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml b/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml index bb931d58..0975693f 100644 --- a/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity.Auth.Jwt/.github/workflows/build-and-deploy.yml @@ -108,6 +108,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -123,6 +124,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -174,7 +177,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Identity/.github/workflows/build-and-deploy.yml b/Api.Data.Identity/.github/workflows/build-and-deploy.yml index e9a3639b..2ab2015a 100644 --- a/Api.Data.Identity/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Identity/.github/workflows/build-and-deploy.yml @@ -106,6 +106,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -121,6 +122,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -172,7 +175,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.InMemory/.github/workflows/build-and-deploy.yml b/Api.Data.InMemory/.github/workflows/build-and-deploy.yml index 0c9200af..4b960581 100644 --- a/Api.Data.InMemory/.github/workflows/build-and-deploy.yml +++ b/Api.Data.InMemory/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml b/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml index 5ffe3a74..93b4c88f 100644 --- a/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml +++ b/Api.Data.LazyLoading/.github/workflows/build-and-deploy.yml @@ -106,6 +106,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -121,6 +122,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -172,7 +175,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml index 162a5287..32d175e6 100644 --- a/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Collation/.github/workflows/build-and-deploy.yml @@ -103,6 +103,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -118,6 +119,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -169,7 +172,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml index de3e347b..eb341f86 100644 --- a/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Mappings/.github/workflows/build-and-deploy.yml @@ -106,6 +106,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -121,6 +122,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -172,7 +175,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml index 69c2ee9d..5dc3a3d4 100644 --- a/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Spatial/.github/workflows/build-and-deploy.yml @@ -106,6 +106,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -121,6 +122,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -172,7 +175,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml index 4f95b4ce..32bb90c6 100644 --- a/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.StoredProcedures/.github/workflows/build-and-deploy.yml @@ -106,6 +106,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -121,6 +122,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -172,7 +175,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml b/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml index 0d8cbf51..7668a2b9 100644 --- a/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql.Views/.github/workflows/build-and-deploy.yml @@ -106,6 +106,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -121,6 +122,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -172,7 +175,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.MySql/.github/workflows/build-and-deploy.yml b/Api.Data.MySql/.github/workflows/build-and-deploy.yml index 2331ed36..9cd43178 100644 --- a/Api.Data.MySql/.github/workflows/build-and-deploy.yml +++ b/Api.Data.MySql/.github/workflows/build-and-deploy.yml @@ -106,6 +106,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -121,6 +122,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -172,7 +175,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml index ceba69c4..8337fcc2 100644 --- a/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.PostgreSQL.Spatial/.github/workflows/build-and-deploy.yml @@ -106,6 +106,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -121,6 +122,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -179,7 +182,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Host=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Username=$env:SQL_USER;Password=$env:SQL_PASSWORD;SSL Mode=Prefer;Trust Server Certificate=true"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml b/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml index c7bac2c8..eb6ac0b4 100644 --- a/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml +++ b/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml @@ -106,6 +106,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -121,6 +122,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -179,7 +182,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Host=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Username=$env:SQL_USER;Password=$env:SQL_PASSWORD;SSL Mode=Prefer;Trust Server Certificate=true"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml b/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml index 7bce87b3..531a6e7f 100644 --- a/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Repository.AutoSave/.github/workflows/build-and-deploy.yml @@ -106,6 +106,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -121,6 +122,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -172,7 +175,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml b/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml index 77f491cf..0ce35b2f 100644 --- a/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Repository.Includes/.github/workflows/build-and-deploy.yml @@ -106,6 +106,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -121,6 +122,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -172,7 +175,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml b/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml index aef2c81c..8de44e0c 100644 --- a/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SoftDelete/.github/workflows/build-and-deploy.yml @@ -106,6 +106,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -121,6 +122,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -172,7 +175,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.SqLite/.github/workflows/build-and-deploy.yml b/Api.Data.SqLite/.github/workflows/build-and-deploy.yml index 98d37063..7b111f0e 100644 --- a/Api.Data.SqLite/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SqLite/.github/workflows/build-and-deploy.yml @@ -101,6 +101,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -116,10 +117,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; Get-Content .kubernetes/data-storageclass.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/data-storageclass.tmp.yaml; kubectl apply -f .kubernetes/data-storageclass.tmp.yaml; diff --git a/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml b/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml index 26779c74..8922d769 100644 --- a/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SqlServer.Spatial/.github/workflows/build-and-deploy.yml @@ -106,6 +106,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -121,6 +122,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -189,7 +192,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST,$env:SQL_PORT;Database=$env:SQL_NAME;User Id=$env:SQL_USER;Password=$env:SQL_PASSWORD;Encrypt=True;TrustServerCertificate=True;"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml b/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml index 14ee6315..20874458 100644 --- a/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SqlServer/.github/workflows/build-and-deploy.yml @@ -106,6 +106,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -121,6 +122,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -189,7 +192,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST,$env:SQL_PORT;Database=$env:SQL_NAME;User Id=$env:SQL_USER;Password=$env:SQL_PASSWORD;Encrypt=True;TrustServerCertificate=True;"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.Triggers/.github/workflows/build-and-deploy.yml b/Api.Data.Triggers/.github/workflows/build-and-deploy.yml index 6b1c5ee0..ba28c013 100644 --- a/Api.Data.Triggers/.github/workflows/build-and-deploy.yml +++ b/Api.Data.Triggers/.github/workflows/build-and-deploy.yml @@ -106,6 +106,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -121,6 +122,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -172,7 +175,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml b/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml index 1da5456a..10b03dd2 100644 --- a/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml +++ b/Api.Documentation.Csp/.github/workflows/build-and-deploy.yml @@ -102,6 +102,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -117,10 +118,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:GATEWAY_NAME = kubectl get gateway -n apps -o jsonpath='{.items[0].metadata.name}' $zoneNames = az network dns zone list -g $env:AZURE_GROUP_DNS --query [].name; diff --git a/Api.Documentation/.github/workflows/build-and-deploy.yml b/Api.Documentation/.github/workflows/build-and-deploy.yml index b0abcabc..8c9d47f6 100644 --- a/Api.Documentation/.github/workflows/build-and-deploy.yml +++ b/Api.Documentation/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,12 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.ErrorHandling/.github/workflows/build-and-deploy.yml b/Api.ErrorHandling/.github/workflows/build-and-deploy.yml index fe0e5ab6..d5b1a272 100644 --- a/Api.ErrorHandling/.github/workflows/build-and-deploy.yml +++ b/Api.ErrorHandling/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml b/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml index 8f7e5e79..db8f69b2 100644 --- a/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml +++ b/Api.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.HealthChecks/.github/workflows/build-and-deploy.yml b/Api.HealthChecks/.github/workflows/build-and-deploy.yml index b1643120..98e1a893 100644 --- a/Api.HealthChecks/.github/workflows/build-and-deploy.yml +++ b/Api.HealthChecks/.github/workflows/build-and-deploy.yml @@ -102,6 +102,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -117,11 +118,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.Hosting.Http/.github/workflows/build-and-deploy.yml b/Api.Hosting.Http/.github/workflows/build-and-deploy.yml index dfd6d88d..f1f9386e 100644 --- a/Api.Hosting.Http/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.Http/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.Hosting.Https/.github/workflows/build-and-deploy.yml b/Api.Hosting.Https/.github/workflows/build-and-deploy.yml index 919e14e1..d351e702 100644 --- a/Api.Hosting.Https/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.Https/.github/workflows/build-and-deploy.yml @@ -102,6 +102,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -117,11 +118,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $zoneNames = az network dns zone list -g $env:AZURE_GROUP_DNS --query "[].name" -o json | ConvertFrom-Json $env:ROUTE_HOST_NAMES = ( diff --git a/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml b/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml index 8ea33e28..c6283627 100644 --- a/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.MultipartLimits/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.Localization/.github/workflows/build-and-deploy.yml b/Api.Localization/.github/workflows/build-and-deploy.yml index 218e617e..4190f5e9 100644 --- a/Api.Localization/.github/workflows/build-and-deploy.yml +++ b/Api.Localization/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml b/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml index 939b2b58..01451c84 100644 --- a/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.Log4Net/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml b/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml index e44d9aad..239840d2 100644 --- a/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.Microsoft/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.Logging.NLog/.github/workflows/build-and-deploy.yml b/Api.Logging.NLog/.github/workflows/build-and-deploy.yml index ad3d1420..887a4cdc 100644 --- a/Api.Logging.NLog/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.NLog/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml b/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml index c57a6e82..bb2d2eb3 100644 --- a/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml +++ b/Api.Logging.Serilog/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.MultipartJson/.github/workflows/build-and-deploy.yml b/Api.MultipartJson/.github/workflows/build-and-deploy.yml index bb62fb8c..30954793 100644 --- a/Api.MultipartJson/.github/workflows/build-and-deploy.yml +++ b/Api.MultipartJson/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml index ddf1f1d5..ec23157c 100644 --- a/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml @@ -102,6 +102,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -117,11 +118,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $zoneNames = az network dns zone list -g $env:AZURE_GROUP_DNS --query "[].name" -o json | ConvertFrom-Json $env:ROUTE_HOST_NAMES = ( diff --git a/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml index b1682962..b60f0d24 100644 --- a/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ContentTypeOptions/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml index b70e864d..8480d5f8 100644 --- a/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml index 61f6060a..6c3e09af 100644 --- a/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ForwardedHeaders/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml index 1a469363..d7656d46 100644 --- a/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.FrameOptions/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml index e1870cb5..75ca836e 100644 --- a/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml @@ -102,6 +102,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -117,11 +118,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - $zoneNames = az network dns zone list -g $env:AZURE_GROUP_DNS --query "[].name" -o json | ConvertFrom-Json $env:ROUTE_HOST_NAMES = ( diff --git a/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml index 64c1aed0..2889f518 100644 --- a/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ReferrerPolicy/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml index 43d0ca3e..b24e091d 100644 --- a/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Robots/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml index 065a6d15..af7750de 100644 --- a/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.XssProtection/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.RequestTracing/.github/workflows/build-and-deploy.yml b/Api.RequestTracing/.github/workflows/build-and-deploy.yml index 9bd0ecdc..ef29ed2f 100644 --- a/Api.RequestTracing/.github/workflows/build-and-deploy.yml +++ b/Api.RequestTracing/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.ResponseCache/.github/workflows/build-and-deploy.yml b/Api.ResponseCache/.github/workflows/build-and-deploy.yml index 605d1746..7b0df2ac 100644 --- a/Api.ResponseCache/.github/workflows/build-and-deploy.yml +++ b/Api.ResponseCache/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.ResponseCompression/.github/workflows/build-and-deploy.yml b/Api.ResponseCompression/.github/workflows/build-and-deploy.yml index fcf33314..b4538268 100644 --- a/Api.ResponseCompression/.github/workflows/build-and-deploy.yml +++ b/Api.ResponseCompression/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.Session/.github/workflows/build-and-deploy.yml b/Api.Session/.github/workflows/build-and-deploy.yml index 0739e1dc..3102c3e1 100644 --- a/Api.Session/.github/workflows/build-and-deploy.yml +++ b/Api.Session/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.StartupTasks/.github/workflows/build-and-deploy.yml b/Api.StartupTasks/.github/workflows/build-and-deploy.yml index 61448115..138cb1ab 100644 --- a/Api.StartupTasks/.github/workflows/build-and-deploy.yml +++ b/Api.StartupTasks/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.StaticFiles/.github/workflows/build-and-deploy.yml b/Api.StaticFiles/.github/workflows/build-and-deploy.yml index 52620627..1895d321 100644 --- a/Api.StaticFiles/.github/workflows/build-and-deploy.yml +++ b/Api.StaticFiles/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml index 4d35cc1c..bae472fd 100644 --- a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -101,6 +101,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -116,6 +117,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Create Fileshare shell: pwsh run: | @@ -216,7 +219,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:IDENTITY_CLIENT_ID = az identity show -g $env:AZURE_GROUP_KUBERNETES -n $env:IDENTITY_NAME --query clientId -o tsv; Get-Content .kubernetes/service-account.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service-account.tmp.yaml; diff --git a/Api.Storage.Local/.github/workflows/build-and-deploy.yml b/Api.Storage.Local/.github/workflows/build-and-deploy.yml index 316d6a1b..13b0c3d9 100644 --- a/Api.Storage.Local/.github/workflows/build-and-deploy.yml +++ b/Api.Storage.Local/.github/workflows/build-and-deploy.yml @@ -101,6 +101,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -116,11 +117,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/storage-storageclass.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/storage-storageclass.tmp.yaml; kubectl apply -f .kubernetes/storage-storageclass.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.TimeZone/.github/workflows/build-and-deploy.yml b/Api.TimeZone/.github/workflows/build-and-deploy.yml index 2a65df79..b1a29486 100644 --- a/Api.TimeZone/.github/workflows/build-and-deploy.yml +++ b/Api.TimeZone/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.Versioning/.github/workflows/build-and-deploy.yml b/Api.Versioning/.github/workflows/build-and-deploy.yml index 1d1a8036..15a4e398 100644 --- a/Api.Versioning/.github/workflows/build-and-deploy.yml +++ b/Api.Versioning/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.VirusScan/.github/workflows/build-and-deploy.yml b/Api.VirusScan/.github/workflows/build-and-deploy.yml index e9a2f9b7..f7338576 100644 --- a/Api.VirusScan/.github/workflows/build-and-deploy.yml +++ b/Api.VirusScan/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api._Blank/.github/workflows/build-and-deploy.yml b/Api._Blank/.github/workflows/build-and-deploy.yml index 7ccd8c9d..2ee847e3 100644 --- a/Api._Blank/.github/workflows/build-and-deploy.yml +++ b/Api._Blank/.github/workflows/build-and-deploy.yml @@ -99,6 +99,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -114,11 +115,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml b/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml index fc99ef68..8ca85f69 100644 --- a/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml +++ b/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml @@ -84,6 +84,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -99,11 +100,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Console.CustomService/.github/workflows/build-and-deploy.yml b/Console.CustomService/.github/workflows/build-and-deploy.yml index 765f3cbc..92220184 100644 --- a/Console.CustomService/.github/workflows/build-and-deploy.yml +++ b/Console.CustomService/.github/workflows/build-and-deploy.yml @@ -84,6 +84,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -99,11 +100,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Console.Data.InMemory/.github/workflows/build-and-deploy.yml b/Console.Data.InMemory/.github/workflows/build-and-deploy.yml index bc26e347..b0f0fcbf 100644 --- a/Console.Data.InMemory/.github/workflows/build-and-deploy.yml +++ b/Console.Data.InMemory/.github/workflows/build-and-deploy.yml @@ -85,6 +85,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -100,11 +101,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Console.Data.MySql/.github/workflows/build-and-deploy.yml b/Console.Data.MySql/.github/workflows/build-and-deploy.yml index 804d8f73..33556fb6 100644 --- a/Console.Data.MySql/.github/workflows/build-and-deploy.yml +++ b/Console.Data.MySql/.github/workflows/build-and-deploy.yml @@ -90,6 +90,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -105,6 +106,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -156,7 +159,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/sql-auth-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/sql-auth-secret.tmp.yaml; diff --git a/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml b/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml index 41c280a3..9f9e0b82 100644 --- a/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml +++ b/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml @@ -90,6 +90,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -105,6 +106,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -160,7 +163,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Console.Data.SqLite/.github/workflows/build-and-deploy.yml b/Console.Data.SqLite/.github/workflows/build-and-deploy.yml index b35fcbd9..fdfaa1dc 100644 --- a/Console.Data.SqLite/.github/workflows/build-and-deploy.yml +++ b/Console.Data.SqLite/.github/workflows/build-and-deploy.yml @@ -87,6 +87,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -102,11 +103,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/data-storageclass.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/data-storageclass.tmp.yaml; kubectl apply -f .kubernetes/data-storageclass.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml b/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml index 43912b38..82ea8afd 100644 --- a/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml +++ b/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml @@ -90,6 +90,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -105,6 +106,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Database Migration & User shell: pwsh run: | @@ -170,7 +173,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST,$env:SQL_PORT;Database=$env:SQL_NAME;User Id=$env:SQL_USER;Password=$env:SQL_PASSWORD;Encrypt=True;TrustServerCertificate=True;"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml b/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml index d8d8edfe..a8dc1f9e 100644 --- a/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml +++ b/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml @@ -84,6 +84,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -99,11 +100,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml b/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml index 8a8ebb1f..6e5b6fa0 100644 --- a/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml +++ b/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml @@ -84,6 +84,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -99,11 +100,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Console.Localization/.github/workflows/build-and-deploy.yml b/Console.Localization/.github/workflows/build-and-deploy.yml index e2ed19bf..d315289b 100644 --- a/Console.Localization/.github/workflows/build-and-deploy.yml +++ b/Console.Localization/.github/workflows/build-and-deploy.yml @@ -84,6 +84,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -99,11 +100,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml b/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml index 3639a334..bdd29a18 100644 --- a/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml @@ -84,6 +84,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -99,11 +100,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml b/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml index 06017e2a..9dcb2d05 100644 --- a/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml @@ -84,6 +84,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -99,11 +100,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Console.Logging.NLog/.github/workflows/build-and-deploy.yml b/Console.Logging.NLog/.github/workflows/build-and-deploy.yml index d0341238..bcca3f8c 100644 --- a/Console.Logging.NLog/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.NLog/.github/workflows/build-and-deploy.yml @@ -84,6 +84,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -99,11 +100,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml b/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml index cbdf8894..009dd0ab 100644 --- a/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml @@ -84,6 +84,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -99,11 +100,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Console.StartupTasks/.github/workflows/build-and-deploy.yml b/Console.StartupTasks/.github/workflows/build-and-deploy.yml index 6ab67b7f..ce7e53eb 100644 --- a/Console.StartupTasks/.github/workflows/build-and-deploy.yml +++ b/Console.StartupTasks/.github/workflows/build-and-deploy.yml @@ -84,6 +84,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -99,11 +100,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml index c2188061..d6bab59d 100644 --- a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -88,6 +88,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -103,6 +104,8 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Create Fileshare shell: pwsh run: | @@ -203,7 +206,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; $env:IDENTITY_CLIENT_ID = az identity show -g $env:AZURE_GROUP_KUBERNETES -n $env:IDENTITY_NAME --query clientId -o tsv; Get-Content .kubernetes/service-account.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service-account.tmp.yaml; diff --git a/Console.Storage.Local/.github/workflows/build-and-deploy.yml b/Console.Storage.Local/.github/workflows/build-and-deploy.yml index 457296e8..7fff9187 100644 --- a/Console.Storage.Local/.github/workflows/build-and-deploy.yml +++ b/Console.Storage.Local/.github/workflows/build-and-deploy.yml @@ -86,6 +86,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -101,11 +102,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/storage-storageclass.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/storage-storageclass.tmp.yaml; kubectl apply -f .kubernetes/storage-storageclass.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Console.Workers/.github/workflows/build-and-deploy.yml b/Console.Workers/.github/workflows/build-and-deploy.yml index 9e41cfdf..4c17e0df 100644 --- a/Console.Workers/.github/workflows/build-and-deploy.yml +++ b/Console.Workers/.github/workflows/build-and-deploy.yml @@ -84,6 +84,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -99,11 +100,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Console._Blank/.github/workflows/build-and-deploy.yml b/Console._Blank/.github/workflows/build-and-deploy.yml index 573c6713..0af75729 100644 --- a/Console._Blank/.github/workflows/build-and-deploy.yml +++ b/Console._Blank/.github/workflows/build-and-deploy.yml @@ -84,6 +84,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -99,11 +100,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Web._Blank/.github/workflows/build-and-deploy.yml b/Web._Blank/.github/workflows/build-and-deploy.yml index 8e5343d7..a9caa035 100644 --- a/Web._Blank/.github/workflows/build-and-deploy.yml +++ b/Web._Blank/.github/workflows/build-and-deploy.yml @@ -100,6 +100,7 @@ jobs: az acr build ` --registry $env:CONTAINER_REGISTRY_HOST ` + --agent-pool buildpool ` -t "$($env:IMAGE_NAME):latest" ` -t "$($env:IMAGE_NAME):$($env:VERSION)" ` --build-arg DOTNET_SDK_VERSION=$env:DOTNET_SDK_VERSION ` @@ -115,11 +116,11 @@ jobs: throw "error"; }; + echo "CONTAINER_REGISTRY_HOST=$env:CONTAINER_REGISTRY_HOST" >> $env:GITHUB_ENV; + - name: Kubernetes Deploy shell: pwsh run: | - $env:CONTAINER_REGISTRY_HOST = az acr list -g $env:AZURE_GROUP_DELIVERY --query [0].loginServer -o tsv; - Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) From 9cca6edeca2e2e579429624d13464f4f0d8e781c Mon Sep 17 00:00:00 2001 From: vivet Date: Sun, 12 Jul 2026 11:34:11 +0200 Subject: [PATCH 22/33] Updated --- Api.Storage.Azure/.kubernetes/storage-pv.yaml | 10 +++++++++- Console.Storage.Azure/.kubernetes/storage-pv.yaml | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Api.Storage.Azure/.kubernetes/storage-pv.yaml b/Api.Storage.Azure/.kubernetes/storage-pv.yaml index 330c5e84..f9c4f3d3 100644 --- a/Api.Storage.Azure/.kubernetes/storage-pv.yaml +++ b/Api.Storage.Azure/.kubernetes/storage-pv.yaml @@ -9,6 +9,14 @@ spec: - ReadWriteMany persistentVolumeReclaimPolicy: Retain storageClassName: azurefile-static + mountOptions: + - dir_mode=0777 + - file_mode=0777 + - uid=0 + - gid=0 + claimRef: + name: %SERVICE_NAME%-azurefile-pvc + namespace: %KUBERNETES_NAMESPACE% csi: driver: file.csi.azure.com volumeHandle: %AZURE_GROUP_STORAGE%#%STORAGE_ACCOUNT_NAME%#%STORAGE_SHARE_NAME% @@ -17,4 +25,4 @@ spec: storageAccount: %STORAGE_ACCOUNT_NAME% resourceGroup: %AZURE_GROUP_STORAGE% clientID: %IDENTITY_CLIENT_ID% - mountWithWorkloadIdentityToken: "true" + mountWithWorkloadIdentityToken: "true" \ No newline at end of file diff --git a/Console.Storage.Azure/.kubernetes/storage-pv.yaml b/Console.Storage.Azure/.kubernetes/storage-pv.yaml index 330c5e84..f9c4f3d3 100644 --- a/Console.Storage.Azure/.kubernetes/storage-pv.yaml +++ b/Console.Storage.Azure/.kubernetes/storage-pv.yaml @@ -9,6 +9,14 @@ spec: - ReadWriteMany persistentVolumeReclaimPolicy: Retain storageClassName: azurefile-static + mountOptions: + - dir_mode=0777 + - file_mode=0777 + - uid=0 + - gid=0 + claimRef: + name: %SERVICE_NAME%-azurefile-pvc + namespace: %KUBERNETES_NAMESPACE% csi: driver: file.csi.azure.com volumeHandle: %AZURE_GROUP_STORAGE%#%STORAGE_ACCOUNT_NAME%#%STORAGE_SHARE_NAME% @@ -17,4 +25,4 @@ spec: storageAccount: %STORAGE_ACCOUNT_NAME% resourceGroup: %AZURE_GROUP_STORAGE% clientID: %IDENTITY_CLIENT_ID% - mountWithWorkloadIdentityToken: "true" + mountWithWorkloadIdentityToken: "true" \ No newline at end of file From e2d0fda4628c5acdf33a7f68468dd5253a659e5b Mon Sep 17 00:00:00 2001 From: vivet Date: Sun, 12 Jul 2026 13:09:37 +0200 Subject: [PATCH 23/33] Updated --- .../.github/workflows/build-and-deploy.yml | 88 +++++++++---------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/Api.HealthChecks/.github/workflows/build-and-deploy.yml b/Api.HealthChecks/.github/workflows/build-and-deploy.yml index 98e1a893..3f765419 100644 --- a/Api.HealthChecks/.github/workflows/build-and-deploy.yml +++ b/Api.HealthChecks/.github/workflows/build-and-deploy.yml @@ -16,6 +16,7 @@ env: DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_LOGS: ${{ vars.AZURE_RESOURCE_GROUP_LOGS }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} @@ -154,65 +155,64 @@ jobs: - name: Add Availability Check shell: pwsh run: | - az extension add -n application-insights; - - $env:SERVICE_NAME_INSIGTHS = $env:SERVICE_NAME + "-insights"; - $env:APPLICATION_INSIGHT_ID = az monitor app-insights component show --query "[?contains(name, '$env:SERVICE_NAME_INSIGTHS')].[id]" -o tsv; - - if ([string]::IsNullOrEmpty($env:APPLICATION_INSIGHT_ID)) + $env:WORKSPACE_ID = az monitor log-analytics workspace list -g $env:AZURE_GROUP_LOGS --query [0].id -o tsv; + + if (-not [string]::IsNullOrEmpty($env:WORKSPACE_ID)) { - $env:WORKSPACE_ID = az monitor log-analytics workspace list --query "[?contains(name, 'log-analytics')].[id]" -o tsv; + $env:SERVICE_NAME_INSIGTHS = $env:SERVICE_NAME + "-insights"; + $env:APPLICATION_INSIGHT_ID = az monitor app-insights component show -g $env:AZURE_GROUP_LOGS -a $env:SERVICE_NAME_INSIGTHS --query id -o tsv 2>$null; - if (-not [string]::IsNullOrEmpty($env:WORKSPACE_ID)) + if ($LastExitCode -ne 0) { $env:APPLICATION_INSIGHT_ID = az monitor app-insights component create ` -a $env:SERVICE_NAME_INSIGTHS ` -l $env:AZURE_LOCATION ` - -g $env:AZURE_GROUP ` + -g $env:AZURE_GROUP_LOGS ` --workspace $env:WORKSPACE_ID ` - --query "[id]" -o tsv; + --query id -o tsv; if ($LastExitCode -ne 0) { throw "error"; }; - } - }; + }; - $env:SERVICE_NAME_AVAILABILITY = $env:SERVICE_NAME + '-availability-' + $env:ASPNETCORE_ENVIRONMENT.ToLower(); - $env:AVAILABILITY_ID = az monitor app-insights web-test list -g $env:AZURE_GROUP --query "[?contains(name, '$env:SERVICE_NAME_AVAILABILITY')].[id]" -o tsv; + $env:SERVICE_NAME_AVAILABILITY = $env:SERVICE_NAME + '-availability-' + $env:ASPNETCORE_ENVIRONMENT.ToLower(); + $env:AVAILABILITY_ID = az monitor app-insights web-test show -g $env:AZURE_GROUP_LOGS -n $env:SERVICE_NAME_AVAILABILITY --query id -o tsv 2>$null; - if ([string]::IsNullOrEmpty($env:AVAILABILITY_ID)) - { - $env:APPLICATION_INSIGHT_HIDDEN_LINK = 'hidden-link:' + $env:APPLICATION_INSIGHT_ID + '=Resource'; - az monitor app-insights web-test create ` - -n $env:SERVICE_NAME_AVAILABILITY ` - --defined-web-test-name $env:SERVICE_NAME_AVAILABILITY ` - -g $env:AZURE_GROUP ` - -l $env:AZURE_LOCATION ` - --kind multistep ` - --web-test-kind standard ` - --frequency $env:AVAILABILITY_CHECK_FREQUENCY ` - --enabled true ` - --retry-enabled true ` - --ssl-check true ` - --ssl-lifetime-check 30 ` - --http-verb GET ` - --request-url $env:AVAILABILITY_URI ` - --expected-status-code 200 ` - --content-validation content-match='\"status\":\"unhealthy\"' ignore-case=true pass-if-text-found=false ` - --tags $env:APPLICATION_INSIGHT_HIDDEN_LINK ` - --locations Id='us-ca-sjc-azr' ` - --locations Id='us-va-ash-azr' ` - --locations Id='emea-gb-db3-azr' ` - --locations Id='emea-nl-ams-azr' ` - --locations Id='apac-hk-hkn-azr'; - }; + if ($LastExitCode -ne 0) + { + $env:APPLICATION_INSIGHT_HIDDEN_LINK = 'hidden-link:' + $env:APPLICATION_INSIGHT_ID + '=Resource'; + $env:AZURE_LOCATION = az monitor log-analytics workspace list -g $env:AZURE_GROUP_LOGS --query [0].location -o tsv; - if ($LastExitCode -ne 0) - { - throw "error"; - }; + az monitor app-insights web-test create ` + -n $env:SERVICE_NAME_AVAILABILITY ` + --defined-web-test-name $env:SERVICE_NAME_AVAILABILITY ` + -g $env:AZURE_GROUP_LOGS ` + -l $env:AZURE_LOCATION ` + --web-test-kind standard ` + --frequency $env:AVAILABILITY_CHECK_FREQUENCY ` + --enabled true ` + --retry-enabled true ` + --ssl-check true ` + --ssl-lifetime-check 30 ` + --http-verb GET ` + --request-url $env:AVAILABILITY_URI ` + --expected-status-code 200 ` + --content-validation content-match='"status":"unhealthy"' ignore-case=true pass-if-text-found=false ` + --tags $env:APPLICATION_INSIGHT_HIDDEN_LINK ` + --locations Id='us-ca-sjc-azr' ` + --locations Id='us-va-ash-azr' ` + --locations Id='emea-gb-db3-azr' ` + --locations Id='emea-nl-ams-azr' ` + --locations Id='apac-hk-hkn-azr'; + }; + + if ($LastExitCode -ne 0) + { + throw "error"; + }; + } - name: GitHub Release if: github.ref == 'refs/heads/main' From 79208f740167dac8ecda4e3bff5a493d2bcb2b57 Mon Sep 17 00:00:00 2001 From: vivet Date: Sun, 12 Jul 2026 15:43:31 +0200 Subject: [PATCH 24/33] Updated --- .../.github/workflows/build-and-deploy.yml | 74 ++++++++++--------- .../.github/workflows/build-and-deploy.yml | 16 ++-- .../.github/workflows/build-and-deploy.yml | 16 ++-- .../.github/workflows/build-and-deploy.yml | 16 ++-- 4 files changed, 65 insertions(+), 57 deletions(-) diff --git a/Api.HealthChecks/.github/workflows/build-and-deploy.yml b/Api.HealthChecks/.github/workflows/build-and-deploy.yml index 3f765419..54cf46ad 100644 --- a/Api.HealthChecks/.github/workflows/build-and-deploy.yml +++ b/Api.HealthChecks/.github/workflows/build-and-deploy.yml @@ -16,6 +16,7 @@ env: DOTNET_ASPNET_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} + AZURE_GROUP_DNS: ${{ vars.AZURE_RESOURCE_GROUP_DNS }} AZURE_GROUP_LOGS: ${{ vars.AZURE_RESOURCE_GROUP_LOGS }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -156,6 +157,7 @@ jobs: shell: pwsh run: | $env:WORKSPACE_ID = az monitor log-analytics workspace list -g $env:AZURE_GROUP_LOGS --query [0].id -o tsv; + $env:AZURE_LOCATION = az monitor log-analytics workspace list -g $env:AZURE_GROUP_LOGS --query [0].location -o tsv; if (-not [string]::IsNullOrEmpty($env:WORKSPACE_ID)) { @@ -174,44 +176,50 @@ jobs: if ($LastExitCode -ne 0) { throw "error"; - }; - }; + } + } - $env:SERVICE_NAME_AVAILABILITY = $env:SERVICE_NAME + '-availability-' + $env:ASPNETCORE_ENVIRONMENT.ToLower(); - $env:AVAILABILITY_ID = az monitor app-insights web-test show -g $env:AZURE_GROUP_LOGS -n $env:SERVICE_NAME_AVAILABILITY --query id -o tsv 2>$null; + $zoneNames = az network dns zone list -g $env:AZURE_GROUP_DNS --query "[].name" -o json | ConvertFrom-Json - if ($LastExitCode -ne 0) + foreach ($zoneName in $zoneNames) { - $env:APPLICATION_INSIGHT_HIDDEN_LINK = 'hidden-link:' + $env:APPLICATION_INSIGHT_ID + '=Resource'; - $env:AZURE_LOCATION = az monitor log-analytics workspace list -g $env:AZURE_GROUP_LOGS --query [0].location -o tsv; + $env:HIDDEN_LINK = 'hidden-link:' + $env:APPLICATION_INSIGHT_ID + '=Resource'; + $env:WEB_TEST_NAME = $env:SERVICE_NAME + '-availability-' + $env:ASPNETCORE_ENVIRONMENT.ToLower() + '-' + ($zoneName.TrimEnd('.') -replace '\.', '-') - az monitor app-insights web-test create ` - -n $env:SERVICE_NAME_AVAILABILITY ` - --defined-web-test-name $env:SERVICE_NAME_AVAILABILITY ` - -g $env:AZURE_GROUP_LOGS ` - -l $env:AZURE_LOCATION ` - --web-test-kind standard ` - --frequency $env:AVAILABILITY_CHECK_FREQUENCY ` - --enabled true ` - --retry-enabled true ` - --ssl-check true ` - --ssl-lifetime-check 30 ` - --http-verb GET ` - --request-url $env:AVAILABILITY_URI ` - --expected-status-code 200 ` - --content-validation content-match='"status":"unhealthy"' ignore-case=true pass-if-text-found=false ` - --tags $env:APPLICATION_INSIGHT_HIDDEN_LINK ` - --locations Id='us-ca-sjc-azr' ` - --locations Id='us-va-ash-azr' ` - --locations Id='emea-gb-db3-azr' ` - --locations Id='emea-nl-ams-azr' ` - --locations Id='apac-hk-hkn-azr'; - }; + echo $env:AZURE_LOCATION; - if ($LastExitCode -ne 0) - { - throw "error"; - }; + az monitor app-insights web-test show -g $env:AZURE_GROUP_LOGS -n $env:WEB_TEST_NAME --query id -o tsv 2>$null + + if ($LastExitCode -ne 0) + { + az monitor app-insights web-test create ` + -n $env:WEB_TEST_NAME ` + --defined-web-test-name $env:WEB_TEST_NAME ` + -g $env:AZURE_GROUP_LOGS ` + -l $env:AZURE_LOCATION ` + --web-test-kind standard ` + --frequency 300 ` + --enabled true ` + --retry-enabled true ` + --ssl-check true ` + --ssl-lifetime-check 30 ` + --http-verb GET ` + --request-url https://$env:SUB_DOMAIN_NAME.$zoneName/healthz ` + --expected-status-code 200 ` + --content-validation content-match='"status":"unhealthy"' ignore-case=true pass-if-text-found=false ` + --tags $env:HIDDEN_LINK ` + --locations Id='us-ca-sjc-azr' ` + --locations Id='us-va-ash-azr' ` + --locations Id='emea-gb-db3-azr' ` + --locations Id='emea-nl-ams-azr' ` + --locations Id='apac-hk-hkn-azr'; + + if ($LastExitCode -ne 0) + { + throw "error"; + } + } + } } - name: GitHub Release diff --git a/Api.Hosting.Https/.github/workflows/build-and-deploy.yml b/Api.Hosting.Https/.github/workflows/build-and-deploy.yml index d351e702..d0b4ac6a 100644 --- a/Api.Hosting.Https/.github/workflows/build-and-deploy.yml +++ b/Api.Hosting.Https/.github/workflows/build-and-deploy.yml @@ -134,42 +134,42 @@ jobs: $env:GATEWAY_NAME = kubectl get gateway -n $env:KUBERNETES_NAMESPACE -o jsonpath='{.items[0].metadata.name}' Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; - kubectl apply -f service.tmp.yaml; + kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; } Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; - kubectl apply -f configmap.tmp.yaml; + kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; } Get-Content .kubernetes/deployment.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/deployment.tmp.yaml; - kubectl apply -f deployment.tmp.yaml; + kubectl apply -f .kubernetes/deployment.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; } Get-Content .kubernetes/autoscaler.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/autoscaler.tmp.yaml; - kubectl apply -f autoscaler.tmp.yaml; + kubectl apply -f .kubernetes/autoscaler.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; } - Get-Content .kubernetes/grafana-httproute-80.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/grafana-httproute-80.tmp.yaml; - kubectl apply -f .kubernetes/grafana-httproute-80.tmp.yaml; + Get-Content .kubernetes/httproute-80.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/httproute-80.tmp.yaml; + kubectl apply -f .kubernetes/httproute-80.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; } - Get-Content .kubernetes/grafana-httproute-443.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/grafana-httproute-443.tmp.yaml; - kubectl apply -f .kubernetes/grafana-httproute-443.tmp.yaml; + Get-Content .kubernetes/httproute-443.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/httproute-443.tmp.yaml; + kubectl apply -f .kubernetes/httproute-443.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; diff --git a/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml index ec23157c..a854db52 100644 --- a/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.ContentSecurityPolicy/.github/workflows/build-and-deploy.yml @@ -134,42 +134,42 @@ jobs: $env:GATEWAY_NAME = kubectl get gateway -n $env:KUBERNETES_NAMESPACE -o jsonpath='{.items[0].metadata.name}' Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; - kubectl apply -f service.tmp.yaml; + kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; } Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; - kubectl apply -f configmap.tmp.yaml; + kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; } Get-Content .kubernetes/deployment.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/deployment.tmp.yaml; - kubectl apply -f deployment.tmp.yaml; + kubectl apply -f .kubernetes/deployment.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; } Get-Content .kubernetes/autoscaler.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/autoscaler.tmp.yaml; - kubectl apply -f autoscaler.tmp.yaml; + kubectl apply -f .kubernetes/autoscaler.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; } - Get-Content .kubernetes/grafana-httproute-80.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/grafana-httproute-80.tmp.yaml; - kubectl apply -f .kubernetes/grafana-httproute-80.tmp.yaml; + Get-Content .kubernetes/httproute-80.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/httproute-80.tmp.yaml; + kubectl apply -f .kubernetes/httproute-80.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; } - Get-Content .kubernetes/grafana-httproute-443.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/grafana-httproute-443.tmp.yaml; - kubectl apply -f .kubernetes/grafana-httproute-443.tmp.yaml; + Get-Content .kubernetes/httproute-443.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/httproute-443.tmp.yaml; + kubectl apply -f .kubernetes/httproute-443.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; diff --git a/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml index 75ca836e..527d003a 100644 --- a/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Hsts/.github/workflows/build-and-deploy.yml @@ -134,42 +134,42 @@ jobs: $env:GATEWAY_NAME = kubectl get gateway -n $env:KUBERNETES_NAMESPACE -o jsonpath='{.items[0].metadata.name}' Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; - kubectl apply -f service.tmp.yaml; + kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; } Get-Content .kubernetes/configmap.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/configmap.tmp.yaml; - kubectl apply -f configmap.tmp.yaml; + kubectl apply -f .kubernetes/configmap.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; } Get-Content .kubernetes/deployment.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/deployment.tmp.yaml; - kubectl apply -f deployment.tmp.yaml; + kubectl apply -f .kubernetes/deployment.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; } Get-Content .kubernetes/autoscaler.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/autoscaler.tmp.yaml; - kubectl apply -f autoscaler.tmp.yaml; + kubectl apply -f .kubernetes/autoscaler.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; } - Get-Content .kubernetes/grafana-httproute-80.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/grafana-httproute-80.tmp.yaml; - kubectl apply -f .kubernetes/grafana-httproute-80.tmp.yaml; + Get-Content .kubernetes/httproute-80.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/httproute-80.tmp.yaml; + kubectl apply -f .kubernetes/httproute-80.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; } - Get-Content .kubernetes/grafana-httproute-443.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/grafana-httproute-443.tmp.yaml; - kubectl apply -f .kubernetes/grafana-httproute-443.tmp.yaml; + Get-Content .kubernetes/httproute-443.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/httproute-443.tmp.yaml; + kubectl apply -f .kubernetes/httproute-443.tmp.yaml; if ($LastExitCode -ne 0) { throw "error"; From bebbd794feb6f58e0176f66be689ecb6c4610b2c Mon Sep 17 00:00:00 2001 From: vivet Date: Mon, 13 Jul 2026 10:29:26 +0200 Subject: [PATCH 25/33] Updated --- .../.github/workflows/build-and-deploy.yml | 106 +++++++++++------- 1 file changed, 63 insertions(+), 43 deletions(-) diff --git a/Api.HealthChecks/.github/workflows/build-and-deploy.yml b/Api.HealthChecks/.github/workflows/build-and-deploy.yml index 54cf46ad..ae4004c1 100644 --- a/Api.HealthChecks/.github/workflows/build-and-deploy.yml +++ b/Api.HealthChecks/.github/workflows/build-and-deploy.yml @@ -156,68 +156,88 @@ jobs: - name: Add Availability Check shell: pwsh run: | - $env:WORKSPACE_ID = az monitor log-analytics workspace list -g $env:AZURE_GROUP_LOGS --query [0].id -o tsv; $env:AZURE_LOCATION = az monitor log-analytics workspace list -g $env:AZURE_GROUP_LOGS --query [0].location -o tsv; - - if (-not [string]::IsNullOrEmpty($env:WORKSPACE_ID)) + $env:APPLICATION_INSIGHT_ID = az monitor app-insights component show -g $env:AZURE_GROUP_LOGS --query [0].id -o tsv; + $env:HIDDEN_LINK = 'hidden-link:' + $env:APPLICATION_INSIGHT_ID + '=Resource'; + + $zoneNames = az network dns zone list -g $env:AZURE_GROUP_DNS --query "[].name" -o json | ConvertFrom-Json + + foreach ($zoneName in $zoneNames) { - $env:SERVICE_NAME_INSIGTHS = $env:SERVICE_NAME + "-insights"; - $env:APPLICATION_INSIGHT_ID = az monitor app-insights component show -g $env:AZURE_GROUP_LOGS -a $env:SERVICE_NAME_INSIGTHS --query id -o tsv 2>$null; + $env:WEB_TEST_NAME = $env:SERVICE_NAME + '-availability-' + $env:ASPNETCORE_ENVIRONMENT.ToLower() + '-' + $env:SUB_DOMAIN_NAME + '-' + ($zoneName.TrimEnd('.') -replace '\.', '-') + + az monitor app-insights web-test show -g $env:AZURE_GROUP_LOGS -n $env:WEB_TEST_NAME --query id -o tsv 2>$null if ($LastExitCode -ne 0) { - $env:APPLICATION_INSIGHT_ID = az monitor app-insights component create ` - -a $env:SERVICE_NAME_INSIGTHS ` - -l $env:AZURE_LOCATION ` + az monitor app-insights web-test create ` + -n $env:WEB_TEST_NAME ` + --defined-web-test-name $env:WEB_TEST_NAME ` -g $env:AZURE_GROUP_LOGS ` - --workspace $env:WORKSPACE_ID ` - --query id -o tsv; + -l $env:AZURE_LOCATION ` + --kind ping ` + --web-test-kind standard ` + --frequency 300 ` + --enabled true ` + --retry-enabled true ` + --ssl-check true ` + --ssl-lifetime-check 30 ` + --http-verb GET ` + --request-url https://$env:SUB_DOMAIN_NAME.$zoneName/healthz ` + --expected-status-code 200 ` + --content-validation content-match='"status":"unhealthy"' ignore-case=true pass-if-text-found=false ` + --tags $env:HIDDEN_LINK ` + --locations Id='us-ca-sjc-azr' ` + --locations Id='us-va-ash-azr' ` + --locations Id='emea-gb-db3-azr' ` + --locations Id='emea-nl-ams-azr' ` + --locations Id='apac-hk-hkn-azr'; if ($LastExitCode -ne 0) - { + { throw "error"; } } - $zoneNames = az network dns zone list -g $env:AZURE_GROUP_DNS --query "[].name" -o json | ConvertFrom-Json + $env:WEB_TEST_ALERT_NAME = $env:WEB_TEST_NAME + "-alert"; + + az resource show -g $env:AZURE_GROUP_LOGS -n $env:WEB_TEST_ALERT_NAME --query id -o tsv 2>$null; - foreach ($zoneName in $zoneNames) + if ($LastExitCode -ne 0) { - $env:HIDDEN_LINK = 'hidden-link:' + $env:APPLICATION_INSIGHT_ID + '=Resource'; - $env:WEB_TEST_NAME = $env:SERVICE_NAME + '-availability-' + $env:ASPNETCORE_ENVIRONMENT.ToLower() + '-' + ($zoneName.TrimEnd('.') -replace '\.', '-') + $env:WEB_TEST_ID = az monitor app-insights web-test show -g $env:AZURE_GROUP_LOGS -n $env:WEB_TEST_NAME --query id -o tsv; + $env:ACTION_GROUP_ID = az monitor action-group list -g $env:AZURE_GROUP_LOGS --query [0].id -o tsv; - echo $env:AZURE_LOCATION; + $alertRuleProperties = @{ + severity = 1 + enabled = $true + scopes = @($env:WEB_TEST_ID, $env:APPLICATION_INSIGHT_ID) + evaluationFrequency = "PT1M" + windowSize = "PT5M" + criteria = @{ + "odata.type" = "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria" + webTestId = $env:WEB_TEST_ID + componentId = $env:APPLICATION_INSIGHT_ID + failedLocationCount = 2 + } + actions = @( + @{ actionGroupId = $env:ACTION_GROUP_ID } + ) + } - az monitor app-insights web-test show -g $env:AZURE_GROUP_LOGS -n $env:WEB_TEST_NAME --query id -o tsv 2>$null + $json = $alertRuleProperties | ConvertTo-Json -Depth 10 + [System.IO.File]::WriteAllText("$PWD/alert.json", $json, [System.Text.UTF8Encoding]::new($false)) + + az resource create ` + -g $env:AZURE_GROUP_LOGS ` + -n $env:WEB_TEST_ALERT_NAME ` + -l global ` + --resource-type "Microsoft.Insights/metricAlerts" ` + -p '@alert.json'; if ($LastExitCode -ne 0) { - az monitor app-insights web-test create ` - -n $env:WEB_TEST_NAME ` - --defined-web-test-name $env:WEB_TEST_NAME ` - -g $env:AZURE_GROUP_LOGS ` - -l $env:AZURE_LOCATION ` - --web-test-kind standard ` - --frequency 300 ` - --enabled true ` - --retry-enabled true ` - --ssl-check true ` - --ssl-lifetime-check 30 ` - --http-verb GET ` - --request-url https://$env:SUB_DOMAIN_NAME.$zoneName/healthz ` - --expected-status-code 200 ` - --content-validation content-match='"status":"unhealthy"' ignore-case=true pass-if-text-found=false ` - --tags $env:HIDDEN_LINK ` - --locations Id='us-ca-sjc-azr' ` - --locations Id='us-va-ash-azr' ` - --locations Id='emea-gb-db3-azr' ` - --locations Id='emea-nl-ams-azr' ` - --locations Id='apac-hk-hkn-azr'; - - if ($LastExitCode -ne 0) - { - throw "error"; - } + throw "error"; } } } From ef9592261884b16d6fd5ea5b8261abc402b7dc9d Mon Sep 17 00:00:00 2001 From: vivet Date: Mon, 13 Jul 2026 11:59:30 +0200 Subject: [PATCH 26/33] Updated --- .../Api.Hosting.Https/appsettings.Development.json | 2 +- Api.Hosting.Https/Api.Hosting.Https/appsettings.json | 3 ++- .../appsettings.Development.json | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Api.Hosting.Https/Api.Hosting.Https/appsettings.Development.json b/Api.Hosting.Https/Api.Hosting.Https/appsettings.Development.json index 23bfb871..c298b7e5 100644 --- a/Api.Hosting.Https/Api.Hosting.Https/appsettings.Development.json +++ b/Api.Hosting.Https/Api.Hosting.Https/appsettings.Development.json @@ -1,7 +1,7 @@ { "App": { "Hosting": { - "http": { + "Http": { "UseHttpsRedirection": true }, "Https": { diff --git a/Api.Hosting.Https/Api.Hosting.Https/appsettings.json b/Api.Hosting.Https/Api.Hosting.Https/appsettings.json index e8d9ff25..31aeb899 100644 --- a/Api.Hosting.Https/Api.Hosting.Https/appsettings.json +++ b/Api.Hosting.Https/Api.Hosting.Https/appsettings.json @@ -6,7 +6,8 @@ "Http": { "Ports": [ 8080 - ] + ], + "UseHttpsRedirection": false } } } diff --git a/Api.PolicyHeaders.ContentSecurityPolicy/Api.PolicyHeaders.ContentSecurityPolicy/appsettings.Development.json b/Api.PolicyHeaders.ContentSecurityPolicy/Api.PolicyHeaders.ContentSecurityPolicy/appsettings.Development.json index 23bfb871..c298b7e5 100644 --- a/Api.PolicyHeaders.ContentSecurityPolicy/Api.PolicyHeaders.ContentSecurityPolicy/appsettings.Development.json +++ b/Api.PolicyHeaders.ContentSecurityPolicy/Api.PolicyHeaders.ContentSecurityPolicy/appsettings.Development.json @@ -1,7 +1,7 @@ { "App": { "Hosting": { - "http": { + "Http": { "UseHttpsRedirection": true }, "Https": { From 1172f51c9f0a79dbcc6e3d8a51b17277ecf54986 Mon Sep 17 00:00:00 2001 From: vivet Date: Mon, 13 Jul 2026 16:55:37 +0200 Subject: [PATCH 27/33] Updated --- Api.ApiClients.Audit/.docker/docker-compose.yml | 2 +- .../Api.ApiClients.Audit.Service/appsettings.json | 2 +- Api.ApiClients.Entity/.docker/docker-compose.yml | 2 +- .../Api.ApiClients.Entity.Service/appsettings.json | 2 +- Api.ApiClients.RootLogIn/.docker/docker-compose.yml | 2 +- .../Api.ApiClients.RootLogin.Service/appsettings.json | 2 +- Api.ApiClients/.docker/docker-compose.yml | 2 +- Api.ApiClients/Api.ApiClients.Service/appsettings.json | 2 +- Api.ApiClients/README.md | 2 +- Api.Data.Audit/.docker/docker-compose.yml | 5 +---- Api.Data.Audit/Api.Data.Audit/appsettings.Development.json | 2 +- Api.Data.EntityEvents/.docker/docker-compose.yml | 2 +- .../appsettings.Development.json | 2 +- .../Api.Data.EntityEvents/appsettings.Development.json | 2 +- Api.Data.Identity.Auth.ApiKey/.docker/docker-compose.yml | 5 +---- .../appsettings.Development.json | 2 +- .../.docker/docker-compose.yml | 5 +---- .../appsettings.Development.json | 2 +- Api.Data.Identity.Auth.Jwt/.docker/docker-compose.yml | 5 +---- .../Api.Data.Identity.Auth.Jwt/appsettings.Development.json | 2 +- Api.Data.Identity/.docker/docker-compose.yml | 5 +---- .../Api.Data.Identity/appsettings.Development.json | 2 +- Api.Data.LazyLoading/.docker/docker-compose.yml | 5 +---- .../Api.Data.LazyLoading/appsettings.Development.json | 2 +- Api.Data.MySql.Collation/.docker/docker-compose.yml | 5 +---- .../Api.Data.MySql.Collation/appsettings.Development.json | 2 +- Api.Data.MySql.Mappings/.docker/docker-compose.yml | 5 +---- .../Api.Data.MySql.Mappings/appsettings.Development.json | 2 +- Api.Data.MySql.Spatial/.docker/docker-compose.yml | 5 +---- .../Api.Data.MySql.Spatial/appsettings.Development.json | 2 +- Api.Data.MySql.StoredProcedures/.docker/docker-compose.yml | 5 +---- .../appsettings.Development.json | 2 +- Api.Data.MySql.Views/.docker/docker-compose.yml | 5 +---- .../Api.Data.MySql.Views/appsettings.Development.json | 2 +- Api.Data.MySql/.docker/docker-compose.yml | 5 +---- Api.Data.MySql/Api.Data.MySql/appsettings.Development.json | 2 +- Api.Data.Repository.AutoSave/.docker/docker-compose.yml | 5 +---- .../appsettings.Development.json | 2 +- Api.Data.Repository.Includes/.docker/docker-compose.yml | 5 +---- .../appsettings.Development.json | 2 +- Api.Data.SoftDelete/.docker/docker-compose.yml | 5 +---- .../Api.Data.SoftDelete/appsettings.Development.json | 2 +- Api.Data.Triggers/.docker/docker-compose.yml | 5 +---- .../Api.Data.Triggers/appsettings.Development.json | 2 +- .../Console.Data.MySql/appsettings.Development.json | 2 +- 45 files changed, 45 insertions(+), 93 deletions(-) diff --git a/Api.ApiClients.Audit/.docker/docker-compose.yml b/Api.ApiClients.Audit/.docker/docker-compose.yml index 3701e77a..65f425e7 100644 --- a/Api.ApiClients.Audit/.docker/docker-compose.yml +++ b/Api.ApiClients.Audit/.docker/docker-compose.yml @@ -16,7 +16,7 @@ services: hostname: api-apiclients-audit-service restart: on-failure ports: - - 8181:8181 + - 8181:8080 build: context: ../Api.ApiClients.Audit.Service dockerfile: "Dockerfile.Local" diff --git a/Api.ApiClients.Audit/Api.ApiClients.Audit.Service/appsettings.json b/Api.ApiClients.Audit/Api.ApiClients.Audit.Service/appsettings.json index dbd68122..d43a066a 100644 --- a/Api.ApiClients.Audit/Api.ApiClients.Audit.Service/appsettings.json +++ b/Api.ApiClients.Audit/Api.ApiClients.Audit.Service/appsettings.json @@ -5,7 +5,7 @@ "Root": "api", "Http": { "Ports": [ - 8181 + 8080 ] } } diff --git a/Api.ApiClients.Entity/.docker/docker-compose.yml b/Api.ApiClients.Entity/.docker/docker-compose.yml index c93a17e7..a51b8975 100644 --- a/Api.ApiClients.Entity/.docker/docker-compose.yml +++ b/Api.ApiClients.Entity/.docker/docker-compose.yml @@ -16,7 +16,7 @@ services: hostname: api-apiclients-entity-service restart: on-failure ports: - - 8181:8181 + - 8181:8080 build: context: ../Api.ApiClients.Entity.Service dockerfile: "Dockerfile.Local" diff --git a/Api.ApiClients.Entity/Api.ApiClients.Entity.Service/appsettings.json b/Api.ApiClients.Entity/Api.ApiClients.Entity.Service/appsettings.json index dbd68122..d43a066a 100644 --- a/Api.ApiClients.Entity/Api.ApiClients.Entity.Service/appsettings.json +++ b/Api.ApiClients.Entity/Api.ApiClients.Entity.Service/appsettings.json @@ -5,7 +5,7 @@ "Root": "api", "Http": { "Ports": [ - 8181 + 8080 ] } } diff --git a/Api.ApiClients.RootLogIn/.docker/docker-compose.yml b/Api.ApiClients.RootLogIn/.docker/docker-compose.yml index 8f0c55a8..accdcd21 100644 --- a/Api.ApiClients.RootLogIn/.docker/docker-compose.yml +++ b/Api.ApiClients.RootLogIn/.docker/docker-compose.yml @@ -16,7 +16,7 @@ services: hostname: api-apiclients-rootlogin-service restart: on-failure ports: - - 8181:8181 + - 8181:8080 build: context: ../Api.ApiClients.RootLogIn.Service dockerfile: "Dockerfile.Local" diff --git a/Api.ApiClients.RootLogIn/Api.ApiClients.RootLogin.Service/appsettings.json b/Api.ApiClients.RootLogIn/Api.ApiClients.RootLogin.Service/appsettings.json index f28ebab1..3ecf604f 100644 --- a/Api.ApiClients.RootLogIn/Api.ApiClients.RootLogin.Service/appsettings.json +++ b/Api.ApiClients.RootLogIn/Api.ApiClients.RootLogin.Service/appsettings.json @@ -5,7 +5,7 @@ "Root": "api", "Http": { "Ports": [ - 8181 + 8080 ] } }, diff --git a/Api.ApiClients/.docker/docker-compose.yml b/Api.ApiClients/.docker/docker-compose.yml index 0129b3b3..ab197d18 100644 --- a/Api.ApiClients/.docker/docker-compose.yml +++ b/Api.ApiClients/.docker/docker-compose.yml @@ -16,7 +16,7 @@ services: hostname: api-apiclients-service restart: on-failure ports: - - 8181:8181 + - 8181:8080 build: context: ../Api.ApiClients.Service dockerfile: "Dockerfile.Local" diff --git a/Api.ApiClients/Api.ApiClients.Service/appsettings.json b/Api.ApiClients/Api.ApiClients.Service/appsettings.json index 702a5e62..e8d9ff25 100644 --- a/Api.ApiClients/Api.ApiClients.Service/appsettings.json +++ b/Api.ApiClients/Api.ApiClients.Service/appsettings.json @@ -5,7 +5,7 @@ "Root": "api", "Http": { "Ports": [ - 8181 + 8080 ] } } diff --git a/Api.ApiClients/README.md b/Api.ApiClients/README.md index 6e3af283..06f0aced 100644 --- a/Api.ApiClients/README.md +++ b/Api.ApiClients/README.md @@ -52,7 +52,7 @@ Configured the application with a connection to the `NanoApiClient`. "NanoApiClient": { "Host": "localhost", "Root": "api", - "Port": 8181, + "Port": 8080, "UseSsl": false, "Timeout": "00:00:30", "HealthCheck": { diff --git a/Api.Data.Audit/.docker/docker-compose.yml b/Api.Data.Audit/.docker/docker-compose.yml index ee96146f..0b053f4a 100644 --- a/Api.Data.Audit/.docker/docker-compose.yml +++ b/Api.Data.Audit/.docker/docker-compose.yml @@ -20,11 +20,8 @@ services: networks: - network environment: - MYSQL_USER: sa - MYSQL_PASSWORD: myPassword_123 - MYSQL_ROOT_PASSWORD: myPassword_123 - MYSQL_DATABASE: nanoDb MYSQL_ROOT_HOST: '%' + MYSQL_ROOT_PASSWORD: myPassword_123 networks: network: diff --git a/Api.Data.Audit/Api.Data.Audit/appsettings.Development.json b/Api.Data.Audit/Api.Data.Audit/appsettings.Development.json index 34379ce9..670c9b68 100644 --- a/Api.Data.Audit/Api.Data.Audit/appsettings.Development.json +++ b/Api.Data.Audit/Api.Data.Audit/appsettings.Development.json @@ -1,6 +1,6 @@ { "Data": { "StartupAction": "Migrate", - "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=sa;Pwd=myPassword_123" + "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=root;Pwd=myPassword_123" } } \ No newline at end of file diff --git a/Api.Data.EntityEvents/.docker/docker-compose.yml b/Api.Data.EntityEvents/.docker/docker-compose.yml index c7513f0a..de7e7113 100644 --- a/Api.Data.EntityEvents/.docker/docker-compose.yml +++ b/Api.Data.EntityEvents/.docker/docker-compose.yml @@ -36,8 +36,8 @@ services: networks: - network environment: - MYSQL_ROOT_PASSWORD: myPassword_123 MYSQL_ROOT_HOST: '%' + MYSQL_ROOT_PASSWORD: myPassword_123 volumes: - ./init.sql:/docker-entrypoint-initdb.d/init.sql diff --git a/Api.Data.EntityEvents/Api.Data.EntityEvents.Subscriber/appsettings.Development.json b/Api.Data.EntityEvents/Api.Data.EntityEvents.Subscriber/appsettings.Development.json index 4de4ef5b..4cd2baad 100644 --- a/Api.Data.EntityEvents/Api.Data.EntityEvents.Subscriber/appsettings.Development.json +++ b/Api.Data.EntityEvents/Api.Data.EntityEvents.Subscriber/appsettings.Development.json @@ -1,6 +1,6 @@ { "Data": { "StartupAction": "Migrate", - "ConnectionString": "Server=host.docker.internal;Database=nanoDb2;Uid=sa;Pwd=myPassword_123" + "ConnectionString": "Server=host.docker.internal;Database=nanoDb2;Uid=root;Pwd=myPassword_123" } } \ No newline at end of file diff --git a/Api.Data.EntityEvents/Api.Data.EntityEvents/appsettings.Development.json b/Api.Data.EntityEvents/Api.Data.EntityEvents/appsettings.Development.json index 74c8964f..3ccddc18 100644 --- a/Api.Data.EntityEvents/Api.Data.EntityEvents/appsettings.Development.json +++ b/Api.Data.EntityEvents/Api.Data.EntityEvents/appsettings.Development.json @@ -1,7 +1,7 @@ { "Data": { "StartupAction": "Migrate", - "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=sa;Pwd=myPassword_123" + "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=root;Pwd=myPassword_123" }, "Eventing": { "Credentials": { diff --git a/Api.Data.Identity.Auth.ApiKey/.docker/docker-compose.yml b/Api.Data.Identity.Auth.ApiKey/.docker/docker-compose.yml index d7305c76..e8a95380 100644 --- a/Api.Data.Identity.Auth.ApiKey/.docker/docker-compose.yml +++ b/Api.Data.Identity.Auth.ApiKey/.docker/docker-compose.yml @@ -20,11 +20,8 @@ services: networks: - network environment: - MYSQL_USER: sa - MYSQL_PASSWORD: myPassword_123 - MYSQL_ROOT_PASSWORD: myPassword_123 - MYSQL_DATABASE: nanoDb MYSQL_ROOT_HOST: '%' + MYSQL_ROOT_PASSWORD: myPassword_123 networks: network: diff --git a/Api.Data.Identity.Auth.ApiKey/Api.Data.Identity.Auth.ApiKey/appsettings.Development.json b/Api.Data.Identity.Auth.ApiKey/Api.Data.Identity.Auth.ApiKey/appsettings.Development.json index 223c8a7b..12cbb219 100644 --- a/Api.Data.Identity.Auth.ApiKey/Api.Data.Identity.Auth.ApiKey/appsettings.Development.json +++ b/Api.Data.Identity.Auth.ApiKey/Api.Data.Identity.Auth.ApiKey/appsettings.Development.json @@ -13,6 +13,6 @@ }, "Data": { "StartupAction": "Migrate", - "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=sa;Pwd=myPassword_123" + "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=root;Pwd=myPassword_123" } } \ No newline at end of file diff --git a/Api.Data.Identity.Auth.External.Custom/.docker/docker-compose.yml b/Api.Data.Identity.Auth.External.Custom/.docker/docker-compose.yml index 921f1be5..77810132 100644 --- a/Api.Data.Identity.Auth.External.Custom/.docker/docker-compose.yml +++ b/Api.Data.Identity.Auth.External.Custom/.docker/docker-compose.yml @@ -20,11 +20,8 @@ services: networks: - network environment: - MYSQL_USER: sa - MYSQL_PASSWORD: myPassword_123 - MYSQL_ROOT_PASSWORD: myPassword_123 - MYSQL_DATABASE: nanoDb MYSQL_ROOT_HOST: '%' + MYSQL_ROOT_PASSWORD: myPassword_123 networks: network: diff --git a/Api.Data.Identity.Auth.External.Custom/Api.Data.Identity.Auth.External.Custom/appsettings.Development.json b/Api.Data.Identity.Auth.External.Custom/Api.Data.Identity.Auth.External.Custom/appsettings.Development.json index 223c8a7b..12cbb219 100644 --- a/Api.Data.Identity.Auth.External.Custom/Api.Data.Identity.Auth.External.Custom/appsettings.Development.json +++ b/Api.Data.Identity.Auth.External.Custom/Api.Data.Identity.Auth.External.Custom/appsettings.Development.json @@ -13,6 +13,6 @@ }, "Data": { "StartupAction": "Migrate", - "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=sa;Pwd=myPassword_123" + "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=root;Pwd=myPassword_123" } } \ No newline at end of file diff --git a/Api.Data.Identity.Auth.Jwt/.docker/docker-compose.yml b/Api.Data.Identity.Auth.Jwt/.docker/docker-compose.yml index 69136e45..599c4f0c 100644 --- a/Api.Data.Identity.Auth.Jwt/.docker/docker-compose.yml +++ b/Api.Data.Identity.Auth.Jwt/.docker/docker-compose.yml @@ -20,11 +20,8 @@ services: networks: - network environment: - MYSQL_USER: sa - MYSQL_PASSWORD: myPassword_123 - MYSQL_ROOT_PASSWORD: myPassword_123 - MYSQL_DATABASE: nanoDb MYSQL_ROOT_HOST: '%' + MYSQL_ROOT_PASSWORD: myPassword_123 networks: network: diff --git a/Api.Data.Identity.Auth.Jwt/Api.Data.Identity.Auth.Jwt/appsettings.Development.json b/Api.Data.Identity.Auth.Jwt/Api.Data.Identity.Auth.Jwt/appsettings.Development.json index 223c8a7b..12cbb219 100644 --- a/Api.Data.Identity.Auth.Jwt/Api.Data.Identity.Auth.Jwt/appsettings.Development.json +++ b/Api.Data.Identity.Auth.Jwt/Api.Data.Identity.Auth.Jwt/appsettings.Development.json @@ -13,6 +13,6 @@ }, "Data": { "StartupAction": "Migrate", - "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=sa;Pwd=myPassword_123" + "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=root;Pwd=myPassword_123" } } \ No newline at end of file diff --git a/Api.Data.Identity/.docker/docker-compose.yml b/Api.Data.Identity/.docker/docker-compose.yml index d4a7e47a..6b6b16db 100644 --- a/Api.Data.Identity/.docker/docker-compose.yml +++ b/Api.Data.Identity/.docker/docker-compose.yml @@ -20,11 +20,8 @@ services: networks: - network environment: - MYSQL_USER: sa - MYSQL_PASSWORD: myPassword_123 - MYSQL_ROOT_PASSWORD: myPassword_123 - MYSQL_DATABASE: nanoDb MYSQL_ROOT_HOST: '%' + MYSQL_ROOT_PASSWORD: myPassword_123 networks: network: diff --git a/Api.Data.Identity/Api.Data.Identity/appsettings.Development.json b/Api.Data.Identity/Api.Data.Identity/appsettings.Development.json index 34379ce9..670c9b68 100644 --- a/Api.Data.Identity/Api.Data.Identity/appsettings.Development.json +++ b/Api.Data.Identity/Api.Data.Identity/appsettings.Development.json @@ -1,6 +1,6 @@ { "Data": { "StartupAction": "Migrate", - "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=sa;Pwd=myPassword_123" + "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=root;Pwd=myPassword_123" } } \ No newline at end of file diff --git a/Api.Data.LazyLoading/.docker/docker-compose.yml b/Api.Data.LazyLoading/.docker/docker-compose.yml index b31fee18..986f0034 100644 --- a/Api.Data.LazyLoading/.docker/docker-compose.yml +++ b/Api.Data.LazyLoading/.docker/docker-compose.yml @@ -20,11 +20,8 @@ services: networks: - network environment: - MYSQL_USER: sa - MYSQL_PASSWORD: myPassword_123 - MYSQL_ROOT_PASSWORD: myPassword_123 - MYSQL_DATABASE: nanoDb MYSQL_ROOT_HOST: '%' + MYSQL_ROOT_PASSWORD: myPassword_123 networks: network: diff --git a/Api.Data.LazyLoading/Api.Data.LazyLoading/appsettings.Development.json b/Api.Data.LazyLoading/Api.Data.LazyLoading/appsettings.Development.json index 34379ce9..670c9b68 100644 --- a/Api.Data.LazyLoading/Api.Data.LazyLoading/appsettings.Development.json +++ b/Api.Data.LazyLoading/Api.Data.LazyLoading/appsettings.Development.json @@ -1,6 +1,6 @@ { "Data": { "StartupAction": "Migrate", - "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=sa;Pwd=myPassword_123" + "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=root;Pwd=myPassword_123" } } \ No newline at end of file diff --git a/Api.Data.MySql.Collation/.docker/docker-compose.yml b/Api.Data.MySql.Collation/.docker/docker-compose.yml index edbf3b37..6b453c40 100644 --- a/Api.Data.MySql.Collation/.docker/docker-compose.yml +++ b/Api.Data.MySql.Collation/.docker/docker-compose.yml @@ -20,11 +20,8 @@ services: networks: - network environment: - MYSQL_USER: sa - MYSQL_PASSWORD: myPassword_123 - MYSQL_ROOT_PASSWORD: myPassword_123 - MYSQL_DATABASE: nanoDb MYSQL_ROOT_HOST: '%' + MYSQL_ROOT_PASSWORD: myPassword_123 networks: network: diff --git a/Api.Data.MySql.Collation/Api.Data.MySql.Collation/appsettings.Development.json b/Api.Data.MySql.Collation/Api.Data.MySql.Collation/appsettings.Development.json index 34379ce9..670c9b68 100644 --- a/Api.Data.MySql.Collation/Api.Data.MySql.Collation/appsettings.Development.json +++ b/Api.Data.MySql.Collation/Api.Data.MySql.Collation/appsettings.Development.json @@ -1,6 +1,6 @@ { "Data": { "StartupAction": "Migrate", - "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=sa;Pwd=myPassword_123" + "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=root;Pwd=myPassword_123" } } \ No newline at end of file diff --git a/Api.Data.MySql.Mappings/.docker/docker-compose.yml b/Api.Data.MySql.Mappings/.docker/docker-compose.yml index 7fe5c2e8..dfecb5b3 100644 --- a/Api.Data.MySql.Mappings/.docker/docker-compose.yml +++ b/Api.Data.MySql.Mappings/.docker/docker-compose.yml @@ -20,11 +20,8 @@ services: networks: - network environment: - MYSQL_USER: sa - MYSQL_PASSWORD: myPassword_123 - MYSQL_ROOT_PASSWORD: myPassword_123 - MYSQL_DATABASE: nanoDb MYSQL_ROOT_HOST: '%' + MYSQL_ROOT_PASSWORD: myPassword_123 networks: network: diff --git a/Api.Data.MySql.Mappings/Api.Data.MySql.Mappings/appsettings.Development.json b/Api.Data.MySql.Mappings/Api.Data.MySql.Mappings/appsettings.Development.json index 34379ce9..670c9b68 100644 --- a/Api.Data.MySql.Mappings/Api.Data.MySql.Mappings/appsettings.Development.json +++ b/Api.Data.MySql.Mappings/Api.Data.MySql.Mappings/appsettings.Development.json @@ -1,6 +1,6 @@ { "Data": { "StartupAction": "Migrate", - "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=sa;Pwd=myPassword_123" + "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=root;Pwd=myPassword_123" } } \ No newline at end of file diff --git a/Api.Data.MySql.Spatial/.docker/docker-compose.yml b/Api.Data.MySql.Spatial/.docker/docker-compose.yml index 309848ae..7c9e8d48 100644 --- a/Api.Data.MySql.Spatial/.docker/docker-compose.yml +++ b/Api.Data.MySql.Spatial/.docker/docker-compose.yml @@ -20,11 +20,8 @@ services: networks: - network environment: - MYSQL_USER: sa - MYSQL_PASSWORD: myPassword_123 - MYSQL_ROOT_PASSWORD: myPassword_123 - MYSQL_DATABASE: nanoDb MYSQL_ROOT_HOST: '%' + MYSQL_ROOT_PASSWORD: myPassword_123 networks: network: diff --git a/Api.Data.MySql.Spatial/Api.Data.MySql.Spatial/appsettings.Development.json b/Api.Data.MySql.Spatial/Api.Data.MySql.Spatial/appsettings.Development.json index 34379ce9..670c9b68 100644 --- a/Api.Data.MySql.Spatial/Api.Data.MySql.Spatial/appsettings.Development.json +++ b/Api.Data.MySql.Spatial/Api.Data.MySql.Spatial/appsettings.Development.json @@ -1,6 +1,6 @@ { "Data": { "StartupAction": "Migrate", - "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=sa;Pwd=myPassword_123" + "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=root;Pwd=myPassword_123" } } \ No newline at end of file diff --git a/Api.Data.MySql.StoredProcedures/.docker/docker-compose.yml b/Api.Data.MySql.StoredProcedures/.docker/docker-compose.yml index 5f01dfb6..58e90a83 100644 --- a/Api.Data.MySql.StoredProcedures/.docker/docker-compose.yml +++ b/Api.Data.MySql.StoredProcedures/.docker/docker-compose.yml @@ -20,11 +20,8 @@ services: networks: - network environment: - MYSQL_USER: sa - MYSQL_PASSWORD: myPassword_123 - MYSQL_ROOT_PASSWORD: myPassword_123 - MYSQL_DATABASE: nanoDb MYSQL_ROOT_HOST: '%' + MYSQL_ROOT_PASSWORD: myPassword_123 networks: network: diff --git a/Api.Data.MySql.StoredProcedures/Api.Data.MySql.StoredProcedures/appsettings.Development.json b/Api.Data.MySql.StoredProcedures/Api.Data.MySql.StoredProcedures/appsettings.Development.json index 34379ce9..670c9b68 100644 --- a/Api.Data.MySql.StoredProcedures/Api.Data.MySql.StoredProcedures/appsettings.Development.json +++ b/Api.Data.MySql.StoredProcedures/Api.Data.MySql.StoredProcedures/appsettings.Development.json @@ -1,6 +1,6 @@ { "Data": { "StartupAction": "Migrate", - "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=sa;Pwd=myPassword_123" + "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=root;Pwd=myPassword_123" } } \ No newline at end of file diff --git a/Api.Data.MySql.Views/.docker/docker-compose.yml b/Api.Data.MySql.Views/.docker/docker-compose.yml index 8a5c7578..4f52ca85 100644 --- a/Api.Data.MySql.Views/.docker/docker-compose.yml +++ b/Api.Data.MySql.Views/.docker/docker-compose.yml @@ -20,11 +20,8 @@ services: networks: - network environment: - MYSQL_USER: sa - MYSQL_PASSWORD: myPassword_123 - MYSQL_ROOT_PASSWORD: myPassword_123 - MYSQL_DATABASE: nanoDb MYSQL_ROOT_HOST: '%' + MYSQL_ROOT_PASSWORD: myPassword_123 networks: network: diff --git a/Api.Data.MySql.Views/Api.Data.MySql.Views/appsettings.Development.json b/Api.Data.MySql.Views/Api.Data.MySql.Views/appsettings.Development.json index 34379ce9..670c9b68 100644 --- a/Api.Data.MySql.Views/Api.Data.MySql.Views/appsettings.Development.json +++ b/Api.Data.MySql.Views/Api.Data.MySql.Views/appsettings.Development.json @@ -1,6 +1,6 @@ { "Data": { "StartupAction": "Migrate", - "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=sa;Pwd=myPassword_123" + "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=root;Pwd=myPassword_123" } } \ No newline at end of file diff --git a/Api.Data.MySql/.docker/docker-compose.yml b/Api.Data.MySql/.docker/docker-compose.yml index e1757ea8..05a59213 100644 --- a/Api.Data.MySql/.docker/docker-compose.yml +++ b/Api.Data.MySql/.docker/docker-compose.yml @@ -20,11 +20,8 @@ services: networks: - network environment: - MYSQL_USER: sa - MYSQL_PASSWORD: myPassword_123 - MYSQL_ROOT_PASSWORD: myPassword_123 - MYSQL_DATABASE: nanoDb MYSQL_ROOT_HOST: '%' + MYSQL_ROOT_PASSWORD: myPassword_123 networks: network: diff --git a/Api.Data.MySql/Api.Data.MySql/appsettings.Development.json b/Api.Data.MySql/Api.Data.MySql/appsettings.Development.json index 34379ce9..670c9b68 100644 --- a/Api.Data.MySql/Api.Data.MySql/appsettings.Development.json +++ b/Api.Data.MySql/Api.Data.MySql/appsettings.Development.json @@ -1,6 +1,6 @@ { "Data": { "StartupAction": "Migrate", - "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=sa;Pwd=myPassword_123" + "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=root;Pwd=myPassword_123" } } \ No newline at end of file diff --git a/Api.Data.Repository.AutoSave/.docker/docker-compose.yml b/Api.Data.Repository.AutoSave/.docker/docker-compose.yml index 9b69f42b..3b06ee7b 100644 --- a/Api.Data.Repository.AutoSave/.docker/docker-compose.yml +++ b/Api.Data.Repository.AutoSave/.docker/docker-compose.yml @@ -20,11 +20,8 @@ services: networks: - network environment: - MYSQL_USER: sa - MYSQL_PASSWORD: myPassword_123 - MYSQL_ROOT_PASSWORD: myPassword_123 - MYSQL_DATABASE: nanoDb MYSQL_ROOT_HOST: '%' + MYSQL_ROOT_PASSWORD: myPassword_123 networks: network: diff --git a/Api.Data.Repository.AutoSave/Api.Data.Repository.AutoSave/appsettings.Development.json b/Api.Data.Repository.AutoSave/Api.Data.Repository.AutoSave/appsettings.Development.json index 34379ce9..670c9b68 100644 --- a/Api.Data.Repository.AutoSave/Api.Data.Repository.AutoSave/appsettings.Development.json +++ b/Api.Data.Repository.AutoSave/Api.Data.Repository.AutoSave/appsettings.Development.json @@ -1,6 +1,6 @@ { "Data": { "StartupAction": "Migrate", - "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=sa;Pwd=myPassword_123" + "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=root;Pwd=myPassword_123" } } \ No newline at end of file diff --git a/Api.Data.Repository.Includes/.docker/docker-compose.yml b/Api.Data.Repository.Includes/.docker/docker-compose.yml index 98336e73..bb0a018c 100644 --- a/Api.Data.Repository.Includes/.docker/docker-compose.yml +++ b/Api.Data.Repository.Includes/.docker/docker-compose.yml @@ -20,11 +20,8 @@ services: networks: - network environment: - MYSQL_USER: sa - MYSQL_PASSWORD: myPassword_123 - MYSQL_ROOT_PASSWORD: myPassword_123 - MYSQL_DATABASE: nanoDb MYSQL_ROOT_HOST: '%' + MYSQL_ROOT_PASSWORD: myPassword_123 networks: network: diff --git a/Api.Data.Repository.Includes/Api.Data.Repository.Includes/appsettings.Development.json b/Api.Data.Repository.Includes/Api.Data.Repository.Includes/appsettings.Development.json index 34379ce9..670c9b68 100644 --- a/Api.Data.Repository.Includes/Api.Data.Repository.Includes/appsettings.Development.json +++ b/Api.Data.Repository.Includes/Api.Data.Repository.Includes/appsettings.Development.json @@ -1,6 +1,6 @@ { "Data": { "StartupAction": "Migrate", - "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=sa;Pwd=myPassword_123" + "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=root;Pwd=myPassword_123" } } \ No newline at end of file diff --git a/Api.Data.SoftDelete/.docker/docker-compose.yml b/Api.Data.SoftDelete/.docker/docker-compose.yml index 2182ed3f..0fbddac4 100644 --- a/Api.Data.SoftDelete/.docker/docker-compose.yml +++ b/Api.Data.SoftDelete/.docker/docker-compose.yml @@ -20,11 +20,8 @@ services: networks: - network environment: - MYSQL_USER: sa - MYSQL_PASSWORD: myPassword_123 - MYSQL_ROOT_PASSWORD: myPassword_123 - MYSQL_DATABASE: nanoDb MYSQL_ROOT_HOST: '%' + MYSQL_ROOT_PASSWORD: myPassword_123 networks: network: diff --git a/Api.Data.SoftDelete/Api.Data.SoftDelete/appsettings.Development.json b/Api.Data.SoftDelete/Api.Data.SoftDelete/appsettings.Development.json index 34379ce9..670c9b68 100644 --- a/Api.Data.SoftDelete/Api.Data.SoftDelete/appsettings.Development.json +++ b/Api.Data.SoftDelete/Api.Data.SoftDelete/appsettings.Development.json @@ -1,6 +1,6 @@ { "Data": { "StartupAction": "Migrate", - "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=sa;Pwd=myPassword_123" + "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=root;Pwd=myPassword_123" } } \ No newline at end of file diff --git a/Api.Data.Triggers/.docker/docker-compose.yml b/Api.Data.Triggers/.docker/docker-compose.yml index 1bd3d4c3..b7e371df 100644 --- a/Api.Data.Triggers/.docker/docker-compose.yml +++ b/Api.Data.Triggers/.docker/docker-compose.yml @@ -20,11 +20,8 @@ services: networks: - network environment: - MYSQL_USER: sa - MYSQL_PASSWORD: myPassword_123 - MYSQL_ROOT_PASSWORD: myPassword_123 - MYSQL_DATABASE: nanoDb MYSQL_ROOT_HOST: '%' + MYSQL_ROOT_PASSWORD: myPassword_123 networks: network: diff --git a/Api.Data.Triggers/Api.Data.Triggers/appsettings.Development.json b/Api.Data.Triggers/Api.Data.Triggers/appsettings.Development.json index 34379ce9..670c9b68 100644 --- a/Api.Data.Triggers/Api.Data.Triggers/appsettings.Development.json +++ b/Api.Data.Triggers/Api.Data.Triggers/appsettings.Development.json @@ -1,6 +1,6 @@ { "Data": { "StartupAction": "Migrate", - "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=sa;Pwd=myPassword_123" + "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=root;Pwd=myPassword_123" } } \ No newline at end of file diff --git a/Console.Data.MySql/Console.Data.MySql/appsettings.Development.json b/Console.Data.MySql/Console.Data.MySql/appsettings.Development.json index 34379ce9..670c9b68 100644 --- a/Console.Data.MySql/Console.Data.MySql/appsettings.Development.json +++ b/Console.Data.MySql/Console.Data.MySql/appsettings.Development.json @@ -1,6 +1,6 @@ { "Data": { "StartupAction": "Migrate", - "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=sa;Pwd=myPassword_123" + "ConnectionString": "Server=host.docker.internal;Database=nanoDb;Uid=root;Pwd=myPassword_123" } } \ No newline at end of file From 8ef0a7445533ace8d8b7ce32da43d686e2996b85 Mon Sep 17 00:00:00 2001 From: vivet Date: Tue, 14 Jul 2026 12:22:55 +0200 Subject: [PATCH 28/33] Updated --- Api.Data.SqLite/.kubernetes/data-storageclass.yaml | 2 +- Api.Storage.Azure/.github/workflows/build-and-deploy.yml | 1 + Api.Storage.Azure/.kubernetes/deployment.yaml | 2 +- Api.Storage.Azure/.kubernetes/storage-pv.yaml | 6 +++--- Api.Storage.Azure/.kubernetes/storage-pvc.yaml | 5 +++-- Api.Storage.Azure/README.md | 5 ++++- Api.Storage.Local/.kubernetes/storage-storageclass.yaml | 2 +- Console.Data.SqLite/.kubernetes/data-storageclass.yaml | 2 +- .../.github/workflows/build-and-deploy.yml | 1 + Console.Storage.Azure/.kubernetes/cronjob.yaml | 2 +- Console.Storage.Azure/.kubernetes/storage-pv.yaml | 6 +++--- Console.Storage.Azure/.kubernetes/storage-pvc.yaml | 5 +++-- Console.Storage.Azure/README.md | 5 ++++- Console.Storage.Local/.kubernetes/storage-storageclass.yaml | 2 +- 14 files changed, 28 insertions(+), 18 deletions(-) diff --git a/Api.Data.SqLite/.kubernetes/data-storageclass.yaml b/Api.Data.SqLite/.kubernetes/data-storageclass.yaml index 47530cdc..2f66693c 100644 --- a/Api.Data.SqLite/.kubernetes/data-storageclass.yaml +++ b/Api.Data.SqLite/.kubernetes/data-storageclass.yaml @@ -2,7 +2,7 @@ apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: %SERVICE_NAME%-data-storage-class -provisioner: kubernetes.io/azure-disk +provisioner: disk.csi.azure.com parameters: storageaccounttype: Standard_LRS kind: Managed diff --git a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml index bae472fd..47920047 100644 --- a/Api.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Api.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -220,6 +220,7 @@ jobs: shell: pwsh run: | $env:IDENTITY_CLIENT_ID = az identity show -g $env:AZURE_GROUP_KUBERNETES -n $env:IDENTITY_NAME --query clientId -o tsv; + $env:VOLUME_NAME_SUFFIX = $env:IDENTITY_CLIENT_ID.Substring(0, 5); Get-Content .kubernetes/service-account.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service-account.tmp.yaml; kubectl apply -f .kubernetes/service-account.tmp.yaml; diff --git a/Api.Storage.Azure/.kubernetes/deployment.yaml b/Api.Storage.Azure/.kubernetes/deployment.yaml index 3c3a4d20..f2e7ad15 100644 --- a/Api.Storage.Azure/.kubernetes/deployment.yaml +++ b/Api.Storage.Azure/.kubernetes/deployment.yaml @@ -87,7 +87,7 @@ spec: volumes: - name: %SERVICE_NAME%-volume persistentVolumeClaim: - claimName: %SERVICE_NAME%-azurefile-pvc + claimName: %SERVICE_NAME%-azurefile-pvc-%VOLUME_NAME_SUFFIX% - name: tmp emptyDir: {} diff --git a/Api.Storage.Azure/.kubernetes/storage-pv.yaml b/Api.Storage.Azure/.kubernetes/storage-pv.yaml index f9c4f3d3..5bc60f12 100644 --- a/Api.Storage.Azure/.kubernetes/storage-pv.yaml +++ b/Api.Storage.Azure/.kubernetes/storage-pv.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: PersistentVolume metadata: - name: %SERVICE_NAME%-azurefile-pv + name: %SERVICE_NAME%-azurefile-pv-%VOLUME_NAME_SUFFIX% spec: capacity: storage: %STORAGE_SIZE% @@ -15,11 +15,11 @@ spec: - uid=0 - gid=0 claimRef: - name: %SERVICE_NAME%-azurefile-pvc + name: %SERVICE_NAME%-azurefile-pvc-%VOLUME_NAME_SUFFIX% namespace: %KUBERNETES_NAMESPACE% csi: driver: file.csi.azure.com - volumeHandle: %AZURE_GROUP_STORAGE%#%STORAGE_ACCOUNT_NAME%#%STORAGE_SHARE_NAME% + volumeHandle: %AZURE_GROUP_STORAGE%#%STORAGE_ACCOUNT_NAME%#%STORAGE_SHARE_NAME%-%VOLUME_NAME_SUFFIX% volumeAttributes: shareName: %STORAGE_SHARE_NAME% storageAccount: %STORAGE_ACCOUNT_NAME% diff --git a/Api.Storage.Azure/.kubernetes/storage-pvc.yaml b/Api.Storage.Azure/.kubernetes/storage-pvc.yaml index 252c7857..8ce63544 100644 --- a/Api.Storage.Azure/.kubernetes/storage-pvc.yaml +++ b/Api.Storage.Azure/.kubernetes/storage-pvc.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: %SERVICE_NAME%-azurefile-pvc + name: %SERVICE_NAME%-azurefile-pvc-%VOLUME_NAME_SUFFIX% namespace: %KUBERNETES_NAMESPACE% spec: accessModes: @@ -9,4 +9,5 @@ spec: storageClassName: azurefile-static resources: requests: - storage: %STORAGE_SIZE% \ No newline at end of file + storage: %STORAGE_SIZE% + volumeName: %SERVICE_NAME%-azurefile-pv-%VOLUME_NAME_SUFFIX% \ No newline at end of file diff --git a/Api.Storage.Azure/README.md b/Api.Storage.Azure/README.md index 6720bdb5..68c303d4 100644 --- a/Api.Storage.Azure/README.md +++ b/Api.Storage.Azure/README.md @@ -106,11 +106,14 @@ spec: volumes: - name: %SERVICE_NAME%-volume persistentVolumeClaim: - claimName: %SERVICE_NAME%-azurefile-pvc + claimName: %SERVICE_NAME%-azurefile-pvc-%VOLUME_NAME_SUFFIX% - name: tmp emptyDir: {} ``` +Notice the name suffix for `claimName`. The PersistentVolume (PV) and PersistentVolumeClaim (PVC) are created with a suffix to allow the managed identity used for authenticating with the +Azure File Share to be changed without trying to replace existing immutable resources. + ## GitHub Actions Add the following environment variables to the `buid-and-deply.yml`. diff --git a/Api.Storage.Local/.kubernetes/storage-storageclass.yaml b/Api.Storage.Local/.kubernetes/storage-storageclass.yaml index f9ccaa3e..fa2c6dd3 100644 --- a/Api.Storage.Local/.kubernetes/storage-storageclass.yaml +++ b/Api.Storage.Local/.kubernetes/storage-storageclass.yaml @@ -2,7 +2,7 @@ apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: %SERVICE_NAME%-storage-class -provisioner: kubernetes.io/azure-disk +provisioner: disk.csi.azure.com parameters: storageaccounttype: Standard_LRS kind: Managed diff --git a/Console.Data.SqLite/.kubernetes/data-storageclass.yaml b/Console.Data.SqLite/.kubernetes/data-storageclass.yaml index 47530cdc..2f66693c 100644 --- a/Console.Data.SqLite/.kubernetes/data-storageclass.yaml +++ b/Console.Data.SqLite/.kubernetes/data-storageclass.yaml @@ -2,7 +2,7 @@ apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: %SERVICE_NAME%-data-storage-class -provisioner: kubernetes.io/azure-disk +provisioner: disk.csi.azure.com parameters: storageaccounttype: Standard_LRS kind: Managed diff --git a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml index d6bab59d..c461c6f7 100644 --- a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -207,6 +207,7 @@ jobs: shell: pwsh run: | $env:IDENTITY_CLIENT_ID = az identity show -g $env:AZURE_GROUP_KUBERNETES -n $env:IDENTITY_NAME --query clientId -o tsv; + $env:VOLUME_NAME_SUFFIX = $env:IDENTITY_CLIENT_ID.Substring(0, 5); Get-Content .kubernetes/service-account.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service-account.tmp.yaml; kubectl apply -f .kubernetes/service-account.tmp.yaml; diff --git a/Console.Storage.Azure/.kubernetes/cronjob.yaml b/Console.Storage.Azure/.kubernetes/cronjob.yaml index 501acd83..f9cee2c4 100644 --- a/Console.Storage.Azure/.kubernetes/cronjob.yaml +++ b/Console.Storage.Azure/.kubernetes/cronjob.yaml @@ -56,7 +56,7 @@ spec: volumes: - name: %SERVICE_NAME%-volume persistentVolumeClaim: - claimName: %SERVICE_NAME%-azurefile-pvc + claimName: %SERVICE_NAME%-azurefile-pvc-%VOLUME_NAME_SUFFIX% - name: tmp emptyDir: {} diff --git a/Console.Storage.Azure/.kubernetes/storage-pv.yaml b/Console.Storage.Azure/.kubernetes/storage-pv.yaml index f9c4f3d3..5bc60f12 100644 --- a/Console.Storage.Azure/.kubernetes/storage-pv.yaml +++ b/Console.Storage.Azure/.kubernetes/storage-pv.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: PersistentVolume metadata: - name: %SERVICE_NAME%-azurefile-pv + name: %SERVICE_NAME%-azurefile-pv-%VOLUME_NAME_SUFFIX% spec: capacity: storage: %STORAGE_SIZE% @@ -15,11 +15,11 @@ spec: - uid=0 - gid=0 claimRef: - name: %SERVICE_NAME%-azurefile-pvc + name: %SERVICE_NAME%-azurefile-pvc-%VOLUME_NAME_SUFFIX% namespace: %KUBERNETES_NAMESPACE% csi: driver: file.csi.azure.com - volumeHandle: %AZURE_GROUP_STORAGE%#%STORAGE_ACCOUNT_NAME%#%STORAGE_SHARE_NAME% + volumeHandle: %AZURE_GROUP_STORAGE%#%STORAGE_ACCOUNT_NAME%#%STORAGE_SHARE_NAME%-%VOLUME_NAME_SUFFIX% volumeAttributes: shareName: %STORAGE_SHARE_NAME% storageAccount: %STORAGE_ACCOUNT_NAME% diff --git a/Console.Storage.Azure/.kubernetes/storage-pvc.yaml b/Console.Storage.Azure/.kubernetes/storage-pvc.yaml index 252c7857..8ce63544 100644 --- a/Console.Storage.Azure/.kubernetes/storage-pvc.yaml +++ b/Console.Storage.Azure/.kubernetes/storage-pvc.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: %SERVICE_NAME%-azurefile-pvc + name: %SERVICE_NAME%-azurefile-pvc-%VOLUME_NAME_SUFFIX% namespace: %KUBERNETES_NAMESPACE% spec: accessModes: @@ -9,4 +9,5 @@ spec: storageClassName: azurefile-static resources: requests: - storage: %STORAGE_SIZE% \ No newline at end of file + storage: %STORAGE_SIZE% + volumeName: %SERVICE_NAME%-azurefile-pv-%VOLUME_NAME_SUFFIX% \ No newline at end of file diff --git a/Console.Storage.Azure/README.md b/Console.Storage.Azure/README.md index ab35ece9..99c5bf4f 100644 --- a/Console.Storage.Azure/README.md +++ b/Console.Storage.Azure/README.md @@ -80,11 +80,14 @@ spec: volumes: - name: %SERVICE_NAME%-volume persistentVolumeClaim: - claimName: %SERVICE_NAME%-azurefile-pvc + claimName: %SERVICE_NAME%-azurefile-pvc-%VOLUME_NAME_SUFFIX% - name: tmp emptyDir: {} ``` +Notice the name suffix for `claimName`. The PersistentVolume (PV) and PersistentVolumeClaim (PVC) are created with a suffix to allow the managed identity used for authenticating with the +Azure File Share to be changed without trying to replace existing immutable resources. + ## GitHub Actions Add the following environment variables to the `buid-and-deply.yml`. diff --git a/Console.Storage.Local/.kubernetes/storage-storageclass.yaml b/Console.Storage.Local/.kubernetes/storage-storageclass.yaml index f9ccaa3e..fa2c6dd3 100644 --- a/Console.Storage.Local/.kubernetes/storage-storageclass.yaml +++ b/Console.Storage.Local/.kubernetes/storage-storageclass.yaml @@ -2,7 +2,7 @@ apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: %SERVICE_NAME%-storage-class -provisioner: kubernetes.io/azure-disk +provisioner: disk.csi.azure.com parameters: storageaccounttype: Standard_LRS kind: Managed From 3a73dfe694d7e3e9b3de765854439f633deb185c Mon Sep 17 00:00:00 2001 From: vivet Date: Tue, 14 Jul 2026 15:04:20 +0200 Subject: [PATCH 29/33] Updated --- Api.Auth.External.Custom/README.md | 24 +++++ Api.Auth.RootLogin/README.md | 24 +++++ Api.Data.Identity.Auth.ApiKey/README.md | 12 +-- .../README.md | 34 ------- Api.Data.Identity.Auth.Jwt/README.md | 26 +++++- Api.Data.MySql/README.md | 12 ++- .../.github/workflows/build-and-deploy.yml | 4 +- Api.Data.PostgreSQL/README.md | 12 ++- .../.github/workflows/build-and-deploy.yml | 2 - Api.Data.SqlServer/README.md | 16 ++-- Api.Eventing.RabbitMq/README.md | 2 +- Api.Hosting.Https/README.md | 89 +++++++++++++++++-- .../.github/workflows/build-and-deploy.yml | 1 + .../.kubernetes/configmap.yaml | 1 + Api.Storage.Azure/Api.Storage.Azure.sln | 1 + Api.Storage.Azure/README.md | 79 ++++++++++++++-- Api.Storage.Local/README.md | 8 -- .../.github/workflows/build-and-deploy.yml | 2 +- Console.Data.MySql/README.md | 11 ++- .../.github/workflows/build-and-deploy.yml | 4 +- Console.Data.PostgreSQL/README.md | 12 ++- .../.github/workflows/build-and-deploy.yml | 1 - Console.Data.SqLite/.kubernetes/data-pvc.yaml | 1 + Console.Data.SqLite/README.md | 2 +- .../.github/workflows/build-and-deploy.yml | 2 +- Console.Data.SqlServer/README.md | 12 ++- .../Console.Storage.Azure.sln | 1 + Console.Storage.Azure/README.md | 66 +++++++++++++- .../.kubernetes/cronjob.yaml | 7 +- Console.Storage.Local/README.md | 36 ++++---- 30 files changed, 389 insertions(+), 115 deletions(-) diff --git a/Api.Auth.External.Custom/README.md b/Api.Auth.External.Custom/README.md index dc8fc4a4..5252ffaf 100644 --- a/Api.Auth.External.Custom/README.md +++ b/Api.Auth.External.Custom/README.md @@ -82,6 +82,30 @@ Configured the application with the necessary authentication setup. } ``` +...and for `Staging` and `Production` environments. + +```json +"App": { + "Authentication": { + "Jwt": { + "Issuer": "nano.staging", + "Audience": "nano.staging" + } + } +} +``` + +```json +"App": { + "Authentication": { + "Jwt": { + "Issuer": "nano.production", + "Audience": "nano.production" + } + } +} +``` + ## Kubernetes For `Staging` and `Production` environments, a secret must be created to securely store the public and private keys, and optionally the credentials for `RootLogin` if it shoud be enabled. Below demonstrates how to map the secret containing the JWT keys. diff --git a/Api.Auth.RootLogin/README.md b/Api.Auth.RootLogin/README.md index 1e64ec11..b11731fb 100644 --- a/Api.Auth.RootLogin/README.md +++ b/Api.Auth.RootLogin/README.md @@ -82,6 +82,30 @@ Configured the application with the necessary authentication setup. } ``` +...and for `Staging` and `Production` environments. + +```json +"App": { + "Authentication": { + "Jwt": { + "Issuer": "nano.staging", + "Audience": "nano.staging" + } + } +} +``` + +```json +"App": { + "Authentication": { + "Jwt": { + "Issuer": "nano.production", + "Audience": "nano.production" + } + } +} +``` + ## Kubernetes For `Staging` and `Production` environments, a secret must be created to securely store the public and private keys, and optionally the credentials for `RootLogin` if it shoud be enabled. Below demonstrates how to map the secret containing the JWT keys. diff --git a/Api.Data.Identity.Auth.ApiKey/README.md b/Api.Data.Identity.Auth.ApiKey/README.md index 45050da2..5f34e140 100644 --- a/Api.Data.Identity.Auth.ApiKey/README.md +++ b/Api.Data.Identity.Auth.ApiKey/README.md @@ -48,17 +48,17 @@ Additionally, the identity controller is also avaialble, and the actions can be Configured the application with the necessary authentication setup, in addition to the existing identity and jwt configuration. ```json -"App": { - "Data": { - "Identity": { - "ApiKey": { - "Secret": "secret" - } +"Data": { + "Identity": { + "ApiKey": { + "Secret": "secret" } } } ``` +Additionally, JWT authentication has been configured to enable the application to generate JWT tokens based on an API key. + ## Kubernetes For `Staging` and `Production` environments, a secret must be created to securely store the apikey secret. Below demonstrates how to map the secret containing the API key secret. diff --git a/Api.Data.Identity.Auth.External.Custom/README.md b/Api.Data.Identity.Auth.External.Custom/README.md index f9e7730c..43ebf51f 100644 --- a/Api.Data.Identity.Auth.External.Custom/README.md +++ b/Api.Data.Identity.Auth.External.Custom/README.md @@ -14,7 +14,6 @@ Nano is referenced directly from source (not via NuGet packages) and is expected ## Table of Contents * [Summary](#summary) -* [Configuration](#configuration) ## Summary This application builds on **[Api.Data.Identity.Auth.Jwt](https://github.com/Nano-Core/Nano.Lessons/tree/master/Api.Data.Identity.Auth.Jwt)**. @@ -51,36 +50,3 @@ The following new endpoints related to the custom authentication provider from t > 📖 Learn more about **[Nano Authentication](https://github.com/Nano-Core/Nano.Library/tree/master/Nano.App.Api/README.md#authentication)**. -## Configuration -Configured the application with the necessary authentication setup, in addition to the identity configuration. - -```json -"App": { - "Authentication": { - "Jwt": { - "Issuer": null, - "Audience": null, - "PublicKey": null, - "PrivateKey": null, - "Expiration": "01:00:00", - "RefreshExpiration": "72:00:00" - } - } -} -``` - -...and for `appesettings.Developmnet.json`. - -```json -"App": { - "Authentication": { - "Jwt": { - "Issuer": "Development.nano", - "Audience": "Development.nano", - "PublicKey": "MIIBCgKCAQEAv7iVNUS5w...", - "PrivateKey": "MIIEowIBAAKCAQEAv7iV...", - "Expiration": "24:00:00" - } - } -} -``` diff --git a/Api.Data.Identity.Auth.Jwt/README.md b/Api.Data.Identity.Auth.Jwt/README.md index 8ef2d782..a8c3c174 100644 --- a/Api.Data.Identity.Auth.Jwt/README.md +++ b/Api.Data.Identity.Auth.Jwt/README.md @@ -75,6 +75,30 @@ Configured the application with the necessary authentication setup, in addition } ``` +...and for `Staging` and `Production` environments. + +```json +"App": { + "Authentication": { + "Jwt": { + "Issuer": "nano.staging", + "Audience": "nano.staging" + } + } +} +``` + +```json +"App": { + "Authentication": { + "Jwt": { + "Issuer": "nano.production", + "Audience": "nano.production" + } + } +} +``` + ## Kubernetes For `Staging` and `Production` environments, a `auth-jwt-secret.yaml` is also created to securely store the public and private keys, and optionally the credentials for `RootLogin` if it shoud be enabled. Below demonstrates how to map the secret containing the JWT keys. @@ -98,7 +122,7 @@ spec: ``` ## GitHub Action -The secrets defined in GitHub must also be mapped for the `Staging` and `Production` environments in the `build-and-deploy.yml` workflow, as shown below. +The secrets defined in GitHub must also be inbcluded in environmental variables for `Staging` and `Production` environments in the `build-and-deploy.yml` workflow, as shown below. ```yaml env: diff --git a/Api.Data.MySql/README.md b/Api.Data.MySql/README.md index 40778eed..6d1dd5ec 100644 --- a/Api.Data.MySql/README.md +++ b/Api.Data.MySql/README.md @@ -125,7 +125,7 @@ services: ``` ## Kubernetes -Added the `%SERVICE_NAME%-secret` for the connectionstring to the `deployment.yaml`. +Added the `auth-sql-secret.yaml` for the connectionstring to the `deployment.yaml`. ```json spec: @@ -145,6 +145,8 @@ Add the following environment variables to the `buid-and-deply.yml`. ```yaml env: + DOTNET_EF_TOOLS_VERSION: "10.0" + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} SQL_NAME: nanoDb SQL_USER: api-data-mysql-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} @@ -203,4 +205,10 @@ Additionally, this step has been added to ensure database migrations are applied echo "SQL_PORT=$env:SQL_PORT" >> $env:GITHUB_ENV; ``` -Last, an additional template has been added to the deployment for storing the application connectionstring in a Kuberntes secret. +Last, before applying the new Kubernetes templates, these environmental variables must be set. + +```powershell +$env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; +``` + +Finally, apply the templates. diff --git a/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml b/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml index eb6ac0b4..1c3f79d0 100644 --- a/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml +++ b/Api.Data.PostgreSQL/.github/workflows/build-and-deploy.yml @@ -130,7 +130,7 @@ jobs: $env:SQL_HOST = az postgres flexible-server list -g $env:AZURE_GROUP_DATABASE --query "[0].fullyQualifiedDomainName" -o tsv; $env:SQL_PORT = "5432"; $env:SQL_ADMIN_USER = az postgres flexible-server list -g $env:AZURE_GROUP_DATABASE --query "[0].username" -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Host=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Username=$env:SQL_ADMIN_USER;Password=$env:SQL_ADMIN_PASSWORD;SSL Mode=Prefer;Trust Server Certificate=true"; + $env:SQL_MIGRATION_CONNECTIONSTRING = "Host=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Username=$env:SQL_ADMIN_USER;Password=$env:SQL_ADMIN_PASSWORD;SSL Mode=Require;Trust Server Certificate=true"; $env:DATA__CONNECTIONSTRING = $env:SQL_MIGRATION_CONNECTIONSTRING; @@ -182,7 +182,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:SQL_CONNECTIONSTRING = "Host=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Username=$env:SQL_USER;Password=$env:SQL_PASSWORD;SSL Mode=Prefer;Trust Server Certificate=true"; + $env:SQL_CONNECTIONSTRING = "Host=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Username=$env:SQL_USER;Password=$env:SQL_PASSWORD;SSL Mode=Require;Trust Server Certificate=true"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Api.Data.PostgreSQL/README.md b/Api.Data.PostgreSQL/README.md index 4c6c0271..f2fa31cd 100644 --- a/Api.Data.PostgreSQL/README.md +++ b/Api.Data.PostgreSQL/README.md @@ -123,7 +123,7 @@ services: ``` ## Kubernetes -Added the `%SERVICE_NAME%-secret` for the connectionstring to the `deployment.yaml`. +Added the `auth-sql-secret.yaml` for the connectionstring to the `deployment.yaml`. ```json spec: @@ -143,6 +143,8 @@ Add the following environment variables to the `buid-and-deply.yml`. ```yaml env: + DOTNET_EF_TOOLS_VERSION: "10.0" + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} SQL_NAME: nanoDb SQL_USER: api-data-postgres-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} @@ -205,4 +207,10 @@ Additionally, this step has been added to ensure database migrations are applied echo "SQL_PORT=$env:SQL_PORT" >> $env:GITHUB_ENV; ``` -Last, an additional template has been added to the deployment for storing the application connectionstring in a Kuberntes secret. +Last, before applying the new Kubernetes templates, these environmental variables must be set. + +```powershell +$env:SQL_CONNECTIONSTRING = "Host=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Username=$env:SQL_USER;Password=$env:SQL_PASSWORD;SSL Mode=Require;Trust Server Certificate=true"; +``` + +Finally, apply the templates. diff --git a/Api.Data.SqLite/.github/workflows/build-and-deploy.yml b/Api.Data.SqLite/.github/workflows/build-and-deploy.yml index 7b111f0e..3e521bd1 100644 --- a/Api.Data.SqLite/.github/workflows/build-and-deploy.yml +++ b/Api.Data.SqLite/.github/workflows/build-and-deploy.yml @@ -13,7 +13,6 @@ env: VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' DOTNET_SDK_VERSION: "10.0" DOTNET_ASPNET_VERSION: "10.0" - DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -122,7 +121,6 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - Get-Content .kubernetes/data-storageclass.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/data-storageclass.tmp.yaml; kubectl apply -f .kubernetes/data-storageclass.tmp.yaml; if ($LastExitCode -ne 0) diff --git a/Api.Data.SqlServer/README.md b/Api.Data.SqlServer/README.md index ca45c391..4bfaafca 100644 --- a/Api.Data.SqlServer/README.md +++ b/Api.Data.SqlServer/README.md @@ -123,7 +123,7 @@ services: ``` ## Kubernetes -Added the `%SERVICE_NAME%-secret` for the connectionstring to the `deployment.yaml`. +Added the `auth-sql-secret.yaml` for the connectionstring to the `deployment.yaml`. ```json spec: @@ -143,6 +143,8 @@ Add the following environment variables to the `buid-and-deply.yml`. ```yaml env: + DOTNET_EF_TOOLS_VERSION: "10.0" + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} SQL_NAME: nanoDb SQL_USER: api-data-sqlserver-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} @@ -218,12 +220,10 @@ Additionally, this step has been added to ensure database migrations are applied echo "SQL_PORT=$env:SQL_PORT" >> $env:GITHUB_ENV; ``` -Last, the application connectionstring must be added in a secret in Kuberntes. The `Kubernetes Deploy` step has been updated with the following. +Last, before applying the new Kubernetes templates, these environmental variables must be set. -```yaml -sudo kubectl create secret generic $env:SERVICE_NAME-data-secret ` --from-literal=data-connectionstring=$env:DATA_CONNECTIONSTRING --save-config --dry-run=client -o yaml | sudo kubectl apply -f -; -if ($LastExitCode -ne 0) -{ - throw "error"; -}; +```powershell +$env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST,$env:SQL_PORT;Database=$env:SQL_NAME;User Id=$env:SQL_USER;Password=$env:SQL_PASSWORD;Encrypt=True;TrustServerCertificate=True;"; ``` + +Finally, the templates can be applied. diff --git a/Api.Eventing.RabbitMq/README.md b/Api.Eventing.RabbitMq/README.md index 6ea72306..9b00625a 100644 --- a/Api.Eventing.RabbitMq/README.md +++ b/Api.Eventing.RabbitMq/README.md @@ -157,4 +157,4 @@ spec: key: password ``` -> ⚠️ The `rabbitmq` secret is created alongside the **[Nano Azure Kubernetes Eventing](https://github.com/Nano-Core/Nano.Azure.Kubernetes/tree/master/Nano.Azure.Kubernetes.RabbitMQ)** +> ⚠️ The `rabbitmq` secret is created alongside the **[Nano.Azure.Kubernetes.RabbitMQ](https://github.com/Nano-Core/Nano.Azure.Kubernetes/tree/master/Nano.Azure.Kubernetes.RabbitMQ)** diff --git a/Api.Hosting.Https/README.md b/Api.Hosting.Https/README.md index 6190976a..37598f0e 100644 --- a/Api.Hosting.Https/README.md +++ b/Api.Hosting.Https/README.md @@ -43,6 +43,24 @@ HTTPS and the development certificate are only configured in `appsettings.Develo in Kubernetes. Certificates are managed externally, and the service only needs to expose an HTTP port in `service.yaml` for mapping traffic through the ingress, which serves HTTPS and forwards it to HTTP. +The `appsettings.json` has this configuration. + +```json +"App": { + "Hosting": { + "Root": "api", + "Http": { + "Ports": [ + 8080 + ], + "UseHttpsRedirection": false + } + } +} +``` + +and the `appsettings.Development.json` this. + ```json "App": { "Hosting": { @@ -76,11 +94,72 @@ services: ``` ## Kubernetes -A `httproute.yaml` resource has been added to the `.kubernetes` folder. +A `httproute-80.yaml` and `httproute-443.yaml` resource has been added. + +```yaml +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: %SERVICE_NAME%-route-80 + namespace: %KUBERNETES_NAMESPACE% +spec: + parentRefs: + - name: %GATEWAY_NAME% + sectionName: http + hostnames: +%ROUTE_HOST_NAMES% + rules: + - filters: + - type: RequestRedirect + requestRedirect: + scheme: https + statusCode: 301 -| File / Directory | Type | Description | -| -------------------- | ------- | -------------------------------------------- | -| `httproute.yaml` | `yaml` | The http route spec for Kubernetes Gateway. | +``` + +```yaml +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: %SERVICE_NAME%-route-443 + namespace: %KUBERNETES_NAMESPACE% +spec: + parentRefs: + - name: %GATEWAY_NAME% + hostnames: +%ROUTE_HOST_NAMES% + rules: + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - name: %SERVICE_NAME% + port: 8080 +``` ## GitHub Actions -Deployment commands have been updated to apply the new Kubernetes `HTTPRoute` template. +Add the following environment variables to the `buid-and-deply.yml`. + +```yaml +env: + SUB_DOMAIN_NAME: papi + AZURE_GROUP_DNS: ${{ vars.AZURE_RESOURCE_GROUP_DNS }} +``` + +Additionally, during the Kubernetes deployment step, before any resources are applied, all DNS zones are iterated, and the hostname configured in the `httpRoutes` resource is updated to +include the application's subdomain. + +```powershell +$zoneNames = az network dns zone list -g $env:AZURE_GROUP_DNS --query "[].name" -o json | ConvertFrom-Json + +$env:ROUTE_HOST_NAMES = ( + $zoneNames | ForEach-Object { + " - $env:SUB_DOMAIN_NAME.$_" + } +) -join "`n" + +$env:GATEWAY_NAME = kubectl get gateway -n $env:KUBERNETES_NAMESPACE -o jsonpath='{.items[0].metadata.name}' +``` + +The deployment commands have been updated to apply the new Kubernetes `HTTPRoute` templates. diff --git a/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml b/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml index 8480d5f8..d1184302 100644 --- a/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml +++ b/Api.PolicyHeaders.Cors/.github/workflows/build-and-deploy.yml @@ -35,6 +35,7 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} + CORS_ALLOWED_ORIGIN_0: web.domain.com concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true diff --git a/Api.PolicyHeaders.Cors/.kubernetes/configmap.yaml b/Api.PolicyHeaders.Cors/.kubernetes/configmap.yaml index d13013d1..2067fb4a 100644 --- a/Api.PolicyHeaders.Cors/.kubernetes/configmap.yaml +++ b/Api.PolicyHeaders.Cors/.kubernetes/configmap.yaml @@ -5,4 +5,5 @@ metadata: namespace: %KUBERNETES_NAMESPACE% data: App__Version: %VERSION% + App__HttpPolicyHeaders__Cors__AllowedOrigins__0: %CORS_ALLOWED_ORIGIN_0% ASPNETCORE_ENVIRONMENT: %ASPNETCORE_ENVIRONMENT% diff --git a/Api.Storage.Azure/Api.Storage.Azure.sln b/Api.Storage.Azure/Api.Storage.Azure.sln index a75a6568..11c3e764 100644 --- a/Api.Storage.Azure/Api.Storage.Azure.sln +++ b/Api.Storage.Azure/Api.Storage.Azure.sln @@ -22,6 +22,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".kubernetes", ".kubernetes" .kubernetes\autoscaler.yaml = .kubernetes\autoscaler.yaml .kubernetes\configmap.yaml = .kubernetes\configmap.yaml .kubernetes\deployment.yaml = .kubernetes\deployment.yaml + .kubernetes\service-account.yaml = .kubernetes\service-account.yaml .kubernetes\service.yaml = .kubernetes\service.yaml .kubernetes\storage-pv.yaml = .kubernetes\storage-pv.yaml .kubernetes\storage-pvc.yaml = .kubernetes\storage-pvc.yaml diff --git a/Api.Storage.Azure/README.md b/Api.Storage.Azure/README.md index 68c303d4..d1489d0a 100644 --- a/Api.Storage.Azure/README.md +++ b/Api.Storage.Azure/README.md @@ -25,11 +25,13 @@ This application builds on **[Api.Blank](https://github.com/Nano-Core/Nano.Lesso that inherits from the top-level Nano `BaseController`. This application demonstrates uploading a file and saving it to a mapped file share. + When running locally, files are **NOT** written to the Azure File Share. Instead, Docker mounts a local directory to simulate the file share. + Files are saved in `.docker/bin/`. -A storage health check is configured to target the Azure File Share, but it requires valid credentials to be provided under `Storage.Credentials`. If the -credentials are omitted from the configuration, the application will still run, but the health-check will report `degraded`. +A storage health check is configured to target the Azure File Share, but it requires valid credentials to be provided under `Storage.Credentials`. If the credentials are omitted +from the configuration, the application will still run, but the health-check will report `degraded`. Open [http://localhost:8080/healthz](http://localhost:8080/healthz) to view the storage health-check JSON response. @@ -87,7 +89,63 @@ services: ``` ## Kubernetes -Added two new kubernetes templaets, the `storage-pv.yaml`, `storage-pvc.yaml`, and the `service-account.yaml`. Updated the `deployment.yaml` mounting the volume. +Added three new kubernetes templaets, the `storage-pv.yaml`, `storage-pvc.yaml`, and the `service-account.yaml`. + +```yaml +apiVersion: v1 +kind: PersistentVolume +metadata: + name: %SERVICE_NAME%-azurefile-pv-%VOLUME_NAME_SUFFIX% +spec: + capacity: + storage: %STORAGE_SIZE% + accessModes: + - ReadWriteMany + persistentVolumeReclaimPolicy: Retain + storageClassName: azurefile-static + mountOptions: + - dir_mode=0777 + - file_mode=0777 + - uid=0 + - gid=0 + claimRef: + name: %SERVICE_NAME%-azurefile-pvc-%VOLUME_NAME_SUFFIX% + namespace: %KUBERNETES_NAMESPACE% + csi: + driver: file.csi.azure.com + volumeHandle: %AZURE_GROUP_STORAGE%#%STORAGE_ACCOUNT_NAME%#%STORAGE_SHARE_NAME%-%VOLUME_NAME_SUFFIX% + volumeAttributes: + shareName: %STORAGE_SHARE_NAME% + storageAccount: %STORAGE_ACCOUNT_NAME% + resourceGroup: %AZURE_GROUP_STORAGE% + clientID: %IDENTITY_CLIENT_ID% + mountWithWorkloadIdentityToken: "true" +``` + +```yaml +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: %SERVICE_NAME%-azurefile-pvc-%VOLUME_NAME_SUFFIX% + namespace: %KUBERNETES_NAMESPACE% +spec: + accessModes: + - ReadWriteMany + storageClassName: azurefile-static + resources: + requests: + storage: %STORAGE_SIZE% + volumeName: %SERVICE_NAME%-azurefile-pv-%VOLUME_NAME_SUFFIX% +``` + +Also, the `configmap.yaml` should have the share-name included. + +``` +data: + Storage__ShareName: %STORAGE_SHARE_NAME% +``` + +Updated the `deployment.yaml` mounting the volume. ```yaml spec: @@ -118,14 +176,14 @@ Azure File Share to be changed without trying to replace existing immutable reso Add the following environment variables to the `buid-and-deply.yml`. ```yaml -env: +env: AZURE_GROUP_BACKUP: ${{ vars.AZURE_RESOURCE_GROUP_BACKUP }} AZURE_GROUP_STORAGE: ${{ vars.AZURE_RESOURCE_GROUP_STORAGE }} STORAGE_SIZE: 1000 STORAGE_SHARE_NAME: nano-storage-azure ``` -And add this step below as well, ensuring that the fileshare gets created before the application is deployed. +Additionally, this step has been added to ensure the file share is created before the application is deployed. ```yaml - name: Create Fileshare @@ -228,4 +286,13 @@ And add this step below as well, ensuring that the fileshare gets created before }; echo "IDENTITY_NAME=$env:IDENTITY_NAME" >> $env:GITHUB_ENV; -``` \ No newline at end of file +``` + +Last, during the Kubernetes deployment step, before any resources are applied, environmental variables required for the new `stoerage-pv.yaml` and `stoerage-pvc.yaml` must be set. + +```powershell +$env:IDENTITY_CLIENT_ID = az identity show -g $env:AZURE_GROUP_KUBERNETES -n $env:IDENTITY_NAME --query clientId -o tsv; +$env:VOLUME_NAME_SUFFIX = $env:IDENTITY_CLIENT_ID.Substring(0, 5); +``` + +The deployment commands have been updated to apply the new Kubernetes storage templates. diff --git a/Api.Storage.Local/README.md b/Api.Storage.Local/README.md index cab69c6b..6156afb4 100644 --- a/Api.Storage.Local/README.md +++ b/Api.Storage.Local/README.md @@ -114,11 +114,3 @@ env: ``` Deployment commands have also been updated to apply each of the new Kubernetes templates. - -```powershell -Get-Content .kubernetes/{resource-name}.yaml ` - | foreach { [Environment]::ExpandEnvironmentVariables($_) } ` - | Set-Content .kubernetes/{resource-name}.tmp.yaml; - -sudo kubectl apply -f .kubernetes/{resource-name}.tmp.yaml; -``` diff --git a/Console.Data.MySql/.github/workflows/build-and-deploy.yml b/Console.Data.MySql/.github/workflows/build-and-deploy.yml index 33556fb6..d3b88685 100644 --- a/Console.Data.MySql/.github/workflows/build-and-deploy.yml +++ b/Console.Data.MySql/.github/workflows/build-and-deploy.yml @@ -159,7 +159,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; + $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; Get-Content .kubernetes/sql-auth-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/sql-auth-secret.tmp.yaml; kubectl apply -f .kubernetes/sql-auth-secret.tmp.yaml; diff --git a/Console.Data.MySql/README.md b/Console.Data.MySql/README.md index b00788d1..d19e08da 100644 --- a/Console.Data.MySql/README.md +++ b/Console.Data.MySql/README.md @@ -107,7 +107,7 @@ services: ``` ## Kubernetes -Added the `%SERVICE_NAME%-secret` for the connectionstring to the `cronjob.yaml`. +Added the `auth-sql-secret.yaml` for the connectionstring to the `cronjob.yaml`. ```json spec: @@ -129,6 +129,8 @@ Add the following environment variables to the `buid-and-deply.yml`. ```yaml env: + DOTNET_EF_TOOLS_VERSION: "10.0" + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} SQL_NAME: nanoDb SQL_USER: api-data-mysql-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} @@ -187,5 +189,10 @@ Additionally, this step has been added to ensure database migrations are applied echo "SQL_PORT=$env:SQL_PORT" >> $env:GITHUB_ENV; ``` -Last, an additional template has been added to the deployment for storing the application connectionstring in a Kuberntes secret. +Last, before applying the new Kubernetes templates, these environmental variables must be set. +```powershell +$env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Required"; +``` + +Finally, apply the templates. diff --git a/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml b/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml index 9f9e0b82..c59d2ef8 100644 --- a/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml +++ b/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml @@ -114,7 +114,7 @@ jobs: $env:SQL_HOST = az postgres flexible-server list -g $env:AZURE_GROUP_DATABASE --query "[0].fullyQualifiedDomainName" -o tsv; $env:SQL_PORT = "5432"; $env:SQL_ADMIN_USER = az postgres flexible-server list -g $env:AZURE_GROUP_DATABASE --query "[0].username" -o tsv; - $env:SQL_MIGRATION_CONNECTIONSTRING = "Host=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Username=$env:SQL_ADMIN_USER;Password=$env:SQL_ADMIN_PASSWORD;SSL Mode=Prefer;Trust Server Certificate=true"; + $env:SQL_MIGRATION_CONNECTIONSTRING = "Host=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Username=$env:SQL_ADMIN_USER;Password=$env:SQL_ADMIN_PASSWORD;SSL Mode=Require;Trust Server Certificate=true"; $env:DATA__CONNECTIONSTRING = $env:SQL_MIGRATION_CONNECTIONSTRING; @@ -163,7 +163,7 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | - $env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Uid=$env:SQL_USER;Pwd=$env:SQL_PASSWORD;SslMode=Preferred"; + $env:SQL_CONNECTIONSTRING = "Host=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Username=$env:SQL_USER;Password=$env:SQL_PASSWORD;SSL Mode=Require;Trust Server Certificate=true"; Get-Content .kubernetes/auth-sql-secret.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/auth-sql-secret.tmp.yaml; kubectl apply -f .kubernetes/auth-sql-secret.tmp.yaml; diff --git a/Console.Data.PostgreSQL/README.md b/Console.Data.PostgreSQL/README.md index a249d0d0..963e46ba 100644 --- a/Console.Data.PostgreSQL/README.md +++ b/Console.Data.PostgreSQL/README.md @@ -105,7 +105,7 @@ services: ``` ## Kubernetes -Added the `%SERVICE_NAME%-secret` for the connectionstring to the `cronjob.yaml`. +Added the `auth-sql-secret.yaml` for the connectionstring to the `cronjob.yaml`. ```json spec: @@ -125,6 +125,8 @@ Add the following environment variables to the `buid-and-deply.yml`. ```yaml env: + DOTNET_EF_TOOLS_VERSION: "10.0" + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} SQL_NAME: nanoDb SQL_USER: api-data-postgres-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} @@ -187,4 +189,10 @@ Additionally, this step has been added to ensure database migrations are applied echo "SQL_PORT=$env:SQL_PORT" >> $env:GITHUB_ENV; ``` -Last, an additional template has been added to the deployment for storing the application connectionstring in a Kuberntes secret. +Last, before applying the new Kubernetes templates, these environmental variables must be set. + +```powershell +$env:SQL_CONNECTIONSTRING = "Host=$env:SQL_HOST;Port=$env:SQL_PORT;Database=$env:SQL_NAME;Username=$env:SQL_USER;Password=$env:SQL_PASSWORD;SSL Mode=Require;Trust Server Certificate=true"; +``` + +Finally, apply the templates. diff --git a/Console.Data.SqLite/.github/workflows/build-and-deploy.yml b/Console.Data.SqLite/.github/workflows/build-and-deploy.yml index fdfaa1dc..3abf9e16 100644 --- a/Console.Data.SqLite/.github/workflows/build-and-deploy.yml +++ b/Console.Data.SqLite/.github/workflows/build-and-deploy.yml @@ -14,7 +14,6 @@ env: VERSION: '${{ vars.VERSION }}.${{ github.run_number }}.${{ github.run_attempt }}' DOTNET_SDK_VERSION: "10.0" DOTNET_ASPNET_VERSION: "10.0" - DOTNET_EF_TOOLS_VERSION: "10.0" AZURE_GROUP_KUBERNETES: ${{ vars.AZURE_RESOURCE_GROUP_KUBERNETES }} AZURE_GROUP_DELIVERY: ${{ vars.AZURE_RESOURCE_GROUP_DELIVERY }} AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} diff --git a/Console.Data.SqLite/.kubernetes/data-pvc.yaml b/Console.Data.SqLite/.kubernetes/data-pvc.yaml index 00bca640..f3a52c3c 100644 --- a/Console.Data.SqLite/.kubernetes/data-pvc.yaml +++ b/Console.Data.SqLite/.kubernetes/data-pvc.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: %SERVICE_NAME%-data-pvc + namespace: %KUBERNETES_NAMESPACE% spec: accessModes: - ReadWriteOnce diff --git a/Console.Data.SqLite/README.md b/Console.Data.SqLite/README.md index 5733e80a..69fd89ca 100644 --- a/Console.Data.SqLite/README.md +++ b/Console.Data.SqLite/README.md @@ -87,7 +87,7 @@ services: ``` ## Kubernetes -Added two additional kubernetes templates, `storageclass.yaml` and `pvc.yaml`, for dynamically manage and creating the disk for the SqLite database. +Added two additional kubernetes templates, `data-storageclass.yaml` and `data-pvc.yaml`, for dynamically manage and creating the disk for the SqLite database. Also, updated `cronjob.yaml` adding the volumes and volume mounts. diff --git a/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml b/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml index 82ea8afd..ec47cb42 100644 --- a/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml +++ b/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml @@ -33,11 +33,11 @@ env: KUBERNETES_CPU_REQUEST: 50m KUBERNETES_CPU_LIMIT: 150m KUBERNETES_CRONJOB_SCHEDULE: "0 * * * *" - DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} SQL_NAME: nanoDb SQL_USER: api-data-sqlserver-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} SQL_ADMIN_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SQL_ADMIN_PASSWORD || secrets.STAGING_SQL_ADMIN_PASSWORD }} + DOTNET_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true diff --git a/Console.Data.SqlServer/README.md b/Console.Data.SqlServer/README.md index a08e87c6..cb9b51ec 100644 --- a/Console.Data.SqlServer/README.md +++ b/Console.Data.SqlServer/README.md @@ -104,7 +104,7 @@ services: ``` ## Kubernetes -Added the `%SERVICE_NAME%-secret` for the connectionstring to the `cronjob.yaml`. +Added the `auth-sql-secret.yaml` for the connectionstring to the `cronjob.yaml`. ```json spec: @@ -126,6 +126,8 @@ Add the following environment variables to the `buid-and-deply.yml`. ```yaml env: + DOTNET_EF_TOOLS_VERSION: "10.0" + AZURE_GROUP_DATABASE : ${{ vars.AZURE_RESOURCE_GROUP_DATABASE }} SQL_NAME: nanoDb SQL_USER: api-data-sqlserver-user SQL_PASSWORD: ${{ github.ref == 'refs/heads/master' && secrets.PRODUCTION_SQL_NANO_DB_PASSWORD || secrets.STAGING_SQL_NANO_DB_PASSWORD }} @@ -201,4 +203,10 @@ Additionally, this step has been added to ensure database migrations are applied echo "SQL_PORT=$env:SQL_PORT" >> $env:GITHUB_ENV; ``` -Last, an additional template has been added to the deployment for storing the application connectionstring in a Kuberntes secret. +Last, before applying the new Kubernetes templates, these environmental variables must be set. + +```powershell +$env:SQL_CONNECTIONSTRING = "Server=$env:SQL_HOST,$env:SQL_PORT;Database=$env:SQL_NAME;User Id=$env:SQL_USER;Password=$env:SQL_PASSWORD;Encrypt=True;TrustServerCertificate=True;"; +``` + +Finally, the templates can be applied. diff --git a/Console.Storage.Azure/Console.Storage.Azure.sln b/Console.Storage.Azure/Console.Storage.Azure.sln index 63806ffa..3d54515f 100644 --- a/Console.Storage.Azure/Console.Storage.Azure.sln +++ b/Console.Storage.Azure/Console.Storage.Azure.sln @@ -21,6 +21,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".kubernetes", ".kubernetes" ProjectSection(SolutionItems) = preProject .kubernetes\configmap.yaml = .kubernetes\configmap.yaml .kubernetes\cronjob.yaml = .kubernetes\cronjob.yaml + .kubernetes\service-account.yaml = .kubernetes\service-account.yaml .kubernetes\storage-pv.yaml = .kubernetes\storage-pv.yaml .kubernetes\storage-pvc.yaml = .kubernetes\storage-pvc.yaml EndProjectSection diff --git a/Console.Storage.Azure/README.md b/Console.Storage.Azure/README.md index 99c5bf4f..b3bfe794 100644 --- a/Console.Storage.Azure/README.md +++ b/Console.Storage.Azure/README.md @@ -59,7 +59,63 @@ services: ``` ## Kubernetes -Added two new kubernetes templaets, the `storage-pv.yaml`, `storage-pvc.yaml`, and the `service-account.yaml`. Updated the `cronjob.yaml` mounting the volume. +Added three new kubernetes templaets, the `storage-pv.yaml`, `storage-pvc.yaml`, and the `service-account.yaml`. + +```yaml +apiVersion: v1 +kind: PersistentVolume +metadata: + name: %SERVICE_NAME%-azurefile-pv-%VOLUME_NAME_SUFFIX% +spec: + capacity: + storage: %STORAGE_SIZE% + accessModes: + - ReadWriteMany + persistentVolumeReclaimPolicy: Retain + storageClassName: azurefile-static + mountOptions: + - dir_mode=0777 + - file_mode=0777 + - uid=0 + - gid=0 + claimRef: + name: %SERVICE_NAME%-azurefile-pvc-%VOLUME_NAME_SUFFIX% + namespace: %KUBERNETES_NAMESPACE% + csi: + driver: file.csi.azure.com + volumeHandle: %AZURE_GROUP_STORAGE%#%STORAGE_ACCOUNT_NAME%#%STORAGE_SHARE_NAME%-%VOLUME_NAME_SUFFIX% + volumeAttributes: + shareName: %STORAGE_SHARE_NAME% + storageAccount: %STORAGE_ACCOUNT_NAME% + resourceGroup: %AZURE_GROUP_STORAGE% + clientID: %IDENTITY_CLIENT_ID% + mountWithWorkloadIdentityToken: "true" +``` + +```yaml +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: %SERVICE_NAME%-azurefile-pvc-%VOLUME_NAME_SUFFIX% + namespace: %KUBERNETES_NAMESPACE% +spec: + accessModes: + - ReadWriteMany + storageClassName: azurefile-static + resources: + requests: + storage: %STORAGE_SIZE% + volumeName: %SERVICE_NAME%-azurefile-pv-%VOLUME_NAME_SUFFIX% +``` + +Also, the `configmap.yaml` should have the share-name included. + +``` +data: + Storage__ShareName: %STORAGE_SHARE_NAME% +``` + +Updated the `cronjob.yaml` mounting the volume. ```yaml spec: @@ -202,5 +258,13 @@ Additionally, this step has been added to ensure the file share is created befor }; echo "IDENTITY_NAME=$env:IDENTITY_NAME" >> $env:GITHUB_ENV; +``` +Last, during the Kubernetes deployment step, before any resources are applied, environmental variables required for the new `stoerage-pv.yaml` and `stoerage-pvc.yaml` must be set. + +```powershell +$env:IDENTITY_CLIENT_ID = az identity show -g $env:AZURE_GROUP_KUBERNETES -n $env:IDENTITY_NAME --query clientId -o tsv; +$env:VOLUME_NAME_SUFFIX = $env:IDENTITY_CLIENT_ID.Substring(0, 5); ``` + +The deployment commands have been updated to apply the new Kubernetes storage templates. diff --git a/Console.Storage.Local/.kubernetes/cronjob.yaml b/Console.Storage.Local/.kubernetes/cronjob.yaml index f79adc21..fc8e61fe 100644 --- a/Console.Storage.Local/.kubernetes/cronjob.yaml +++ b/Console.Storage.Local/.kubernetes/cronjob.yaml @@ -51,10 +51,9 @@ spec: mountPath: /mnt/%STORAGE_SHARE_NAME% - name: tmp mountPath: /tmp - restartPolicy: OnFailure volumes: - - name: %STORAGE_SHARE_NAME% - emptyDir: {} + - name: %SERVICE_NAME%-volume + persistentVolumeClaim: + claimName: %SERVICE_NAME%-pvc - name: tmp emptyDir: {} - diff --git a/Console.Storage.Local/README.md b/Console.Storage.Local/README.md index 06edf046..4e93cfd3 100644 --- a/Console.Storage.Local/README.md +++ b/Console.Storage.Local/README.md @@ -64,20 +64,22 @@ Also, updated `cronjob.yaml` adding the volumes and volume mounts. ```yaml spec: - template: + jobTemplate: spec: - containers: - volumeMounts: - - name: %SERVICE_NAME%-volume - mountPath: /mnt/%STORAGE_SHARE_NAME% - - name: tmp - mountPath: /tmp - volumes: - - name: %SERVICE_NAME%-volume - persistentVolumeClaim: - claimName: %SERVICE_NAME%-pvc - - name: tmp - emptyDir: {} + template: + spec: + containers: + volumeMounts: + - name: %SERVICE_NAME%-volume + mountPath: /mnt/%STORAGE_SHARE_NAME% + - name: tmp + mountPath: /tmp + volumes: + - name: %SERVICE_NAME%-volume + persistentVolumeClaim: + claimName: %SERVICE_NAME%-pvc + - name: tmp + emptyDir: {} ``` ## GitHub Actions @@ -90,11 +92,3 @@ env: ``` Deployment commands have also been updated to apply each of the new Kubernetes templates. - -```powershell -Get-Content .kubernetes/{resource-name}.yaml ` - | foreach { [Environment]::ExpandEnvironmentVariables($_) } ` - | Set-Content .kubernetes/{resource-name}.tmp.yaml; - -sudo kubectl apply -f .kubernetes/{resource-name}.tmp.yaml; -``` From a982851fb5e7ba2a8b5adb277afa76129ee5a477 Mon Sep 17 00:00:00 2001 From: vivet Date: Tue, 14 Jul 2026 16:21:11 +0200 Subject: [PATCH 30/33] Updated --- Api.HealthChecks/.docker/docker-compose.yml | 3 + .../.github/workflows/build-and-deploy.yml | 26 +++- .../.kubernetes/httproute-443.yaml | 18 +++ .../.kubernetes/httproute-80.yaml | 17 +++ Api.HealthChecks/Api.HealthChecks.sln | 3 + .../appsettings.Development.json | 17 +++ Api.HealthChecks/README.md | 131 +++++++++++------- Api.HealthChecks/localhost.pfx | Bin 0 -> 2670 bytes 8 files changed, 160 insertions(+), 55 deletions(-) create mode 100644 Api.HealthChecks/.kubernetes/httproute-443.yaml create mode 100644 Api.HealthChecks/.kubernetes/httproute-80.yaml create mode 100644 Api.HealthChecks/localhost.pfx diff --git a/Api.HealthChecks/.docker/docker-compose.yml b/Api.HealthChecks/.docker/docker-compose.yml index dc34bde1..550a4254 100644 --- a/Api.HealthChecks/.docker/docker-compose.yml +++ b/Api.HealthChecks/.docker/docker-compose.yml @@ -5,9 +5,12 @@ services: restart: on-failure ports: - 8080:8080 + - 4443:4443 build: context: ../Api.HealthChecks dockerfile: "Dockerfile.Local" + volumes: + - ../:/root/.dotnet/https networks: - network diff --git a/Api.HealthChecks/.github/workflows/build-and-deploy.yml b/Api.HealthChecks/.github/workflows/build-and-deploy.yml index ae4004c1..67e919e4 100644 --- a/Api.HealthChecks/.github/workflows/build-and-deploy.yml +++ b/Api.HealthChecks/.github/workflows/build-and-deploy.yml @@ -37,8 +37,6 @@ env: KUBERNETES_CPU_LIMIT: 600m KUBERNETES_CPU_SCALING: 180 ASPNETCORE_ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} - AVAILABILITY_URI: ${{ github.ref == 'refs/heads/main' && format('https://{0}/healthz', secrets.PRODUCTION_HOST) || format('https://{0}/healthz', secrets.STAGING_HOST) }} - AVAILABILITY_CHECK_FREQUENCY: 300 concurrency: group: ${{ github.workflow }}-${{ github.repository }} cancel-in-progress: true @@ -125,6 +123,16 @@ jobs: - name: Kubernetes Deploy shell: pwsh run: | + $zoneNames = az network dns zone list -g $env:AZURE_GROUP_DNS --query "[].name" -o json | ConvertFrom-Json + + $env:ROUTE_HOST_NAMES = ( + $zoneNames | ForEach-Object { + " - $env:SUB_DOMAIN_NAME.$_" + } + ) -join "`n" + + $env:GATEWAY_NAME = kubectl get gateway -n $env:KUBERNETES_NAMESPACE -o jsonpath='{.items[0].metadata.name}' + Get-Content .kubernetes/service.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/service.tmp.yaml; kubectl apply -f .kubernetes/service.tmp.yaml; if ($LastExitCode -ne 0) @@ -153,6 +161,20 @@ jobs: throw "error"; }; + Get-Content .kubernetes/httproute-80.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/httproute-80.tmp.yaml; + kubectl apply -f .kubernetes/httproute-80.tmp.yaml; + if ($LastExitCode -ne 0) + { + throw "error"; + } + + Get-Content .kubernetes/httproute-443.yaml | foreach { [Environment]::ExpandEnvironmentVariables($_) } | Set-Content .kubernetes/httproute-443.tmp.yaml; + kubectl apply -f .kubernetes/httproute-443.tmp.yaml; + if ($LastExitCode -ne 0) + { + throw "error"; + } + - name: Add Availability Check shell: pwsh run: | diff --git a/Api.HealthChecks/.kubernetes/httproute-443.yaml b/Api.HealthChecks/.kubernetes/httproute-443.yaml new file mode 100644 index 00000000..25060955 --- /dev/null +++ b/Api.HealthChecks/.kubernetes/httproute-443.yaml @@ -0,0 +1,18 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: %SERVICE_NAME%-route-443 + namespace: %KUBERNETES_NAMESPACE% +spec: + parentRefs: + - name: %GATEWAY_NAME% + hostnames: +%ROUTE_HOST_NAMES% + rules: + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - name: %SERVICE_NAME% + port: 8080 \ No newline at end of file diff --git a/Api.HealthChecks/.kubernetes/httproute-80.yaml b/Api.HealthChecks/.kubernetes/httproute-80.yaml new file mode 100644 index 00000000..e743bb46 --- /dev/null +++ b/Api.HealthChecks/.kubernetes/httproute-80.yaml @@ -0,0 +1,17 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: %SERVICE_NAME%-route-80 + namespace: %KUBERNETES_NAMESPACE% +spec: + parentRefs: + - name: %GATEWAY_NAME% + sectionName: http + hostnames: +%ROUTE_HOST_NAMES% + rules: + - filters: + - type: RequestRedirect + requestRedirect: + scheme: https + statusCode: 301 \ No newline at end of file diff --git a/Api.HealthChecks/Api.HealthChecks.sln b/Api.HealthChecks/Api.HealthChecks.sln index 50d5122c..b0f55d32 100644 --- a/Api.HealthChecks/Api.HealthChecks.sln +++ b/Api.HealthChecks/Api.HealthChecks.sln @@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".solution", ".solution", "{ Dockerfile = Dockerfile icon.png = icon.png LICENSE = LICENSE + localhost.pfx = localhost.pfx README.md = README.md EndProjectSection EndProject @@ -22,6 +23,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".kubernetes", ".kubernetes" .kubernetes\autoscaler.yaml = .kubernetes\autoscaler.yaml .kubernetes\configmap.yaml = .kubernetes\configmap.yaml .kubernetes\deployment.yaml = .kubernetes\deployment.yaml + .kubernetes\httproute-443.yaml = .kubernetes\httproute-443.yaml + .kubernetes\httproute-80.yaml = .kubernetes\httproute-80.yaml .kubernetes\service.yaml = .kubernetes\service.yaml EndProjectSection EndProject diff --git a/Api.HealthChecks/Api.HealthChecks/appsettings.Development.json b/Api.HealthChecks/Api.HealthChecks/appsettings.Development.json index 8593c62d..c298b7e5 100644 --- a/Api.HealthChecks/Api.HealthChecks/appsettings.Development.json +++ b/Api.HealthChecks/Api.HealthChecks/appsettings.Development.json @@ -1,2 +1,19 @@ { + "App": { + "Hosting": { + "Http": { + "UseHttpsRedirection": true + }, + "Https": { + "Ports": [ + 4443 + ], + "Certificate": { + "Path": "/root/.dotnet/https/localhost.pfx", + "Password": "password" + }, + "UseHttpsRequired": true + } + } + } } \ No newline at end of file diff --git a/Api.HealthChecks/README.md b/Api.HealthChecks/README.md index 5a7ce516..0720ecca 100644 --- a/Api.HealthChecks/README.md +++ b/Api.HealthChecks/README.md @@ -18,7 +18,7 @@ Nano is referenced directly from source (not via NuGet packages) and is expected * [GitHub Actions](#gitHub-actions) ## Summary -This application builds on **[Api.Blank](https://github.com/Nano-Core/Nano.Lessons/tree/master/Api._Blank)** and adds a simple test controller +This application builds on **[Api.Hosting.Https](https://github.com/Nano-Core/Nano.Lessons/tree/master/Api.Hosting.Https)** and adds a simple test controller that inherits from the top-level Nano `BaseController`. This example illustrates the use of Nano API health-checks. @@ -46,79 +46,104 @@ There is no configuration for HealtCheck, the section has just been added to ena ## GitHub Actions Optionally, you can configure an availability check in Azure using Application Insights to continuously monitor your application's health and responsiveness. -> ⚠️ This requires the application to be exposed publicly from Kubernetes via an `ingress` configuration. +> ⚠️ This requires the application to be exposed publicly from Kubernetes via an `httproute` configuration. -Add the following environment variables. +First, add the following environment variables. ```yaml env: - AVAILABILITY_URI: ${{ github.ref == 'refs/heads/master' && format('https://{0}/healthz', secrets.PRODUCTION_HOST) || format('https://{0}/healthz', secrets.STAGING_HOST) }} - AVAILABILITY_CHECK_FREQUENCY: 300 + AZURE_GROUP_LOGS: ${{ vars.AZURE_RESOURCE_GROUP_LOGS }} ``` -...and then add the `Add Availability Check` step to the action pipeline. +And then the Availability Check step to the end of the pipeline. ```yaml - name: Add Availability Check shell: pwsh run: | - az extension add -n application-insights; + $env:AZURE_LOCATION = az monitor log-analytics workspace list -g $env:AZURE_GROUP_LOGS --query [0].location -o tsv; + $env:APPLICATION_INSIGHT_ID = az monitor app-insights component show -g $env:AZURE_GROUP_LOGS --query [0].id -o tsv; + $env:HIDDEN_LINK = 'hidden-link:' + $env:APPLICATION_INSIGHT_ID + '=Resource'; - $env:SERVICE_NAME_INSIGTHS = $env:SERVICE_NAME + "-insights"; - $env:APPLICATION_INSIGHT_ID = az monitor app-insights component show --query "[?contains(name, '$env:SERVICE_NAME_INSIGTHS')].[id]" -o tsv; + $zoneNames = az network dns zone list -g $env:AZURE_GROUP_DNS --query "[].name" -o json | ConvertFrom-Json - if ([string]::IsNullOrEmpty($env:APPLICATION_INSIGHT_ID)) + foreach ($zoneName in $zoneNames) { - $env:WORKSPACE_ID = az monitor log-analytics workspace list --query "[?contains(name, 'log-analytics')].[id]" -o tsv; + $env:WEB_TEST_NAME = $env:SERVICE_NAME + '-availability-' + $env:ASPNETCORE_ENVIRONMENT.ToLower() + '-' + $env:SUB_DOMAIN_NAME + '-' + ($zoneName.TrimEnd('.') -replace '\.', '-') - if (-not [string]::IsNullOrEmpty($env:WORKSPACE_ID)) + az monitor app-insights web-test show -g $env:AZURE_GROUP_LOGS -n $env:WEB_TEST_NAME --query id -o tsv 2>$null + + if ($LastExitCode -ne 0) { - $env:APPLICATION_INSIGHT_ID = az monitor app-insights component create ` - -a $env:SERVICE_NAME_INSIGTHS ` + az monitor app-insights web-test create ` + -n $env:WEB_TEST_NAME ` + --defined-web-test-name $env:WEB_TEST_NAME ` + -g $env:AZURE_GROUP_LOGS ` -l $env:AZURE_LOCATION ` - -g $env:AZURE_GROUP ` - --workspace $env:WORKSPACE_ID ` - --query "[id]" -o tsv; + --kind ping ` + --web-test-kind standard ` + --frequency 300 ` + --enabled true ` + --retry-enabled true ` + --ssl-check true ` + --ssl-lifetime-check 30 ` + --http-verb GET ` + --request-url https://$env:SUB_DOMAIN_NAME.$zoneName/healthz ` + --expected-status-code 200 ` + --content-validation content-match='"status":"unhealthy"' ignore-case=true pass-if-text-found=false ` + --tags $env:HIDDEN_LINK ` + --locations Id='us-ca-sjc-azr' ` + --locations Id='us-va-ash-azr' ` + --locations Id='emea-gb-db3-azr' ` + --locations Id='emea-nl-ams-azr' ` + --locations Id='apac-hk-hkn-azr'; if ($LastExitCode -ne 0) - { + { throw "error"; - }; + } } - }; - $env:SERVICE_NAME_AVAILABILITY = $env:SERVICE_NAME + '-availability-' + $env:ASPNETCORE_ENVIRONMENT.ToLower(); - $env:AVAILABILITY_ID = az monitor app-insights web-test list -g $env:AZURE_GROUP --query "[?contains(name, '$env:SERVICE_NAME_AVAILABILITY')].[id]" -o tsv; + $env:WEB_TEST_ALERT_NAME = $env:WEB_TEST_NAME + "-alert"; - if ([string]::IsNullOrEmpty($env:AVAILABILITY_ID)) - { - $env:APPLICATION_INSIGHT_HIDDEN_LINK = 'hidden-link:' + $env:APPLICATION_INSIGHT_ID + '=Resource'; - az monitor app-insights web-test create ` - -n $env:SERVICE_NAME_AVAILABILITY ` - --defined-web-test-name $env:SERVICE_NAME_AVAILABILITY ` - -g $env:AZURE_GROUP ` - -l $env:AZURE_LOCATION ` - --kind multistep ` - --web-test-kind standard ` - --frequency $env:AVAILABILITY_CHECK_FREQUENCY ` - --enabled true ` - --retry-enabled true ` - --ssl-check true ` - --ssl-lifetime-check 30 ` - --http-verb GET ` - --request-url $env:AVAILABILITY_URI ` - --expected-status-code 200 ` - --content-validation content-match='\"status\":\"unhealthy\"' ignore-case=true pass-if-text-found=false ` - --tags $env:APPLICATION_INSIGHT_HIDDEN_LINK ` - --locations Id='us-ca-sjc-azr' ` - --locations Id='us-va-ash-azr' ` - --locations Id='emea-gb-db3-azr' ` - --locations Id='emea-nl-ams-azr' ` - --locations Id='apac-hk-hkn-azr'; - }; - - if ($LastExitCode -ne 0) - { - throw "error"; - }; + az resource show -g $env:AZURE_GROUP_LOGS -n $env:WEB_TEST_ALERT_NAME --query id -o tsv 2>$null; + + if ($LastExitCode -ne 0) + { + $env:WEB_TEST_ID = az monitor app-insights web-test show -g $env:AZURE_GROUP_LOGS -n $env:WEB_TEST_NAME --query id -o tsv; + $env:ACTION_GROUP_ID = az monitor action-group list -g $env:AZURE_GROUP_LOGS --query [0].id -o tsv; + + $alertRuleProperties = @{ + severity = 1 + enabled = $true + scopes = @($env:WEB_TEST_ID, $env:APPLICATION_INSIGHT_ID) + evaluationFrequency = "PT1M" + windowSize = "PT5M" + criteria = @{ + "odata.type" = "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria" + webTestId = $env:WEB_TEST_ID + componentId = $env:APPLICATION_INSIGHT_ID + failedLocationCount = 2 + } + actions = @( + @{ actionGroupId = $env:ACTION_GROUP_ID } + ) + } + + $json = $alertRuleProperties | ConvertTo-Json -Depth 10 + [System.IO.File]::WriteAllText("$PWD/alert.json", $json, [System.Text.UTF8Encoding]::new($false)) + + az resource create ` + -g $env:AZURE_GROUP_LOGS ` + -n $env:WEB_TEST_ALERT_NAME ` + -l global ` + --resource-type "Microsoft.Insights/metricAlerts" ` + -p '@alert.json'; + + if ($LastExitCode -ne 0) + { + throw "error"; + } + } + } ``` diff --git a/Api.HealthChecks/localhost.pfx b/Api.HealthChecks/localhost.pfx new file mode 100644 index 0000000000000000000000000000000000000000..22e513ca387345ac6291cb37fdd80bff95afb4d5 GIT binary patch literal 2670 zcmZWpc{tQ-8~)8=WI3T349UJ7GcwjJ$r1@MqfnByK_tsqvQ#p*kY(&!Wf}X{gd(yh zNwQ1UFd|#lQ?}-`UAua z$|bV$LW!(!2F-yX!hrvgm^PtArZo(aX_-+}7~9`d?5rSgE)jZwAwp>w0T}ClX@>bx z=nc*HCI7IQg7EC^xSi` zsh$H1d#kBqFmjWWI+-2xxn^#;s{h@=q|gCJluh!Pw-eF_rONGd>@q%yRn;^mZCTyH z*26kLB~H(0Gltgp(KQ$%ReX5$MPV|ll+XnthXCJTu5OoY{BHBm;#hnsKKBV=>#UW( zw9u6%l~Y{zB6m1YW!#!8NH}K$HJ#LP56kX~i&#nl;g4?eTu|T5!LHTwh8tY=Fs`VJ zb?Kxr?SFiU}Y`8lk86mUVIXpbkK>-+JC=Sxm5NdCHSUJB9?q^`1W$(T{e%-snnLx zO5KFchJfr5BjyAhN`p*`Cn}tcx?F8dLPCt^q(5s31yMEkbPEIK@Lw&ir>&Z2`q-wl zsD#)0*SO7b`fch(ik40~$PF0sZ8ORKn)g1o-Cm@#iT>(QQpJ5KFUXRg^x#G#*X6|m<`(ti3*x=1Irq*+c~4co zhg&IdsQbaA#xqvwW4!hQBgM~LU$Mz?+!FlDw0~TE-vl|>QEfu9#B}lVh}7Jtn*>s8 zUite2{w1sx$`Sn77XkblNLmyO>9Wg`cG$9a@=J@_yYq+=3~Vc3i@hh zyOd^KWC)u`e}#0o-@~g9aB*BGD>6=28;^pqkU~RdyL49)8clm_LR$9`H(*<`1hj^puHQE**9*~Rr zP7F<6xLme0%N@}V9e-&zZGAGMquzRzj@s6Nq>e1o^dBIGM)LK|1-mK ziIDFYB4h^)0vN~IzY6I8gMYV&N7=G*zUNo)-zP#^9qzR+c}J`)@L93Ef)2ggDdaPt2vGBzc#BZji$}jwpm#Q9fhD0G_ zc^f?)UD%4YpDolwcijh{oBf$9SdsXb?!|Vh94_d?1huw78#Qy9{q$8kj*n5)Gx-y~ zI>u&v8yPirA>_{8I5{~*nAv1eYvW=%WuTr?4qJvLq({*o%UocV@azU zaj#1h@79FpSMQXeUpIR@rrR-({nWx~rg713#k}io_ci}izM<*Msjx9|Wc+%AWJ`o9 zCor5Ft`j@hX0kn!C|SDwz0Rdn@fJZ5n0j{#;Ov89Y|K7Z)K;D&e%IjJ6hgscs2mU? z4lcMUldRVglWq#X|1w*_)hYf|(T2tMJbFA@0mWl2g7p+`E)%Qt+QMGrU(TW{i4GV{ zNuq$7Akx)fe%(L%QL?OOyk;cW>C<14EelmK%;(%Z^Y;dV%TVeb`gqT~v}Vh<8VfNT zuD%zUiKq4)ES6q{KP>u@xhSACOzh0Um_n5r^mf!b;NRp@BCEsJ?+91qD)st+j%660 z(1BQUcja)n>L?u&njV8?3}i}NZcIL;q?$2^hxIc9M4wfP>JFDr~B zlFM12@c=`XoS`I#BlPcoXX+O92^}>IGF4_@x4g58cDh(M_wJ8Yf>Zt7hj5kx*M4np zBYPGkvA7R+9y~ct2aFPL6XY*=IBiHxZM9E#bC{=@y1B-^?nT{R>SICc_Pa^H9yXaN zx^)GLrI8cGy&4C+lS4OXyApuLe%%)A)e z;_kiFYvU@$P1zo6JC#xI*t00gYZ_`A(3PUlCvjpo!mOJQ`ttv(TLjkw88@WD8J zGXOvp&EDt*dGwraDSfD?Y-7!8aNh8f0$Itl^vLlKjgUEXXr83t@WQ$-mF8yZgtQ%j+U>*9qY?V|RtA{s6P QtUG7zSmhZ)eg(jP05{mZ`~Uy| literal 0 HcmV?d00001 From d7ae4bbd2b75d8de969839afe238d3b7f4f5ad3a Mon Sep 17 00:00:00 2001 From: vivet Date: Tue, 14 Jul 2026 18:43:25 +0200 Subject: [PATCH 31/33] Updated --- .../.github/workflows/build-and-deploy.yml | 1 + Console.CustomService/.github/workflows/build-and-deploy.yml | 1 + Console.Data.InMemory/.github/workflows/build-and-deploy.yml | 1 + Console.Data.MySql/.github/workflows/build-and-deploy.yml | 1 + Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml | 1 + Console.Data.SqLite/.github/workflows/build-and-deploy.yml | 1 + Console.Data.SqlServer/.github/workflows/build-and-deploy.yml | 1 + Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml | 1 + Console.ExceptionHandling/.github/workflows/build-and-deploy.yml | 1 + Console.Localization/.github/workflows/build-and-deploy.yml | 1 + Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml | 1 + Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml | 1 + Console.Logging.NLog/.github/workflows/build-and-deploy.yml | 1 + Console.Logging.Serilog/.github/workflows/build-and-deploy.yml | 1 + Console.StartupTasks/.github/workflows/build-and-deploy.yml | 1 + Console.Storage.Azure/.github/workflows/build-and-deploy.yml | 1 + Console.Storage.Local/.github/workflows/build-and-deploy.yml | 1 + Console.Workers/.github/workflows/build-and-deploy.yml | 1 + Console._Blank/.github/workflows/build-and-deploy.yml | 1 + 19 files changed, 19 insertions(+) diff --git a/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml b/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml index 8ca85f69..96bdd122 100644 --- a/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml +++ b/Console.CustomConfigSection/.github/workflows/build-and-deploy.yml @@ -42,6 +42,7 @@ jobs: - linux - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: + packages: read contents: write steps: - uses: actions/checkout@v6 diff --git a/Console.CustomService/.github/workflows/build-and-deploy.yml b/Console.CustomService/.github/workflows/build-and-deploy.yml index 92220184..2fbe6222 100644 --- a/Console.CustomService/.github/workflows/build-and-deploy.yml +++ b/Console.CustomService/.github/workflows/build-and-deploy.yml @@ -42,6 +42,7 @@ jobs: - linux - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: + packages: read contents: write steps: - uses: actions/checkout@v6 diff --git a/Console.Data.InMemory/.github/workflows/build-and-deploy.yml b/Console.Data.InMemory/.github/workflows/build-and-deploy.yml index b0f0fcbf..62befd94 100644 --- a/Console.Data.InMemory/.github/workflows/build-and-deploy.yml +++ b/Console.Data.InMemory/.github/workflows/build-and-deploy.yml @@ -43,6 +43,7 @@ jobs: - linux - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: + packages: read contents: write steps: - uses: actions/checkout@v6 diff --git a/Console.Data.MySql/.github/workflows/build-and-deploy.yml b/Console.Data.MySql/.github/workflows/build-and-deploy.yml index d3b88685..98282ad2 100644 --- a/Console.Data.MySql/.github/workflows/build-and-deploy.yml +++ b/Console.Data.MySql/.github/workflows/build-and-deploy.yml @@ -48,6 +48,7 @@ jobs: - linux - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: + packages: read contents: write steps: - uses: actions/checkout@v6 diff --git a/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml b/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml index c59d2ef8..fa0d8692 100644 --- a/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml +++ b/Console.Data.PostgreSQL/.github/workflows/build-and-deploy.yml @@ -48,6 +48,7 @@ jobs: - linux - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: + packages: read contents: write steps: - uses: actions/checkout@v6 diff --git a/Console.Data.SqLite/.github/workflows/build-and-deploy.yml b/Console.Data.SqLite/.github/workflows/build-and-deploy.yml index 3abf9e16..14c0c429 100644 --- a/Console.Data.SqLite/.github/workflows/build-and-deploy.yml +++ b/Console.Data.SqLite/.github/workflows/build-and-deploy.yml @@ -44,6 +44,7 @@ jobs: - linux - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: + packages: read contents: write steps: - uses: actions/checkout@v6 diff --git a/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml b/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml index ec47cb42..fa8a17ac 100644 --- a/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml +++ b/Console.Data.SqlServer/.github/workflows/build-and-deploy.yml @@ -48,6 +48,7 @@ jobs: - linux - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: + packages: read contents: write steps: - uses: actions/checkout@v6 diff --git a/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml b/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml index a8dc1f9e..4627dde2 100644 --- a/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml +++ b/Console.Eventing.RabbitMq/.github/workflows/build-and-deploy.yml @@ -42,6 +42,7 @@ jobs: - linux - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: + packages: read contents: write steps: - uses: actions/checkout@v6 diff --git a/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml b/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml index 6e5b6fa0..3c4d5ad2 100644 --- a/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml +++ b/Console.ExceptionHandling/.github/workflows/build-and-deploy.yml @@ -42,6 +42,7 @@ jobs: - linux - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: + packages: read contents: write steps: - uses: actions/checkout@v6 diff --git a/Console.Localization/.github/workflows/build-and-deploy.yml b/Console.Localization/.github/workflows/build-and-deploy.yml index d315289b..5071ea98 100644 --- a/Console.Localization/.github/workflows/build-and-deploy.yml +++ b/Console.Localization/.github/workflows/build-and-deploy.yml @@ -42,6 +42,7 @@ jobs: - linux - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: + packages: read contents: write steps: - uses: actions/checkout@v6 diff --git a/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml b/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml index bdd29a18..ee633969 100644 --- a/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Log4Net/.github/workflows/build-and-deploy.yml @@ -42,6 +42,7 @@ jobs: - linux - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: + packages: read contents: write steps: - uses: actions/checkout@v6 diff --git a/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml b/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml index 9dcb2d05..ad5eb89c 100644 --- a/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Microsoft/.github/workflows/build-and-deploy.yml @@ -42,6 +42,7 @@ jobs: - linux - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: + packages: read contents: write steps: - uses: actions/checkout@v6 diff --git a/Console.Logging.NLog/.github/workflows/build-and-deploy.yml b/Console.Logging.NLog/.github/workflows/build-and-deploy.yml index bcca3f8c..50d2f923 100644 --- a/Console.Logging.NLog/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.NLog/.github/workflows/build-and-deploy.yml @@ -42,6 +42,7 @@ jobs: - linux - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: + packages: read contents: write steps: - uses: actions/checkout@v6 diff --git a/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml b/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml index 009dd0ab..a66649ba 100644 --- a/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml +++ b/Console.Logging.Serilog/.github/workflows/build-and-deploy.yml @@ -42,6 +42,7 @@ jobs: - linux - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: + packages: read contents: write steps: - uses: actions/checkout@v6 diff --git a/Console.StartupTasks/.github/workflows/build-and-deploy.yml b/Console.StartupTasks/.github/workflows/build-and-deploy.yml index ce7e53eb..7d431b48 100644 --- a/Console.StartupTasks/.github/workflows/build-and-deploy.yml +++ b/Console.StartupTasks/.github/workflows/build-and-deploy.yml @@ -42,6 +42,7 @@ jobs: - linux - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: + packages: read contents: write steps: - uses: actions/checkout@v6 diff --git a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml index c461c6f7..cdd6852f 100644 --- a/Console.Storage.Azure/.github/workflows/build-and-deploy.yml +++ b/Console.Storage.Azure/.github/workflows/build-and-deploy.yml @@ -46,6 +46,7 @@ jobs: - linux - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: + packages: read contents: write steps: - uses: actions/checkout@v6 diff --git a/Console.Storage.Local/.github/workflows/build-and-deploy.yml b/Console.Storage.Local/.github/workflows/build-and-deploy.yml index 7fff9187..6cb61dd1 100644 --- a/Console.Storage.Local/.github/workflows/build-and-deploy.yml +++ b/Console.Storage.Local/.github/workflows/build-and-deploy.yml @@ -44,6 +44,7 @@ jobs: - linux - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: + packages: read contents: write steps: - uses: actions/checkout@v6 diff --git a/Console.Workers/.github/workflows/build-and-deploy.yml b/Console.Workers/.github/workflows/build-and-deploy.yml index 4c17e0df..ded38bde 100644 --- a/Console.Workers/.github/workflows/build-and-deploy.yml +++ b/Console.Workers/.github/workflows/build-and-deploy.yml @@ -42,6 +42,7 @@ jobs: - linux - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: + packages: read contents: write steps: - uses: actions/checkout@v6 diff --git a/Console._Blank/.github/workflows/build-and-deploy.yml b/Console._Blank/.github/workflows/build-and-deploy.yml index 0af75729..88a23e95 100644 --- a/Console._Blank/.github/workflows/build-and-deploy.yml +++ b/Console._Blank/.github/workflows/build-and-deploy.yml @@ -42,6 +42,7 @@ jobs: - linux - ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }} permissions: + packages: read contents: write steps: - uses: actions/checkout@v6 From c3899626bd2c08139638fffdad03687510468d6a Mon Sep 17 00:00:00 2001 From: vivet Date: Tue, 14 Jul 2026 19:15:15 +0200 Subject: [PATCH 32/33] Updated --- Console.CustomConfigSection/.kubernetes/cronjob.yaml | 1 + Console.CustomService/.kubernetes/cronjob.yaml | 1 + Console.Data.InMemory/.kubernetes/cronjob.yaml | 1 + Console.Data.MySql/.kubernetes/cronjob.yaml | 1 + Console.Data.PostgreSQL/.kubernetes/cronjob.yaml | 1 + Console.Data.SqLite/.kubernetes/cronjob.yaml | 1 + Console.Data.SqlServer/.kubernetes/cronjob.yaml | 1 + Console.Eventing.RabbitMq/.kubernetes/cronjob.yaml | 1 + Console.ExceptionHandling/.kubernetes/cronjob.yaml | 1 + Console.Localization/.kubernetes/cronjob.yaml | 1 + Console.Logging.Log4Net/.kubernetes/cronjob.yaml | 1 + Console.Logging.Microsoft/.kubernetes/cronjob.yaml | 1 + Console.Logging.NLog/.kubernetes/cronjob.yaml | 1 + Console.Logging.Serilog/.kubernetes/cronjob.yaml | 1 + Console.StartupTasks/.kubernetes/cronjob.yaml | 1 + Console.Storage.Azure/.kubernetes/cronjob.yaml | 1 + Console.Storage.Local/.kubernetes/cronjob.yaml | 1 + Console.Workers/.kubernetes/cronjob.yaml | 1 + Console._Blank/.kubernetes/cronjob.yaml | 1 + 19 files changed, 19 insertions(+) diff --git a/Console.CustomConfigSection/.kubernetes/cronjob.yaml b/Console.CustomConfigSection/.kubernetes/cronjob.yaml index 0a1309e5..e10e9bd5 100644 --- a/Console.CustomConfigSection/.kubernetes/cronjob.yaml +++ b/Console.CustomConfigSection/.kubernetes/cronjob.yaml @@ -2,6 +2,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: %SERVICE_NAME% + namespace: %KUBERNETES_NAMESPACE% spec: schedule: %KUBERNETES_CRONJOB_SCHEDULE% concurrencyPolicy: Forbid diff --git a/Console.CustomService/.kubernetes/cronjob.yaml b/Console.CustomService/.kubernetes/cronjob.yaml index 0a1309e5..e10e9bd5 100644 --- a/Console.CustomService/.kubernetes/cronjob.yaml +++ b/Console.CustomService/.kubernetes/cronjob.yaml @@ -2,6 +2,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: %SERVICE_NAME% + namespace: %KUBERNETES_NAMESPACE% spec: schedule: %KUBERNETES_CRONJOB_SCHEDULE% concurrencyPolicy: Forbid diff --git a/Console.Data.InMemory/.kubernetes/cronjob.yaml b/Console.Data.InMemory/.kubernetes/cronjob.yaml index 0a1309e5..e10e9bd5 100644 --- a/Console.Data.InMemory/.kubernetes/cronjob.yaml +++ b/Console.Data.InMemory/.kubernetes/cronjob.yaml @@ -2,6 +2,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: %SERVICE_NAME% + namespace: %KUBERNETES_NAMESPACE% spec: schedule: %KUBERNETES_CRONJOB_SCHEDULE% concurrencyPolicy: Forbid diff --git a/Console.Data.MySql/.kubernetes/cronjob.yaml b/Console.Data.MySql/.kubernetes/cronjob.yaml index 351be7a8..a5d8b30b 100644 --- a/Console.Data.MySql/.kubernetes/cronjob.yaml +++ b/Console.Data.MySql/.kubernetes/cronjob.yaml @@ -2,6 +2,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: %SERVICE_NAME% + namespace: %KUBERNETES_NAMESPACE% spec: schedule: %KUBERNETES_CRONJOB_SCHEDULE% concurrencyPolicy: Forbid diff --git a/Console.Data.PostgreSQL/.kubernetes/cronjob.yaml b/Console.Data.PostgreSQL/.kubernetes/cronjob.yaml index 351be7a8..a5d8b30b 100644 --- a/Console.Data.PostgreSQL/.kubernetes/cronjob.yaml +++ b/Console.Data.PostgreSQL/.kubernetes/cronjob.yaml @@ -2,6 +2,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: %SERVICE_NAME% + namespace: %KUBERNETES_NAMESPACE% spec: schedule: %KUBERNETES_CRONJOB_SCHEDULE% concurrencyPolicy: Forbid diff --git a/Console.Data.SqLite/.kubernetes/cronjob.yaml b/Console.Data.SqLite/.kubernetes/cronjob.yaml index 0bc46aa1..1dd91868 100644 --- a/Console.Data.SqLite/.kubernetes/cronjob.yaml +++ b/Console.Data.SqLite/.kubernetes/cronjob.yaml @@ -2,6 +2,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: %SERVICE_NAME% + namespace: %KUBERNETES_NAMESPACE% spec: schedule: %KUBERNETES_CRONJOB_SCHEDULE% concurrencyPolicy: Forbid diff --git a/Console.Data.SqlServer/.kubernetes/cronjob.yaml b/Console.Data.SqlServer/.kubernetes/cronjob.yaml index 351be7a8..a5d8b30b 100644 --- a/Console.Data.SqlServer/.kubernetes/cronjob.yaml +++ b/Console.Data.SqlServer/.kubernetes/cronjob.yaml @@ -2,6 +2,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: %SERVICE_NAME% + namespace: %KUBERNETES_NAMESPACE% spec: schedule: %KUBERNETES_CRONJOB_SCHEDULE% concurrencyPolicy: Forbid diff --git a/Console.Eventing.RabbitMq/.kubernetes/cronjob.yaml b/Console.Eventing.RabbitMq/.kubernetes/cronjob.yaml index 3ceb7bba..f373d966 100644 --- a/Console.Eventing.RabbitMq/.kubernetes/cronjob.yaml +++ b/Console.Eventing.RabbitMq/.kubernetes/cronjob.yaml @@ -2,6 +2,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: %SERVICE_NAME% + namespace: %KUBERNETES_NAMESPACE% spec: schedule: %KUBERNETES_CRONJOB_SCHEDULE% concurrencyPolicy: Forbid diff --git a/Console.ExceptionHandling/.kubernetes/cronjob.yaml b/Console.ExceptionHandling/.kubernetes/cronjob.yaml index 0a1309e5..e10e9bd5 100644 --- a/Console.ExceptionHandling/.kubernetes/cronjob.yaml +++ b/Console.ExceptionHandling/.kubernetes/cronjob.yaml @@ -2,6 +2,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: %SERVICE_NAME% + namespace: %KUBERNETES_NAMESPACE% spec: schedule: %KUBERNETES_CRONJOB_SCHEDULE% concurrencyPolicy: Forbid diff --git a/Console.Localization/.kubernetes/cronjob.yaml b/Console.Localization/.kubernetes/cronjob.yaml index 0a1309e5..e10e9bd5 100644 --- a/Console.Localization/.kubernetes/cronjob.yaml +++ b/Console.Localization/.kubernetes/cronjob.yaml @@ -2,6 +2,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: %SERVICE_NAME% + namespace: %KUBERNETES_NAMESPACE% spec: schedule: %KUBERNETES_CRONJOB_SCHEDULE% concurrencyPolicy: Forbid diff --git a/Console.Logging.Log4Net/.kubernetes/cronjob.yaml b/Console.Logging.Log4Net/.kubernetes/cronjob.yaml index 0a1309e5..e10e9bd5 100644 --- a/Console.Logging.Log4Net/.kubernetes/cronjob.yaml +++ b/Console.Logging.Log4Net/.kubernetes/cronjob.yaml @@ -2,6 +2,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: %SERVICE_NAME% + namespace: %KUBERNETES_NAMESPACE% spec: schedule: %KUBERNETES_CRONJOB_SCHEDULE% concurrencyPolicy: Forbid diff --git a/Console.Logging.Microsoft/.kubernetes/cronjob.yaml b/Console.Logging.Microsoft/.kubernetes/cronjob.yaml index 0a1309e5..e10e9bd5 100644 --- a/Console.Logging.Microsoft/.kubernetes/cronjob.yaml +++ b/Console.Logging.Microsoft/.kubernetes/cronjob.yaml @@ -2,6 +2,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: %SERVICE_NAME% + namespace: %KUBERNETES_NAMESPACE% spec: schedule: %KUBERNETES_CRONJOB_SCHEDULE% concurrencyPolicy: Forbid diff --git a/Console.Logging.NLog/.kubernetes/cronjob.yaml b/Console.Logging.NLog/.kubernetes/cronjob.yaml index 0a1309e5..e10e9bd5 100644 --- a/Console.Logging.NLog/.kubernetes/cronjob.yaml +++ b/Console.Logging.NLog/.kubernetes/cronjob.yaml @@ -2,6 +2,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: %SERVICE_NAME% + namespace: %KUBERNETES_NAMESPACE% spec: schedule: %KUBERNETES_CRONJOB_SCHEDULE% concurrencyPolicy: Forbid diff --git a/Console.Logging.Serilog/.kubernetes/cronjob.yaml b/Console.Logging.Serilog/.kubernetes/cronjob.yaml index 0a1309e5..e10e9bd5 100644 --- a/Console.Logging.Serilog/.kubernetes/cronjob.yaml +++ b/Console.Logging.Serilog/.kubernetes/cronjob.yaml @@ -2,6 +2,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: %SERVICE_NAME% + namespace: %KUBERNETES_NAMESPACE% spec: schedule: %KUBERNETES_CRONJOB_SCHEDULE% concurrencyPolicy: Forbid diff --git a/Console.StartupTasks/.kubernetes/cronjob.yaml b/Console.StartupTasks/.kubernetes/cronjob.yaml index 0a1309e5..e10e9bd5 100644 --- a/Console.StartupTasks/.kubernetes/cronjob.yaml +++ b/Console.StartupTasks/.kubernetes/cronjob.yaml @@ -2,6 +2,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: %SERVICE_NAME% + namespace: %KUBERNETES_NAMESPACE% spec: schedule: %KUBERNETES_CRONJOB_SCHEDULE% concurrencyPolicy: Forbid diff --git a/Console.Storage.Azure/.kubernetes/cronjob.yaml b/Console.Storage.Azure/.kubernetes/cronjob.yaml index f9cee2c4..b66eabf7 100644 --- a/Console.Storage.Azure/.kubernetes/cronjob.yaml +++ b/Console.Storage.Azure/.kubernetes/cronjob.yaml @@ -2,6 +2,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: %SERVICE_NAME% + namespace: %KUBERNETES_NAMESPACE% spec: schedule: %KUBERNETES_CRONJOB_SCHEDULE% concurrencyPolicy: Forbid diff --git a/Console.Storage.Local/.kubernetes/cronjob.yaml b/Console.Storage.Local/.kubernetes/cronjob.yaml index fc8e61fe..514379a1 100644 --- a/Console.Storage.Local/.kubernetes/cronjob.yaml +++ b/Console.Storage.Local/.kubernetes/cronjob.yaml @@ -2,6 +2,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: %SERVICE_NAME% + namespace: %KUBERNETES_NAMESPACE% spec: schedule: %KUBERNETES_CRONJOB_SCHEDULE% concurrencyPolicy: Forbid diff --git a/Console.Workers/.kubernetes/cronjob.yaml b/Console.Workers/.kubernetes/cronjob.yaml index c9cff5b8..cbd97e65 100644 --- a/Console.Workers/.kubernetes/cronjob.yaml +++ b/Console.Workers/.kubernetes/cronjob.yaml @@ -2,6 +2,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: %SERVICE_NAME% + namespace: %KUBERNETES_NAMESPACE% spec: schedule: %KUBERNETES_CRONJOB_SCHEDULE% concurrencyPolicy: Forbid diff --git a/Console._Blank/.kubernetes/cronjob.yaml b/Console._Blank/.kubernetes/cronjob.yaml index 0a1309e5..e10e9bd5 100644 --- a/Console._Blank/.kubernetes/cronjob.yaml +++ b/Console._Blank/.kubernetes/cronjob.yaml @@ -2,6 +2,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: %SERVICE_NAME% + namespace: %KUBERNETES_NAMESPACE% spec: schedule: %KUBERNETES_CRONJOB_SCHEDULE% concurrencyPolicy: Forbid From b4dcf2ff9e2a43b0906cdb885aa346ee29451e14 Mon Sep 17 00:00:00 2001 From: vivet Date: Fri, 17 Jul 2026 10:26:02 +0200 Subject: [PATCH 33/33] Updated --- Api.ApiClients.Entity/Api.ApiClients.Entity/appsettings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Api.ApiClients.Entity/Api.ApiClients.Entity/appsettings.json b/Api.ApiClients.Entity/Api.ApiClients.Entity/appsettings.json index 62eb606b..ab7ef06a 100644 --- a/Api.ApiClients.Entity/Api.ApiClients.Entity/appsettings.json +++ b/Api.ApiClients.Entity/Api.ApiClients.Entity/appsettings.json @@ -13,7 +13,7 @@ "NanoApiClient": { "Host": "api.apiclients.entity.service", "Root": "api", - "Port": 8181, + "Port": 8080, "UseSsl": false, "Timeout": "00:00:30", "HealthCheck": {