From cf5f9ceb370f76ace7a810ea65b3d67ca61d4acb Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 11:59:30 +0200 Subject: [PATCH 01/22] cleanups | ci updates | folders structure --- CHANGELOG.md | 3 +++ README.md | 3 ++- argocd/README.md | 18 ------------------ argocd/argocd-auth.yaml | 18 ------------------ build/templates/docker-build-push-jobs.yml | 18 +++++++++--------- .../cert-manager-commands.ps1 | 0 .../deploy-cert-manager-helm.ps1 | 0 .../Example.ps1 | 0 .../monitoring-http-nginx-ingress.yaml | 0 .../deploy-ingress-helm.ps1 | 0 .../install-nginx-ingress-example.ps1 | 0 .../deploy-rabbitmq-example.ps1 | 0 .../deploy-rabbitmq-helm.ps1 | 0 .../helm-install-redis/Commands.ps1 | 0 14 files changed, 14 insertions(+), 46 deletions(-) delete mode 100644 argocd/README.md delete mode 100644 argocd/argocd-auth.yaml rename {kubernetes => helm}/helm-install-cert-manager/cert-manager-commands.ps1 (100%) rename {kubernetes => helm}/helm-install-cert-manager/deploy-cert-manager-helm.ps1 (100%) rename {kubernetes => helm}/helm-install-grafana-prometheus/Example.ps1 (100%) rename {kubernetes => helm}/helm-install-grafana-prometheus/monitoring-http-nginx-ingress.yaml (100%) rename {kubernetes => helm}/helm-install-nginx-ingress/deploy-ingress-helm.ps1 (100%) rename {kubernetes => helm}/helm-install-nginx-ingress/install-nginx-ingress-example.ps1 (100%) rename {kubernetes => helm}/helm-install-rabbit-mq/deploy-rabbitmq-example.ps1 (100%) rename {kubernetes => helm}/helm-install-rabbit-mq/deploy-rabbitmq-helm.ps1 (100%) rename {kubernetes => helm}/helm-install-redis/Commands.ps1 (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index b22b9a73..3e318bf1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,3 +35,6 @@ and this project adheres to [Semantic Versioning v2.0.0](https://semver.org/spec - ArgoCD initial config - ArgoCD application manifest - Add nuget.config +- Delete ArgoCD configs +- Add Renovate dashboard link to README +- Update GitVersion tasks in Azure DevOps diff --git a/README.md b/README.md index ff6c4aff..94ccfa81 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,7 @@ EventTriangleAPI offers realtime communication using SignalR. - Docker images: https://hub.docker.com/u/kaminome - Azure DevOps project: https://dev.azure.com/EventTriangle/EventTriangleAPI +- Renovate: https://developer.mend.io/github/EventTriangle/EventTriangleAPI ## How to run Docker compose @@ -130,4 +131,4 @@ From `src` folder run: - `docker build --build-arg FRONT_API_URL="http://localhost:7000/" -t eventtriangle/auth:1.0 -f ./authorization/Dockerfile .` - `docker build -t eventtriangle/consumer:1.0 -f ./consumer/Dockerfile . ` -- `docker build -t eventtriangle/sender:1.0 -f ./sender/Dockerfile .` \ No newline at end of file +- `docker build -t eventtriangle/sender:1.0 -f ./sender/Dockerfile .` diff --git a/argocd/README.md b/argocd/README.md deleted file mode 100644 index dec39a18..00000000 --- a/argocd/README.md +++ /dev/null @@ -1,18 +0,0 @@ -## ArgoCD project - -- https://github.com/argoproj/argo-cd - -## Install ArgoCD CLI (Windows) - -- choco install argocd-cli -y -- argocd version - -## Install and configure ArgoCD - -- kubectl create namespace argocd -- kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.14.7/manifests/install.yaml -- kubectl patch svc argocd-server -n argocd --type merge --patch '{"spec": {"type": "LoadBalancer"}}' -- https://argocd-et.razumovsky.me/ -- $Password = kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath="{.data.password}" | ForEach-Object { [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($_)) } -- argocd login argocd-et.razumovsky.me --username admin --password $Password --insecure -- argocd repo add "https://github.com/EventTriangle/EventTriangleAPI.git" diff --git a/argocd/argocd-auth.yaml b/argocd/argocd-auth.yaml deleted file mode 100644 index cf6db87b..00000000 --- a/argocd/argocd-auth.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - name: auth-service - namespace: argocd -spec: - project: default - source: - repoURL: https://github.com/EventTriangle/EventTriangleAPI.git - targetRevision: AZ400-336 - path: kubernetes/auth-deployment-cluster-ip - destination: - server: https://kubernetes.default.svc - namespace: event-triangle - syncPolicy: - automated: - prune: true - selfHeal: true diff --git a/build/templates/docker-build-push-jobs.yml b/build/templates/docker-build-push-jobs.yml index 979c0033..d477f6c3 100644 --- a/build/templates/docker-build-push-jobs.yml +++ b/build/templates/docker-build-push-jobs.yml @@ -79,12 +79,12 @@ jobs: - checkout: self fetchDepth: 0 - - task: gitversion/setup@3 + - task: gitversion-setup@4.5.0 displayName: 'GitVersion Setup' inputs: versionSpec: ${{ parameters.gitVersionVersion }} - - task: gitversion/execute@3 + - task: gitversion-execute@4.5.0 displayName: 'GitVersion Execute' inputs: updateAssemblyInfo: true @@ -93,7 +93,7 @@ jobs: displayName: 'Set Build Version' env: Action: '##vso[build.updatebuildnumber]' - BuildVersion: $(GitVersion.SemVer) + BuildVersion: $(version_step.semVer) - task: DotNetCoreCLI@2 displayName: 'Dotnet restore' @@ -108,7 +108,7 @@ jobs: inputs: command: 'build' projects: '${{ parameters.solution }}' - arguments: '-c ${{ parameters.buildConfiguration }} -p:Version=$(GitVersion.SemVer) --no-restore' + arguments: '-c ${{ parameters.buildConfiguration }} -p:Version=$(version_step.semVer) --no-restore' - ${{ if eq(parameters.shouldRunUnitTests, 'true') }}: - task: DotnetCoreCLI@2 @@ -136,7 +136,7 @@ jobs: -AcrRegistryUrl ${{ parameters.acrRegistryUrl }} -DockerBuildParameterUrl ${{ parameters.dockerBuildParameterUrl }} -DockerfilePath ${{ parameters.dockerfilePath }} - -GitVersion $(GitVersion.SemVer) + -GitVersion $(version_step.semVer) -WorkingDirectory ${{ parameters.workingDirectoryForDocker }}" errorActionPreference: 'stop' pwsh: true @@ -148,7 +148,7 @@ jobs: containerRegistry: ${{ parameters.dockerServiceConnection }} repository: ${{ parameters.dockerRegistryUrl }}/${{ parameters.imageRepository }} tags: | - $(GitVersion.SemVer) + $(version_step.semVer) latest - task: Docker@2 @@ -158,14 +158,14 @@ jobs: containerRegistry: ${{ parameters.acrServiceConnection }} repository: ${{ parameters.imageRepository }} tags: | - $(GitVersion.SemVer) + $(version_step.semVer) latest - script: | touch $(System.DefaultWorkingDirectory)/helm/version.txt echo "Version txt has been created" - echo $(GitVersion.SemVer) >> $(System.DefaultWorkingDirectory)/helm/version.txt - echo "Version file has been updated with: $(GitVersion.SemVer)" + echo $(version_step.semVer) >> $(System.DefaultWorkingDirectory)/helm/version.txt + echo "Version file has been updated with: $(version_step.semVer)" displayName: "Update version file" - task: CopyFiles@2 diff --git a/kubernetes/helm-install-cert-manager/cert-manager-commands.ps1 b/helm/helm-install-cert-manager/cert-manager-commands.ps1 similarity index 100% rename from kubernetes/helm-install-cert-manager/cert-manager-commands.ps1 rename to helm/helm-install-cert-manager/cert-manager-commands.ps1 diff --git a/kubernetes/helm-install-cert-manager/deploy-cert-manager-helm.ps1 b/helm/helm-install-cert-manager/deploy-cert-manager-helm.ps1 similarity index 100% rename from kubernetes/helm-install-cert-manager/deploy-cert-manager-helm.ps1 rename to helm/helm-install-cert-manager/deploy-cert-manager-helm.ps1 diff --git a/kubernetes/helm-install-grafana-prometheus/Example.ps1 b/helm/helm-install-grafana-prometheus/Example.ps1 similarity index 100% rename from kubernetes/helm-install-grafana-prometheus/Example.ps1 rename to helm/helm-install-grafana-prometheus/Example.ps1 diff --git a/kubernetes/helm-install-grafana-prometheus/monitoring-http-nginx-ingress.yaml b/helm/helm-install-grafana-prometheus/monitoring-http-nginx-ingress.yaml similarity index 100% rename from kubernetes/helm-install-grafana-prometheus/monitoring-http-nginx-ingress.yaml rename to helm/helm-install-grafana-prometheus/monitoring-http-nginx-ingress.yaml diff --git a/kubernetes/helm-install-nginx-ingress/deploy-ingress-helm.ps1 b/helm/helm-install-nginx-ingress/deploy-ingress-helm.ps1 similarity index 100% rename from kubernetes/helm-install-nginx-ingress/deploy-ingress-helm.ps1 rename to helm/helm-install-nginx-ingress/deploy-ingress-helm.ps1 diff --git a/kubernetes/helm-install-nginx-ingress/install-nginx-ingress-example.ps1 b/helm/helm-install-nginx-ingress/install-nginx-ingress-example.ps1 similarity index 100% rename from kubernetes/helm-install-nginx-ingress/install-nginx-ingress-example.ps1 rename to helm/helm-install-nginx-ingress/install-nginx-ingress-example.ps1 diff --git a/kubernetes/helm-install-rabbit-mq/deploy-rabbitmq-example.ps1 b/helm/helm-install-rabbit-mq/deploy-rabbitmq-example.ps1 similarity index 100% rename from kubernetes/helm-install-rabbit-mq/deploy-rabbitmq-example.ps1 rename to helm/helm-install-rabbit-mq/deploy-rabbitmq-example.ps1 diff --git a/kubernetes/helm-install-rabbit-mq/deploy-rabbitmq-helm.ps1 b/helm/helm-install-rabbit-mq/deploy-rabbitmq-helm.ps1 similarity index 100% rename from kubernetes/helm-install-rabbit-mq/deploy-rabbitmq-helm.ps1 rename to helm/helm-install-rabbit-mq/deploy-rabbitmq-helm.ps1 diff --git a/kubernetes/helm-install-redis/Commands.ps1 b/helm/helm-install-redis/Commands.ps1 similarity index 100% rename from kubernetes/helm-install-redis/Commands.ps1 rename to helm/helm-install-redis/Commands.ps1 From 328a631e493850c7d8a6dbd59f405da255f6d465 Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 12:02:21 +0200 Subject: [PATCH 02/22] bump gitversion task --- build/templates/docker-build-push-jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/templates/docker-build-push-jobs.yml b/build/templates/docker-build-push-jobs.yml index d477f6c3..fcd386ba 100644 --- a/build/templates/docker-build-push-jobs.yml +++ b/build/templates/docker-build-push-jobs.yml @@ -40,7 +40,7 @@ parameters: - name: gitVersionVersion displayName: 'GitVersion version' - default: '5.x' + default: '6.x' type: string - name: dockerRegistryUrl From 49d3c9ce4f34679a39cad062248a87df18f669bf Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 12:06:01 +0200 Subject: [PATCH 03/22] add step ci --- build/templates/docker-build-push-jobs.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build/templates/docker-build-push-jobs.yml b/build/templates/docker-build-push-jobs.yml index fcd386ba..e8189e6d 100644 --- a/build/templates/docker-build-push-jobs.yml +++ b/build/templates/docker-build-push-jobs.yml @@ -85,9 +85,8 @@ jobs: versionSpec: ${{ parameters.gitVersionVersion }} - task: gitversion-execute@4.5.0 - displayName: 'GitVersion Execute' - inputs: - updateAssemblyInfo: true + name: version_step # step id used as a reference for output values + displayName: Determine Version - bash: echo $Action$BuildVersion displayName: 'Set Build Version' From 05b37ad84be82ee3633fcc4519994b70759e3c86 Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 12:12:15 +0200 Subject: [PATCH 04/22] fix acr url --- build/auth-azure-pipelines-pr-validation.yml | 2 +- build/consumer-azure-pipelines-pr-validation.yml | 2 +- build/sender-azure-pipelines-pr-validation.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/auth-azure-pipelines-pr-validation.yml b/build/auth-azure-pipelines-pr-validation.yml index 53f76ad6..ef6a2b90 100644 --- a/build/auth-azure-pipelines-pr-validation.yml +++ b/build/auth-azure-pipelines-pr-validation.yml @@ -43,7 +43,7 @@ stages: imageRepository: 'auth-service' dockerfilePath: '$(System.DefaultWorkingDirectory)/src/authorization/Dockerfile' dockerServiceConnection: 'Docker_Hub_Connection' - acrRegistryUrl: 'azuredevopsacrd01.azurecr.io' + acrRegistryUrl: 'acrsharedd01.azurecr.io' acrServiceConnection: 'Azure_ACR_Connection' workingDirectoryForDocker: '$(System.DefaultWorkingDirectory)/src' diff --git a/build/consumer-azure-pipelines-pr-validation.yml b/build/consumer-azure-pipelines-pr-validation.yml index 9ee0ef1b..fe03295c 100644 --- a/build/consumer-azure-pipelines-pr-validation.yml +++ b/build/consumer-azure-pipelines-pr-validation.yml @@ -46,7 +46,7 @@ stages: imageRepository: 'consumer-service' dockerfilePath: '$(System.DefaultWorkingDirectory)/src/consumer/Dockerfile' dockerServiceConnection: 'Docker_Hub_Connection' - acrRegistryUrl: 'azuredevopsacrd01.azurecr.io' + acrRegistryUrl: 'acrsharedd01.azurecr.io' acrServiceConnection: 'Azure_ACR_Connection' workingDirectoryForDocker: '$(System.DefaultWorkingDirectory)/src' diff --git a/build/sender-azure-pipelines-pr-validation.yml b/build/sender-azure-pipelines-pr-validation.yml index bbf29062..25184d38 100644 --- a/build/sender-azure-pipelines-pr-validation.yml +++ b/build/sender-azure-pipelines-pr-validation.yml @@ -46,6 +46,6 @@ stages: imageRepository: 'sender-service' dockerfilePath: '$(System.DefaultWorkingDirectory)/src/sender/Dockerfile' dockerServiceConnection: 'Docker_Hub_Connection' - acrRegistryUrl: 'azuredevopsacrd01.azurecr.io' + acrRegistryUrl: 'acrsharedd01.azurecr.io' acrServiceConnection: 'Azure_ACR_Connection' workingDirectoryForDocker: '$(System.DefaultWorkingDirectory)/src' From b298640528df788c1526bbb976a3e52772bafb1e Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 14:30:31 +0200 Subject: [PATCH 05/22] delete cloudflare scripts | terraform --- cloudflare/Cloudflare_curl.ps1 | 8 -- cloudflare/Get-CloudflareDnsRecords.ps1 | 27 ------ cloudflare/Get-CloudflareZoneId.ps1 | 33 ------- cloudflare/Get-NewDnsEntries.ps1 | 15 --- cloudflare/Main.ps1 | 81 ---------------- cloudflare/Update-CloudflareDnsRecord.ps1 | 58 ------------ terraform/.terraform.lock.hcl | 108 +++++++++++----------- terraform/.tflint.hcl | 12 --- terraform/main.tf | 2 +- terraform/modules/grafana/main.tf | 2 +- terraform/terraform.auto.tfvars.json | 32 +++---- 11 files changed, 72 insertions(+), 306 deletions(-) delete mode 100644 cloudflare/Cloudflare_curl.ps1 delete mode 100644 cloudflare/Get-CloudflareDnsRecords.ps1 delete mode 100644 cloudflare/Get-CloudflareZoneId.ps1 delete mode 100644 cloudflare/Get-NewDnsEntries.ps1 delete mode 100644 cloudflare/Main.ps1 delete mode 100644 cloudflare/Update-CloudflareDnsRecord.ps1 delete mode 100644 terraform/.tflint.hcl diff --git a/cloudflare/Cloudflare_curl.ps1 b/cloudflare/Cloudflare_curl.ps1 deleted file mode 100644 index 8d11179a..00000000 --- a/cloudflare/Cloudflare_curl.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -curl https://api.cloudflare.com/client/v4/zones -H "X-Auth-Email: $env:CLOUDFLARE_EMAIL" -H "X-Auth-Key: $env:CLOUDFLARE_API_KEY" - -curl https://api.cloudflare.com/client/v4/zones -H "Authorization: Bearer $env:CLOUDFLARE_API_KEY" -H "Content-Type: application/json" - -curl https://api.cloudflare.com/client/v4/user/tokens/verify -H "Authorization: Bearer $env:CLOUDFLARE_API_KEY" -H "Content-Type: application/json" - -curl https://api.cloudflare.com/client/v4/zones/d8bdf4c7860b59eddfd9fcc7bf864b47/dns_records ` - -H "Authorization: Bearer $env:CLOUDFLARE_API_KEY" -H "Content-Type: application/json" diff --git a/cloudflare/Get-CloudflareDnsRecords.ps1 b/cloudflare/Get-CloudflareDnsRecords.ps1 deleted file mode 100644 index 060db7eb..00000000 --- a/cloudflare/Get-CloudflareDnsRecords.ps1 +++ /dev/null @@ -1,27 +0,0 @@ -param ( - [Parameter(Mandatory = $true)] - [string]$ApiToken, - - [Parameter(Mandatory = $true)] - [string]$ZoneId -) - -$url = "https://api.cloudflare.com/client/v4/zones/$ZoneId/dns_records" - -# Perform the API request -$response = $( curl $url -H "Authorization: Bearer $ApiToken" -H "Content-Type: application/json" ) - -# Parse the JSON response -$json = $response | ConvertFrom-Json - -# Create a hashtable to hold the records -$dnsRecords = @{} - -# Loop through the result and populate the hashtable -$json.result | ForEach-Object { - # Use the DNS record id as the key and the name as the value - $dnsRecords[$_.name] = $_.id -} - -# Return the hashtable -return $dnsRecords diff --git a/cloudflare/Get-CloudflareZoneId.ps1 b/cloudflare/Get-CloudflareZoneId.ps1 deleted file mode 100644 index e1042ebf..00000000 --- a/cloudflare/Get-CloudflareZoneId.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -param ( - [Parameter(Mandatory = $true)] - [string]$ApiToken, - - [Parameter(Mandatory = $true)] - [string]$ZoneName -) - -$ErrorActionPreference = "Stop" - -$url = "https://api.cloudflare.com/client/v4/zones" - -# Perform the API request -$response = $( curl $url -H "Authorization: Bearer $ApiToken" -H "Content-Type: application/json" ) - -# Parse the JSON response -$json = $response | ConvertFrom-Json - -# Filter the result for the zone named 'razumovsky.me' -$zone = $json.result | Where-Object { $_.name -eq "$ZoneName" } - -# Output the Zone ID -if ($zone) -{ - return $zone.id -} -else -{ - Write-Output "Zone '$ZoneName' not found." -} - - - diff --git a/cloudflare/Get-NewDnsEntries.ps1 b/cloudflare/Get-NewDnsEntries.ps1 deleted file mode 100644 index c2431cfd..00000000 --- a/cloudflare/Get-NewDnsEntries.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -$postgresService = $( kubectl get service "postgres-service" -n "event-triangle" -o json ) | ConvertFrom-Json -$postgresPublicIp = $postgresService.status.loadBalancer.ingress[0].ip - -$rabbitService = $( kubectl get service "event-rabbitmq" -n "event-triangle" -o json ) | ConvertFrom-Json -$rabbitPublicIp = $rabbitService.status.loadBalancer.ingress[0].ip - -$ingressService = $( kubectl get service "event-ingress-ingress-nginx-controller" -n "event-triangle" -o json ) | ConvertFrom-Json -$ingressPublicIp = $ingressService.status.loadBalancer.ingress[0].ip -$dnsRecords = @{} - -$dnsRecords["auth-eventtriangle.razumovsky.me"] = $ingressPublicIp -$dnsRecords["rabbitmq-eventtriangle.razumovsky.me"] = $rabbitPublicIp -$dnsRecords["postgres-eventtriangle.razumovsky.me"] = $postgresPublicIp - -return $dnsRecords diff --git a/cloudflare/Main.ps1 b/cloudflare/Main.ps1 deleted file mode 100644 index 38f9f70b..00000000 --- a/cloudflare/Main.ps1 +++ /dev/null @@ -1,81 +0,0 @@ -param ( - [Parameter(Mandatory = $true)] - [string]$ApiToken, - - [Parameter(Mandatory = $true)] - [string]$ZoneName -) - -# Set error handling and preferences -$ErrorActionPreference = "Stop" - -Write-Host "Starting Cloudflare DNS Records Update Script..." -ForegroundColor Cyan - -# Step 1: Get Zone ID -Write-Host "Fetching Zone ID for Zone Name: $ZoneName..." -ForegroundColor Yellow -$zoneId = $(./Get-CloudflareZoneId.ps1 -ApiToken $ApiToken -ZoneName $ZoneName) - -if (-not $zoneId) { - Write-Error "Failed to fetch Zone ID. Exiting script." - exit 1 -} - -Write-Host "Zone ID Retrieved: $zoneId" -ForegroundColor Green - -# Step 2: Get DNS Records -Write-Host "Fetching existing DNS records for Zone ID: $zoneId..." -ForegroundColor Yellow -$dnsRecords = $(.\Get-CloudflareDnsRecords.ps1 -ApiToken $ApiToken -ZoneId "$zoneId") - -if (-not $dnsRecords -or -not ($dnsRecords -is [hashtable])) { - Write-Error "Failed to fetch DNS records or records are not in the expected format. Exiting script." - exit 1 -} - -Write-Host "DNS Records Retrieved: $($dnsRecords.Count) records found." -ForegroundColor Green - -# Step 3: Get New DNS Entries -Write-Host "Fetching new DNS entries to update..." -ForegroundColor Yellow -$newDnsEntries = $(.\Get-NewDnsEntries.ps1) - -if (-not $newDnsEntries -or -not ($newDnsEntries -is [hashtable])) { - Write-Error "Failed to fetch new DNS entries or entries are not in the expected format. Exiting script." - exit 1 -} - -Write-Host "New DNS Entries Retrieved: $($newDnsEntries.Count) entries to process." -ForegroundColor Green - -# Step 4: Process Each New DNS Entry -Write-Host "Starting to process new DNS entries..." -ForegroundColor Cyan -foreach ($entry in $newDnsEntries.GetEnumerator()) { - $dnsName = $entry.Name - $ipAddress = $entry.Value - - Write-Host "`nProcessing Entry: $dnsName => $ipAddress" -ForegroundColor Cyan - - # Check if the DNS name exists in the current DNS records - if ($dnsRecords.ContainsKey($dnsName)) { - # Get the record ID for the existing DNS record - $recordId = $dnsRecords[$dnsName] - - Write-Host "Found existing DNS record for $dnsName. Record ID: $recordId" -ForegroundColor Green - Write-Host "Updating DNS record for $dnsName with IP Address: $ipAddress" -ForegroundColor Yellow - - # Update the DNS record - try { - .\Update-CloudflareDnsRecord.ps1 -ApiToken $ApiToken ` - -DnsName $dnsName ` - -ZoneId $zoneId ` - -RecordId $recordId ` - -IpAddress $ipAddress - - Write-Host "Successfully updated DNS record for $dnsName." -ForegroundColor Green - } catch { - Write-Error "Failed to update DNS record for $dnsName. Error: $_" - } - } else { - Write-Host "DNS name $dnsName does not exist in Cloudflare. Skipping..." -ForegroundColor Red - } -} - -# Final Step: Script Completion -Write-Host "`nDNS records update process completed successfully!" -ForegroundColor Green diff --git a/cloudflare/Update-CloudflareDnsRecord.ps1 b/cloudflare/Update-CloudflareDnsRecord.ps1 deleted file mode 100644 index 64755543..00000000 --- a/cloudflare/Update-CloudflareDnsRecord.ps1 +++ /dev/null @@ -1,58 +0,0 @@ -param ( - [Parameter(Mandatory = $true)] - [string]$ApiToken, - - [Parameter(Mandatory = $true)] - [string]$DnsName, - - [Parameter(Mandatory = $true)] - [string]$ZoneId, - - [Parameter(Mandatory = $true)] - [string]$RecordId, - - [Parameter(Mandatory = $true)] - [string]$IpAddress -) - -$url = "https://api.cloudflare.com/client/v4/zones/$ZoneId/dns_records/$RecordId" - -$body = @{ - comment = "Sent from Powershell $( $( Get-Date ).DateTime )" - content = $IpAddress - name = $DnsName - proxied = $false - settings = @{ - ipv4_only = $false - ipv6_only = $false - } - ttl = 1 - type = "A" -} | ConvertTo-Json -Depth 4 - -# Perform the API request -$response = curl $url ` - -X PATCH ` - -H "Authorization: Bearer $ApiToken" ` - -H "Content-Type: application/json" ` - -d $body - -$responseJson = $response | ConvertFrom-Json - -# Check the response -if ($responseJson.success -eq $true) -{ - Write-Host "DNS record updated successfully." - Write-Host "Response: $response" -} -else -{ - Write-Host "Failed to update DNS record." - Write-Host "Response: $( $response )" -} - -#.\Update-CloudflareDnsRecord.ps1 -ApiToken $env:CLOUDFLARE_API_KEY ` -# -DnsName "auth-eventtriangle.razumovsky.me" ` -# -ZoneId $zoneId ` -# -RecordId "98b014141c8d4bae0db9800617c04076" ` -# -IpAddress "172.205.36.169" diff --git a/terraform/.terraform.lock.hcl b/terraform/.terraform.lock.hcl index 7b8c59d2..db954e65 100644 --- a/terraform/.terraform.lock.hcl +++ b/terraform/.terraform.lock.hcl @@ -2,80 +2,80 @@ # Manual edits may be lost in future updates. provider "registry.terraform.io/azure/azapi" { - version = "2.3.0" + version = "2.9.0" constraints = ">= 1.9.0" hashes = [ - "h1:WxzoM2CU6MKt9q9Wk2ppsCmpuYXZ45h5ejl43cNdPWQ=", - "zh:038dfc9190827e4fe5635d7f81a44bb568e19c37847896ad2af8cc580ac28f77", - "zh:14b438540f81fc40957885009df0fed93bb9c771a9a8d37dd1d29bd8c5d85545", - "zh:1bb16bd852f28a1f369e199104330efefdfaccacf55bcae829235f553343f58b", - "zh:22a1138f522b1fd9b924e7bfbee66063f8d616a0ce6a0a0bdcc77b445350e1b6", - "zh:488746623bc1be052663a407589e3101c6c2d2d7e9ad56b5d69d4773f77a6f0e", - "zh:49a207406ee3b211fa89bacec844db58157fdb764bedf216706af05bb9068bd0", - "zh:55115837d92f0d4dce803c6180fab10f93314134e5e0a8aadcc977348fbc4b9c", - "zh:9ac58303d128c6c2a7a68984273ec76ceee9d14fca030cd22ae176e7b936495a", - "zh:aadb9712d3358790d96dead8ea73eb09a7e971be8b81765fbbb3af4219f77d63", - "zh:e39fe6b9f06819ec9a18d69ddb3c681cdbaadf184d2c8d6739f56f1e47d5947b", - "zh:e68f46ac504f1641bc419f4cfee5003fc596932598e09fa56a09a3d52f3851e4", - "zh:f50b37fb8f0b57cc97f99ff48018e2f97a7aa9d72f06cba3e3b2919d61d5f483", + "h1:lN0C7TI2dqStnZysEBhDq33t9DbpUp/8rOWxZUF/st0=", + "zh:0a4eee8c9362db6ca19d371eccf38701c8306be761182da87b624294f7e8f867", + "zh:4df87bee5b8f4cce27461ae26132a599542583cdf035942b42b0259a514ab46e", + "zh:57dc1f4227f1d0eab630fcf868d6c9a1b4dc4c165608ce5a4d7028a482770547", + "zh:5c500e42c419c324ea8f41c40e4cc8af187323cebc9f70543749b6c0e59c0fe9", + "zh:6c7dca31242e27d2f215b1a9370b65579b3a988282a3609564ea96866f86f0ca", + "zh:74dada7351b25d01e61aa70aa8cf1f1fb96d09c514be4b66d12816c5e61f9e01", + "zh:9c67c0727ab8be15879793f929f3d71f0f149ae1daaf577d0bd4d57b2e61c408", + "zh:a0266da16db14b635a61d6766efc28468056bac91ed6662fc9f2a0aad923b063", + "zh:a4a555627f40fa797b34ddede599812cddb1e0e9be105ccfcf1f293451b97cd7", + "zh:a6a1c4a46f4f01e4420a456adefe8bcf3bff3c9d09a8dfeedeea5b94c866dfd8", + "zh:c64fc4067a8276d4405d9359990e0c45e66dba07433a1f3ab1e6c32f6ef3b048", + "zh:ee77a881d071b3a0ad8a64f9c1158e3aee9b37e9063de5dd8fa9d238dbe70ba1", ] } provider "registry.terraform.io/hashicorp/azuread" { - version = "3.2.0" + version = "3.8.0" constraints = ">= 2.43.0" hashes = [ - "h1:DciAAiQWGJK0FR+2Qe/O/NwukMs6nLtVqv19BQY6hU4=", - "zh:063897b38fd6231577c21a751ccd955716bca0e3abcf800a90dd1dd50fb24875", - "zh:19704c38c0cf229dc663e36a3ea53649780b7b5ec3953febbc95d7cb5e1cde27", + "h1:5nlEb2pLnQmbOIWvHOOsYD3dV6zpw/MbPB6//XPSxP4=", + "zh:0d26cfbf9417acd1c2295ccd5b0052abeac85ad1c3f6422ff09bf6a1ce16f00d", + "zh:144d4ea92fed541a6376bc76ad65ba4738dfd7bcab4c9d6cc20d35001338d06d", "zh:1c3e89cf19118fc07d7b04257251fc9897e722c16e0a0df7b07fcd261f8c12e7", - "zh:463c9351c86d161b6c81efd3109d45acec45f4269bf0180a589073eb5ab6b3e1", - "zh:54a1962e9f998f3725d801274fb8e0a1a6ad194e50f599d586aca265ed193934", - "zh:64fafb076204728168a3c369b9412a0c58ee44ac3175d79611626725e812e73a", - "zh:7283c00ca13c7e1a5d2976884a314daed6dea7e5e99e33d8f99eda28b277c12a", - "zh:95a564a55d2ed8cac1299577f7b1671e0f9d13c0429f5e321deabadb0740efed", - "zh:a325b5c5ea1a8188ad51c4d3ffea76362895bc4749c613e2ec5ac807b3ede902", - "zh:b3d58bb47fdb747734fdefef8bb7d08ae45fd8634792d839043ae326f333b33e", - "zh:da1b6043e5615f767b9685ab4cfdffc04e1b5ca808c7c004d83bac75cbc8f465", - "zh:fd5eb49039b7787a1133cbb9f2ba6b0183de10e7ba95aaaaebdee7b50e40c6d9", + "zh:2061d2cb64d8167d0af37e6610d0dc051977bd1ccc0e5cdd5ab02525ee239f96", + "zh:75562fdc3b313b7e538907199bfa588a1fcbc40113b0f3b7bfb496fbc358a32f", + "zh:78bef022ae9b1b0c636b7dd32bcda13fb273023f3a888cc005f3aa20e365b417", + "zh:ad8dbee59843154f8e93b24db9939a4257d13c7c86331eb93f1691294bc4e31f", + "zh:b3d83d7ac57073631704336a188cb746c473f728fc7ccb76abecb520e83fdf65", + "zh:c0bf9e0be73843de9089597be2720e4093b3ba320fbad99ab86da47681e77949", + "zh:c9a4c27d2b0800d3f4ece19d66c1fa574f7cd4ff66277af8f120d65e8f03f48e", + "zh:cd9ad8c848e17d9824045c33132cc0e87aa4d58cdb7bee6c0f6c3f9bc27892d5", + "zh:fbcafc21cdd19451274b905f9ee8a5b758ca63cc231e7544c815642e4a399c6d", ] } provider "registry.terraform.io/hashicorp/azurerm" { - version = "4.24.0" + version = "4.68.0" constraints = ">= 3.71.0" hashes = [ - "h1:QKLE+6C8K98qAoah9gY6H6twDjpFmujoJsw/uMAGp5Y=", - "zh:26cebd201fad0c361e757d8552208106b70fd8dbca3668229ae4eb92fcd69d20", - "zh:33e8929ef07dd515a93027d35b77ad28b9a9fa915d824c028e0df75bcd7ad18a", - "zh:3de012cfbb0e993826a4715a9b94908ab87e48f45a72b2ae87dc770bba1a38bc", - "zh:4d3fd7c389a1768e15ef0ad78fbf2c560d35284fcfb8196d775466bffe4aa8ca", - "zh:88b8979d73ea7f2361df4ae26b64202fac44c0bc1291d8cd4ffb9a605f99d35b", - "zh:95ebe18507cf32fe7cdbc3b8c69f78541be9511070a60d3d925e3ef4df7d7b20", - "zh:9ad4bd9262be7e6ea933ae3ce4696c86129be6b44c44a605e748ef95c897ea76", - "zh:a54609ff7eddf2b0eed9ae67e33c5fcdf94aa838a49d06052bbe632ed5453a91", - "zh:a6bdff023a0d9bc15fadda37b23202ec0f5d6fbb66013dcb70a9ad0f162a86f5", - "zh:cc4c82f23b2fe55126b06c719a8285ecf2cb9dd10b89c7a22af047f940c262e5", - "zh:ed32a4e66aaabb7fa919800a3fdb27bc3181844765f1109824af3a542b84bbf7", - "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", + "h1:oLcXwy3gUI3E+LxA6user9HvWljqI0AyDLAIrTJvjoE=", + "zh:08865385ea0c84d208d6ca16644336466e836d56c3639ac369210dbcb9187fb1", + "zh:0a42695cb13eefe955ad183e560a8bd35cfb714834525fd5b3749d66d347a562", + "zh:195b77405fc54bfc21aa0b20f63f34ad0362fe856cdade7db5a11cd16ae53d4d", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:996d0baa2d8462c55631f7c7982b8786ef7f632e3b401ebb596339178b7941a0", + "zh:99d43f9edfe225ade0069bd53634c7ae9208297c65db50f26ba5a31c1df3c9c3", + "zh:9e7a9d4dee8fd53dba6b0adf5485400f07ee0c603a079000e6246ca69e7ecfd4", + "zh:a59ce7d80bc451f03c88afd97cd5effad3079cea4974f0350527abec805e1fd4", + "zh:a9a6772178c1e40203c48a56ae611fb09625d1db64357c04ead34b60249188a3", + "zh:bdf0f56843cb67174cb32a2956701ac1b68bbdc5c311c62900de72f247d3d42d", + "zh:d02a5cd102ef3bfd98373b4d5e711b2f2d403595f4606fc29a897167da36edba", + "zh:dbbbb5a9da53e4a71b0b996c3abb9fe3f7422e07f50f5cf2f6eb56fa4ddd66e1", ] } provider "registry.terraform.io/hashicorp/null" { - version = "3.2.3" + version = "3.2.4" hashes = [ - "h1:zxoDtu918XPWJ/Y6s4aFrZydn6SfqkRc5Ax1ZLnC6Ew=", - "zh:22d062e5278d872fe7aed834f5577ba0a5afe34a3bdac2b81f828d8d3e6706d2", - "zh:23dead00493ad863729495dc212fd6c29b8293e707b055ce5ba21ee453ce552d", - "zh:28299accf21763ca1ca144d8f660688d7c2ad0b105b7202554ca60b02a3856d3", - "zh:55c9e8a9ac25a7652df8c51a8a9a422bd67d784061b1de2dc9fe6c3cb4e77f2f", - "zh:756586535d11698a216291c06b9ed8a5cc6a4ec43eee1ee09ecd5c6a9e297ac1", + "h1:+Ag4hSb4qQjNtAS6gj2+gsGl7v0iB/Bif6zZZU8lXsw=", + "zh:59f6b52ab4ff35739647f9509ee6d93d7c032985d9f8c6237d1f8a59471bbbe2", "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:9d5eea62fdb587eeb96a8c4d782459f4e6b73baeece4d04b4a40e44faaee9301", - "zh:a6355f596a3fb8fc85c2fb054ab14e722991533f87f928e7169a486462c74670", - "zh:b5a65a789cff4ada58a5baffc76cb9767dc26ec6b45c00d2ec8b1b027f6db4ed", - "zh:db5ab669cf11d0e9f81dc380a6fdfcac437aea3d69109c7aef1a5426639d2d65", - "zh:de655d251c470197bcbb5ac45d289595295acb8f829f6c781d4a75c8c8b7c7dd", - "zh:f5c68199f2e6076bce92a12230434782bf768103a427e9bb9abee99b116af7b5", + "zh:795c897119ff082133150121d39ff26cb5f89a730a2c8c26f3a9c1abf81a9c43", + "zh:7b9c7b16f118fbc2b05a983817b8ce2f86df125857966ad356353baf4bff5c0a", + "zh:85e33ab43e0e1726e5f97a874b8e24820b6565ff8076523cc2922ba671492991", + "zh:9d32ac3619cfc93eb3c4f423492a8e0f79db05fec58e449dee9b2d5873d5f69f", + "zh:9e15c3c9dd8e0d1e3731841d44c34571b6c97f5b95e8296a45318b94e5287a6e", + "zh:b4c2ab35d1b7696c30b64bf2c0f3a62329107bd1a9121ce70683dec58af19615", + "zh:c43723e8cc65bcdf5e0c92581dcbbdcbdcf18b8d2037406a5f2033b1e22de442", + "zh:ceb5495d9c31bfb299d246ab333f08c7fb0d67a4f82681fbf47f2a21c3e11ab5", + "zh:e171026b3659305c558d9804062762d168f50ba02b88b231d20ec99578a6233f", + "zh:ed0fe2acdb61330b01841fa790be00ec6beaac91d41f311fb8254f74eb6a711f", ] } diff --git a/terraform/.tflint.hcl b/terraform/.tflint.hcl deleted file mode 100644 index 4d40abe4..00000000 --- a/terraform/.tflint.hcl +++ /dev/null @@ -1,12 +0,0 @@ -plugin "terraform" { - enabled = true - preset = "recommended" -} - -rule "terraform_unused_declarations" { - enabled = true -} - -rule "terraform_required_providers" { - enabled = true -} diff --git a/terraform/main.tf b/terraform/main.tf index 9a60563f..e48479a0 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -35,7 +35,7 @@ module "configure_acr_access" { source = "./modules/acr-access" acr_name = var.acr_name aks_identity_principal_id = module.aks.principal_id - resource_group_name = "rg-azure-devops-acr-d01" + resource_group_name = "rg-acr-d01" aks_name = module.aks.name aks_resource_group = module.aks.resource_group_name diff --git a/terraform/modules/grafana/main.tf b/terraform/modules/grafana/main.tf index 094c1027..f62a71e1 100644 --- a/terraform/modules/grafana/main.tf +++ b/terraform/modules/grafana/main.tf @@ -7,7 +7,7 @@ resource "azurerm_dashboard_grafana" "grafana" { public_network_access_enabled = true sku = "Standard" zone_redundancy_enabled = true - grafana_major_version = 10 + grafana_major_version = 11 azure_monitor_workspace_integrations { resource_id = var.prometheus_id diff --git a/terraform/terraform.auto.tfvars.json b/terraform/terraform.auto.tfvars.json index e233dd23..adf2cf65 100644 --- a/terraform/terraform.auto.tfvars.json +++ b/terraform/terraform.auto.tfvars.json @@ -1,18 +1,18 @@ { - "resource_group_name": "rg-aks-terraform", - "resource_group_location": "northeurope", - "prefix": "d01", - "kubernetes_version": "1.31.2", - "cluster_name": "my-aks-cluster", - "default_node_pool_vm_size": "Standard_DS2_v2", - "default_node_pool_type": "VirtualMachineScaleSets", - "system_node_count": 3, - "log_analytics_sku": "PerGB2018", - "should_deploy_log_analytics": false, - "should_deploy_prometheus": false, - "acr_name": "azuredevopsacrd01", - "subscription_id": "f32f6566-8fa0-4198-9c91-a3b8ac69e89a", - "tenant_id": "b40a105f-0643-4922-8e60-10fc1abf9c4b", - "client_id": "ab0a5dc1-ee52-4574-96e0-469f237928a6", - "client_secret": "VERY_SECRET_PASSWORD" + "resource_group_name": "rg-aks-terraform", + "resource_group_location": "northeurope", + "prefix": "d01", + "kubernetes_version": "1.35.1", + "cluster_name": "my-aks-cluster", + "default_node_pool_vm_size": "Standard_DS2_v2", + "default_node_pool_type": "VirtualMachineScaleSets", + "system_node_count": 3, + "log_analytics_sku": "PerGB2018", + "should_deploy_log_analytics": true, + "should_deploy_prometheus": true, + "acr_name": "acrsharedd01", + "subscription_id": "1b08b9a2-ac6d-4b86-8a2f-8fef552c8371", + "tenant_id": "b40a105f-0643-4922-8e60-10fc1abf9c4b", + "client_id": "ab0a5dc1-ee52-4574-96e0-469f237928a6", + "client_secret": "VERY_SECRET_PASSWORD" } From 85e5f61ff3ccf310cc24bce9a1d6076b908dbcbf Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 15:07:33 +0200 Subject: [PATCH 06/22] remove unused library --- build/terraform-create-aks-cluster.yml | 1 - build/terraform-destroy-aks-cluster.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/build/terraform-create-aks-cluster.yml b/build/terraform-create-aks-cluster.yml index 89318b51..4dc4f165 100644 --- a/build/terraform-create-aks-cluster.yml +++ b/build/terraform-create-aks-cluster.yml @@ -17,7 +17,6 @@ pr: none variables: - group: Azure_Terraform_Integration - - group: Postgres_Rabbit_Connection_Credentials - group: Terraform_Auto_Tfvars_Json_Transform - group: AKS_Settings - group: Prefix_Library diff --git a/build/terraform-destroy-aks-cluster.yml b/build/terraform-destroy-aks-cluster.yml index 5df94bfa..5b9ccd5f 100644 --- a/build/terraform-destroy-aks-cluster.yml +++ b/build/terraform-destroy-aks-cluster.yml @@ -12,7 +12,6 @@ pr: none variables: - group: Azure_Terraform_Integration - - group: Postgres_Rabbit_Connection_Credentials - group: Terraform_Auto_Tfvars_Json_Transform - group: Prefix_Library - group: AKS_Settings From 8792cbc92b893d4d4315381ea6e7242705573473 Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 21:05:24 +0200 Subject: [PATCH 07/22] add sonarcloud scan --- CHANGELOG.md | 1 + build/auth-azure-pipelines-pr-validation.yml | 5 +-- ...consumer-azure-pipelines-pr-validation.yml | 1 + .../sender-azure-pipelines-pr-validation.yml | 1 + build/templates/docker-build-push-jobs.yml | 35 ++++++++++++++++--- 5 files changed, 37 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e318bf1..32fcd3bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,3 +38,4 @@ and this project adheres to [Semantic Versioning v2.0.0](https://semver.org/spec - Delete ArgoCD configs - Add Renovate dashboard link to README - Update GitVersion tasks in Azure DevOps +- Add SonarCloud scan to Azure DevOps PR validation diff --git a/build/auth-azure-pipelines-pr-validation.yml b/build/auth-azure-pipelines-pr-validation.yml index ef6a2b90..adf30891 100644 --- a/build/auth-azure-pipelines-pr-validation.yml +++ b/build/auth-azure-pipelines-pr-validation.yml @@ -35,8 +35,8 @@ stages: buildConfiguration: 'Release' backendProjectPath: '$(System.DefaultWorkingDirectory)/src/authorization/EventTriangleAPI.Authorization.Presentation' unitTestsProjectPath: '$(System.DefaultWorkingDirectory)/src/authorization/EventTriangleAPI.Authorization.UnitTests/EventTriangleAPI.Authorization.UnitTests.csproj' - shouldRunUnitTests: 'true' - shouldRunIntegrationTests: 'true' + shouldRunUnitTests: true + shouldRunIntegrationTests: true integrationTestsProjectPath: '$(System.DefaultWorkingDirectory)/src/authorization/EventTriangleAPI.Authorization.IntegrationTests/EventTriangleAPI.Authorization.IntegrationTests.csproj' dockerRegistryUrl: 'docker.io/kaminome' dockerBuildParameterUrl: 'https://auth-eventtriangle.razumovsky.me/' @@ -45,6 +45,7 @@ stages: dockerServiceConnection: 'Docker_Hub_Connection' acrRegistryUrl: 'acrsharedd01.azurecr.io' acrServiceConnection: 'Azure_ACR_Connection' + sonarCloudEnabled: true workingDirectoryForDocker: '$(System.DefaultWorkingDirectory)/src' # - stage: 'AKS_Helm_Deploy_${{ variables.appName }}' diff --git a/build/consumer-azure-pipelines-pr-validation.yml b/build/consumer-azure-pipelines-pr-validation.yml index fe03295c..486378dd 100644 --- a/build/consumer-azure-pipelines-pr-validation.yml +++ b/build/consumer-azure-pipelines-pr-validation.yml @@ -48,6 +48,7 @@ stages: dockerServiceConnection: 'Docker_Hub_Connection' acrRegistryUrl: 'acrsharedd01.azurecr.io' acrServiceConnection: 'Azure_ACR_Connection' + sonarCloudEnabled: true workingDirectoryForDocker: '$(System.DefaultWorkingDirectory)/src' # - stage: 'AKS_Helm_Deploy_${{ variables.appName }}' diff --git a/build/sender-azure-pipelines-pr-validation.yml b/build/sender-azure-pipelines-pr-validation.yml index 25184d38..aab47c5a 100644 --- a/build/sender-azure-pipelines-pr-validation.yml +++ b/build/sender-azure-pipelines-pr-validation.yml @@ -48,4 +48,5 @@ stages: dockerServiceConnection: 'Docker_Hub_Connection' acrRegistryUrl: 'acrsharedd01.azurecr.io' acrServiceConnection: 'Azure_ACR_Connection' + sonarCloudEnabled: true workingDirectoryForDocker: '$(System.DefaultWorkingDirectory)/src' diff --git a/build/templates/docker-build-push-jobs.yml b/build/templates/docker-build-push-jobs.yml index e8189e6d..0f3e88dd 100644 --- a/build/templates/docker-build-push-jobs.yml +++ b/build/templates/docker-build-push-jobs.yml @@ -27,7 +27,7 @@ parameters: - name: shouldRunUnitTests displayName: 'Flag should run unit tests' - default: 'true' + default: true type: boolean - name: shouldRunIntegrationTests @@ -36,7 +36,7 @@ parameters: - name: integrationTestsProjectPath displayName: 'Integration tests project path' - type: string + type: boolean - name: gitVersionVersion displayName: 'GitVersion version' @@ -72,6 +72,11 @@ parameters: default: 'https://auth.eventtriangle.razumovsky.me/' type: string + - name: sonarCloudEnabled + displayName: 'Is SonarCloud scan enabled' + default: false + type: boolean + jobs: - job: ${{ parameters.JobName }} displayName: ${{ parameters.JobName }} @@ -102,6 +107,19 @@ jobs: arguments: '--verbosity minimal' nugetConfigPath: 'nuget.config' + - ${{ if eq(parameters.sonarCloudEnabled, true) }}: + - task: SonarCloudPrepare@4 + inputs: + SonarCloud: SonarCloud_Service_Connection + organization: event-triangle + scannerMode: dotnet + projectKey: event-triangle_eventtriangleapi + projectName: eventtriangleapi + extraProperties: | + sonar.cs.vstest.reportsPaths=$(Agent.TempDirectory)/**/*.trx + sonar.cs.opencover.reportsPaths=$(Agent.TempDirectory)/**/*opencover.xml + sonar.exclusions=**/Properties/**, **/bin/**, **/obj/**, **/Migrations/** + - task: DotNetCoreCLI@2 displayName: 'Build solution' inputs: @@ -109,7 +127,16 @@ jobs: projects: '${{ parameters.solution }}' arguments: '-c ${{ parameters.buildConfiguration }} -p:Version=$(version_step.semVer) --no-restore' - - ${{ if eq(parameters.shouldRunUnitTests, 'true') }}: + - ${{ if eq(parameters.sonarCloudEnabled, true) }}: + - task: SonarCloudAnalyze@4 + inputs: {} + + - ${{ if eq(parameters.sonarCloudEnabled, true) }}: + - task: SonarCloudPublish@4 + inputs: + pollingTimeoutSec: "300" + + - ${{ if eq(parameters.shouldRunUnitTests, true) }}: - task: DotnetCoreCLI@2 displayName: 'Run unit tests' inputs: @@ -117,7 +144,7 @@ jobs: projects: '${{ parameters.unitTestsProjectPath }}' arguments: '--no-build --configuration ${{ parameters.buildConfiguration }} --collect "Code Coverage"' - - ${{ if eq(parameters.shouldRunIntegrationTests, 'true') }}: + - ${{ if eq(parameters.shouldRunIntegrationTests, true) }}: - task: DotNetCoreCLI@2 displayName: 'Run integration tests' inputs: From b1cc10d87724c18a8bfaa139d40f295e0c4a2a36 Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 21:07:20 +0200 Subject: [PATCH 08/22] fix ci --- build/auth-azure-pipelines-pr-validation.yml | 6 +++--- build/consumer-azure-pipelines-pr-validation.yml | 2 +- build/sender-azure-pipelines-pr-validation.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/auth-azure-pipelines-pr-validation.yml b/build/auth-azure-pipelines-pr-validation.yml index adf30891..2a411381 100644 --- a/build/auth-azure-pipelines-pr-validation.yml +++ b/build/auth-azure-pipelines-pr-validation.yml @@ -35,8 +35,8 @@ stages: buildConfiguration: 'Release' backendProjectPath: '$(System.DefaultWorkingDirectory)/src/authorization/EventTriangleAPI.Authorization.Presentation' unitTestsProjectPath: '$(System.DefaultWorkingDirectory)/src/authorization/EventTriangleAPI.Authorization.UnitTests/EventTriangleAPI.Authorization.UnitTests.csproj' - shouldRunUnitTests: true - shouldRunIntegrationTests: true + shouldRunUnitTests: 'true' + shouldRunIntegrationTests: 'true' integrationTestsProjectPath: '$(System.DefaultWorkingDirectory)/src/authorization/EventTriangleAPI.Authorization.IntegrationTests/EventTriangleAPI.Authorization.IntegrationTests.csproj' dockerRegistryUrl: 'docker.io/kaminome' dockerBuildParameterUrl: 'https://auth-eventtriangle.razumovsky.me/' @@ -45,7 +45,7 @@ stages: dockerServiceConnection: 'Docker_Hub_Connection' acrRegistryUrl: 'acrsharedd01.azurecr.io' acrServiceConnection: 'Azure_ACR_Connection' - sonarCloudEnabled: true + sonarCloudEnabled: 'true' workingDirectoryForDocker: '$(System.DefaultWorkingDirectory)/src' # - stage: 'AKS_Helm_Deploy_${{ variables.appName }}' diff --git a/build/consumer-azure-pipelines-pr-validation.yml b/build/consumer-azure-pipelines-pr-validation.yml index 486378dd..8b3c2864 100644 --- a/build/consumer-azure-pipelines-pr-validation.yml +++ b/build/consumer-azure-pipelines-pr-validation.yml @@ -48,7 +48,7 @@ stages: dockerServiceConnection: 'Docker_Hub_Connection' acrRegistryUrl: 'acrsharedd01.azurecr.io' acrServiceConnection: 'Azure_ACR_Connection' - sonarCloudEnabled: true + sonarCloudEnabled: 'true' workingDirectoryForDocker: '$(System.DefaultWorkingDirectory)/src' # - stage: 'AKS_Helm_Deploy_${{ variables.appName }}' diff --git a/build/sender-azure-pipelines-pr-validation.yml b/build/sender-azure-pipelines-pr-validation.yml index aab47c5a..1ea7fd4d 100644 --- a/build/sender-azure-pipelines-pr-validation.yml +++ b/build/sender-azure-pipelines-pr-validation.yml @@ -48,5 +48,5 @@ stages: dockerServiceConnection: 'Docker_Hub_Connection' acrRegistryUrl: 'acrsharedd01.azurecr.io' acrServiceConnection: 'Azure_ACR_Connection' - sonarCloudEnabled: true + sonarCloudEnabled: 'true' workingDirectoryForDocker: '$(System.DefaultWorkingDirectory)/src' From c3b8af06118719f6ae381d5fb4f63d2e8cb52119 Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 21:08:51 +0200 Subject: [PATCH 09/22] fix pipelines --- build/auth-azure-pipelines-pr-validation.yml | 6 +++--- build/consumer-azure-pipelines-pr-validation.yml | 6 +++--- build/sender-azure-pipelines-pr-validation.yml | 6 +++--- build/templates/docker-build-push-jobs.yml | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/build/auth-azure-pipelines-pr-validation.yml b/build/auth-azure-pipelines-pr-validation.yml index 2a411381..adf30891 100644 --- a/build/auth-azure-pipelines-pr-validation.yml +++ b/build/auth-azure-pipelines-pr-validation.yml @@ -35,8 +35,8 @@ stages: buildConfiguration: 'Release' backendProjectPath: '$(System.DefaultWorkingDirectory)/src/authorization/EventTriangleAPI.Authorization.Presentation' unitTestsProjectPath: '$(System.DefaultWorkingDirectory)/src/authorization/EventTriangleAPI.Authorization.UnitTests/EventTriangleAPI.Authorization.UnitTests.csproj' - shouldRunUnitTests: 'true' - shouldRunIntegrationTests: 'true' + shouldRunUnitTests: true + shouldRunIntegrationTests: true integrationTestsProjectPath: '$(System.DefaultWorkingDirectory)/src/authorization/EventTriangleAPI.Authorization.IntegrationTests/EventTriangleAPI.Authorization.IntegrationTests.csproj' dockerRegistryUrl: 'docker.io/kaminome' dockerBuildParameterUrl: 'https://auth-eventtriangle.razumovsky.me/' @@ -45,7 +45,7 @@ stages: dockerServiceConnection: 'Docker_Hub_Connection' acrRegistryUrl: 'acrsharedd01.azurecr.io' acrServiceConnection: 'Azure_ACR_Connection' - sonarCloudEnabled: 'true' + sonarCloudEnabled: true workingDirectoryForDocker: '$(System.DefaultWorkingDirectory)/src' # - stage: 'AKS_Helm_Deploy_${{ variables.appName }}' diff --git a/build/consumer-azure-pipelines-pr-validation.yml b/build/consumer-azure-pipelines-pr-validation.yml index 8b3c2864..997d27b3 100644 --- a/build/consumer-azure-pipelines-pr-validation.yml +++ b/build/consumer-azure-pipelines-pr-validation.yml @@ -39,8 +39,8 @@ stages: buildConfiguration: 'Release' backendProjectPath: '$(System.DefaultWorkingDirectory)/src/consumer/EventTriangleAPI.Consumer.Presentation' unitTestsProjectPath: '$(System.DefaultWorkingDirectory)/src/consumer/EventTriangleAPI.Consumer.UnitTests/EventTriangleAPI.Consumer.UnitTests.csproj' - shouldRunUnitTests: 'true' - shouldRunIntegrationTests: 'true' + shouldRunUnitTests: true + shouldRunIntegrationTests: true integrationTestsProjectPath: '$(System.DefaultWorkingDirectory)/src/consumer/EventTriangleAPI.Consumer.IntegrationTests/EventTriangleAPI.Consumer.IntegrationTests.csproj' dockerRegistryUrl: 'docker.io/kaminome' imageRepository: 'consumer-service' @@ -48,7 +48,7 @@ stages: dockerServiceConnection: 'Docker_Hub_Connection' acrRegistryUrl: 'acrsharedd01.azurecr.io' acrServiceConnection: 'Azure_ACR_Connection' - sonarCloudEnabled: 'true' + sonarCloudEnabled: true workingDirectoryForDocker: '$(System.DefaultWorkingDirectory)/src' # - stage: 'AKS_Helm_Deploy_${{ variables.appName }}' diff --git a/build/sender-azure-pipelines-pr-validation.yml b/build/sender-azure-pipelines-pr-validation.yml index 1ea7fd4d..95a52638 100644 --- a/build/sender-azure-pipelines-pr-validation.yml +++ b/build/sender-azure-pipelines-pr-validation.yml @@ -39,8 +39,8 @@ stages: buildConfiguration: 'Release' backendProjectPath: '$(System.DefaultWorkingDirectory)/src/sender/EventTriangleAPI.Sender.Presentation' unitTestsProjectPath: '$(System.DefaultWorkingDirectory)/src/sender/EventTriangleAPI.Sender.UnitTests/EventTriangleAPI.Sender.UnitTests.csproj' - shouldRunIntegrationTests: 'true' - shouldRunUnitTests: 'true' + shouldRunIntegrationTests: true + shouldRunUnitTests: true integrationTestsProjectPath: '$(System.DefaultWorkingDirectory)/src/sender/EventTriangleAPI.Sender.IntegrationTests/EventTriangleAPI.Sender.IntegrationTests.csproj' dockerRegistryUrl: 'docker.io/kaminome' imageRepository: 'sender-service' @@ -48,5 +48,5 @@ stages: dockerServiceConnection: 'Docker_Hub_Connection' acrRegistryUrl: 'acrsharedd01.azurecr.io' acrServiceConnection: 'Azure_ACR_Connection' - sonarCloudEnabled: 'true' + sonarCloudEnabled: true workingDirectoryForDocker: '$(System.DefaultWorkingDirectory)/src' diff --git a/build/templates/docker-build-push-jobs.yml b/build/templates/docker-build-push-jobs.yml index 0f3e88dd..2cb9ddba 100644 --- a/build/templates/docker-build-push-jobs.yml +++ b/build/templates/docker-build-push-jobs.yml @@ -36,7 +36,7 @@ parameters: - name: integrationTestsProjectPath displayName: 'Integration tests project path' - type: boolean + type: string - name: gitVersionVersion displayName: 'GitVersion version' From b33ec62d3cd022e311200d206f54fc61a988109a Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 21:11:08 +0200 Subject: [PATCH 10/22] fix yaml spacing --- build/templates/docker-build-push-jobs.yml | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/build/templates/docker-build-push-jobs.yml b/build/templates/docker-build-push-jobs.yml index 2cb9ddba..ba01cd2a 100644 --- a/build/templates/docker-build-push-jobs.yml +++ b/build/templates/docker-build-push-jobs.yml @@ -108,17 +108,17 @@ jobs: nugetConfigPath: 'nuget.config' - ${{ if eq(parameters.sonarCloudEnabled, true) }}: - - task: SonarCloudPrepare@4 - inputs: - SonarCloud: SonarCloud_Service_Connection - organization: event-triangle - scannerMode: dotnet - projectKey: event-triangle_eventtriangleapi - projectName: eventtriangleapi - extraProperties: | - sonar.cs.vstest.reportsPaths=$(Agent.TempDirectory)/**/*.trx - sonar.cs.opencover.reportsPaths=$(Agent.TempDirectory)/**/*opencover.xml - sonar.exclusions=**/Properties/**, **/bin/**, **/obj/**, **/Migrations/** + - task: SonarCloudPrepare@4 + inputs: + SonarCloud: SonarCloud_Service_Connection + organization: event-triangle + scannerMode: dotnet + projectKey: event-triangle_eventtriangleapi + projectName: eventtriangleapi + extraProperties: | + sonar.cs.vstest.reportsPaths=$(Agent.TempDirectory)/**/*.trx + sonar.cs.opencover.reportsPaths=$(Agent.TempDirectory)/**/*opencover.xml + sonar.exclusions=**/Properties/**, **/bin/**, **/obj/**, **/Migrations/** - task: DotNetCoreCLI@2 displayName: 'Build solution' @@ -128,13 +128,13 @@ jobs: arguments: '-c ${{ parameters.buildConfiguration }} -p:Version=$(version_step.semVer) --no-restore' - ${{ if eq(parameters.sonarCloudEnabled, true) }}: - - task: SonarCloudAnalyze@4 - inputs: {} + - task: SonarCloudAnalyze@4 + inputs: {} - ${{ if eq(parameters.sonarCloudEnabled, true) }}: - - task: SonarCloudPublish@4 - inputs: - pollingTimeoutSec: "300" + - task: SonarCloudPublish@4 + inputs: + pollingTimeoutSec: "300" - ${{ if eq(parameters.shouldRunUnitTests, true) }}: - task: DotnetCoreCLI@2 From 1305b7f04210855f08955ce7ebdad78e0fb50a96 Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 22:03:33 +0200 Subject: [PATCH 11/22] update readme --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 94ccfa81..228d70d9 100644 --- a/README.md +++ b/README.md @@ -109,9 +109,10 @@ EventTriangleAPI offers realtime communication using SignalR. ## Useful links -- Docker images: https://hub.docker.com/u/kaminome -- Azure DevOps project: https://dev.azure.com/EventTriangle/EventTriangleAPI +- Docker: https://hub.docker.com/u/kaminome +- Azure DevOps: https://dev.azure.com/EventTriangle/EventTriangleAPI - Renovate: https://developer.mend.io/github/EventTriangle/EventTriangleAPI +- SonarCloud: https://sonarcloud.io/organizations/event-triangle/projects ## How to run Docker compose From c52658d1d30f83bc37c2d7e4606064edc0540494 Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 22:05:24 +0200 Subject: [PATCH 12/22] minor edits in ci --- build/auth-azure-pipelines-pr-validation.yml | 16 ---------------- .../consumer-azure-pipelines-pr-validation.yml | 18 +----------------- build/sender-azure-pipelines-pr-validation.yml | 2 +- 3 files changed, 2 insertions(+), 34 deletions(-) diff --git a/build/auth-azure-pipelines-pr-validation.yml b/build/auth-azure-pipelines-pr-validation.yml index adf30891..76374dcc 100644 --- a/build/auth-azure-pipelines-pr-validation.yml +++ b/build/auth-azure-pipelines-pr-validation.yml @@ -47,19 +47,3 @@ stages: acrServiceConnection: 'Azure_ACR_Connection' sonarCloudEnabled: true workingDirectoryForDocker: '$(System.DefaultWorkingDirectory)/src' - -# - stage: 'AKS_Helm_Deploy_${{ variables.appName }}' -# displayName: 'AKS_Helm_Deploy_${{ variables.appName }}' -# dependsOn: 'Build_${{ variables.appName }}' -# condition: succeeded('Build_${{ variables.appName }}') -# jobs: -# - template: templates/helm-deploy-jobs.yml -# parameters: -# chartName: 'auth-service-chart' -# stageDisplayName: 'AKS_Helm_Deploy_${{ variables.appName }}' -# vmImage: 'ubuntu-latest' -# environment: 'aks' -# serviceConnection: 'Azure_Connection' -# azureResourceGroup: '$(library-aks-resource-group)' -# kubernetesCluster: '$(library-aks-cluster-name)' -# namespace: 'event-triangle' diff --git a/build/consumer-azure-pipelines-pr-validation.yml b/build/consumer-azure-pipelines-pr-validation.yml index 997d27b3..999bf6e7 100644 --- a/build/consumer-azure-pipelines-pr-validation.yml +++ b/build/consumer-azure-pipelines-pr-validation.yml @@ -48,21 +48,5 @@ stages: dockerServiceConnection: 'Docker_Hub_Connection' acrRegistryUrl: 'acrsharedd01.azurecr.io' acrServiceConnection: 'Azure_ACR_Connection' - sonarCloudEnabled: true + sonarCloudEnabled: false workingDirectoryForDocker: '$(System.DefaultWorkingDirectory)/src' - -# - stage: 'AKS_Helm_Deploy_${{ variables.appName }}' -# displayName: 'AKS_Helm_Deploy_${{ variables.appName }}' -# dependsOn: 'Build_${{ variables.appName }}' -# condition: succeeded('Build_${{ variables.appName }}') -# jobs: -# - template: templates/helm-deploy-jobs.yml -# parameters: -# chartName: 'consumer-service-chart' -# stageDisplayName: 'AKS_Helm_Deploy_${{ variables.appName }}' -# vmImage: 'ubuntu-latest' -# environment: 'aks' -# serviceConnection: 'Azure_Connection' -# azureResourceGroup: '$(library-aks-resource-group)' -# kubernetesCluster: '$(library-aks-cluster-name)' -# namespace: 'event-triangle' diff --git a/build/sender-azure-pipelines-pr-validation.yml b/build/sender-azure-pipelines-pr-validation.yml index 95a52638..79f0bde3 100644 --- a/build/sender-azure-pipelines-pr-validation.yml +++ b/build/sender-azure-pipelines-pr-validation.yml @@ -48,5 +48,5 @@ stages: dockerServiceConnection: 'Docker_Hub_Connection' acrRegistryUrl: 'acrsharedd01.azurecr.io' acrServiceConnection: 'Azure_ACR_Connection' - sonarCloudEnabled: true + sonarCloudEnabled: false workingDirectoryForDocker: '$(System.DefaultWorkingDirectory)/src' From 4834978604f36453d2c7172782d5a9707e0ffb6f Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 22:14:35 +0200 Subject: [PATCH 13/22] add push acr flag --- build/auth-azure-pipelines-pr-validation.yml | 1 + ...consumer-azure-pipelines-pr-validation.yml | 1 + .../sender-azure-pipelines-pr-validation.yml | 1 + build/templates/docker-build-push-jobs.yml | 23 +++++++++++-------- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/build/auth-azure-pipelines-pr-validation.yml b/build/auth-azure-pipelines-pr-validation.yml index 76374dcc..814dcf6e 100644 --- a/build/auth-azure-pipelines-pr-validation.yml +++ b/build/auth-azure-pipelines-pr-validation.yml @@ -43,6 +43,7 @@ stages: imageRepository: 'auth-service' dockerfilePath: '$(System.DefaultWorkingDirectory)/src/authorization/Dockerfile' dockerServiceConnection: 'Docker_Hub_Connection' + shouldPushToAcr: true acrRegistryUrl: 'acrsharedd01.azurecr.io' acrServiceConnection: 'Azure_ACR_Connection' sonarCloudEnabled: true diff --git a/build/consumer-azure-pipelines-pr-validation.yml b/build/consumer-azure-pipelines-pr-validation.yml index 999bf6e7..13156056 100644 --- a/build/consumer-azure-pipelines-pr-validation.yml +++ b/build/consumer-azure-pipelines-pr-validation.yml @@ -46,6 +46,7 @@ stages: imageRepository: 'consumer-service' dockerfilePath: '$(System.DefaultWorkingDirectory)/src/consumer/Dockerfile' dockerServiceConnection: 'Docker_Hub_Connection' + shouldPushToAcr: true acrRegistryUrl: 'acrsharedd01.azurecr.io' acrServiceConnection: 'Azure_ACR_Connection' sonarCloudEnabled: false diff --git a/build/sender-azure-pipelines-pr-validation.yml b/build/sender-azure-pipelines-pr-validation.yml index 79f0bde3..0ae1cef4 100644 --- a/build/sender-azure-pipelines-pr-validation.yml +++ b/build/sender-azure-pipelines-pr-validation.yml @@ -46,6 +46,7 @@ stages: imageRepository: 'sender-service' dockerfilePath: '$(System.DefaultWorkingDirectory)/src/sender/Dockerfile' dockerServiceConnection: 'Docker_Hub_Connection' + shouldPushToAcr: true acrRegistryUrl: 'acrsharedd01.azurecr.io' acrServiceConnection: 'Azure_ACR_Connection' sonarCloudEnabled: false diff --git a/build/templates/docker-build-push-jobs.yml b/build/templates/docker-build-push-jobs.yml index ba01cd2a..be4966aa 100644 --- a/build/templates/docker-build-push-jobs.yml +++ b/build/templates/docker-build-push-jobs.yml @@ -47,6 +47,10 @@ parameters: type: string displayName: 'DockerHub Registry URL. For Docker Hub it is: docker.io/kaminome.' + - name: shouldPushToAcr + type: boolean + default: false + - name: acrRegistryUrl type: string displayName: 'ACR Registry URL. For ACR it is FQDN URL of container registry: azuredevopsacrd01.azurecr.io' @@ -177,15 +181,16 @@ jobs: $(version_step.semVer) latest - - task: Docker@2 - displayName: 'Push to ACR' - inputs: - command: push - containerRegistry: ${{ parameters.acrServiceConnection }} - repository: ${{ parameters.imageRepository }} - tags: | - $(version_step.semVer) - latest + - ${{ if eq(parameters.shouldPushToAcr, true) }}: + - task: Docker@2 + displayName: 'Push to ACR' + inputs: + command: push + containerRegistry: ${{ parameters.acrServiceConnection }} + repository: ${{ parameters.imageRepository }} + tags: | + $(version_step.semVer) + latest - script: | touch $(System.DefaultWorkingDirectory)/helm/version.txt From 238aaffd53ee8af541f629b2e0c1e23dba7da472 Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 22:15:46 +0200 Subject: [PATCH 14/22] remove unnecessary steps --- build/templates/docker-build-push-jobs.yml | 38 +++------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/build/templates/docker-build-push-jobs.yml b/build/templates/docker-build-push-jobs.yml index be4966aa..28fe949d 100644 --- a/build/templates/docker-build-push-jobs.yml +++ b/build/templates/docker-build-push-jobs.yml @@ -135,11 +135,6 @@ jobs: - task: SonarCloudAnalyze@4 inputs: {} - - ${{ if eq(parameters.sonarCloudEnabled, true) }}: - - task: SonarCloudPublish@4 - inputs: - pollingTimeoutSec: "300" - - ${{ if eq(parameters.shouldRunUnitTests, true) }}: - task: DotnetCoreCLI@2 displayName: 'Run unit tests' @@ -192,32 +187,7 @@ jobs: $(version_step.semVer) latest - - script: | - touch $(System.DefaultWorkingDirectory)/helm/version.txt - echo "Version txt has been created" - echo $(version_step.semVer) >> $(System.DefaultWorkingDirectory)/helm/version.txt - echo "Version file has been updated with: $(version_step.semVer)" - displayName: "Update version file" - - - task: CopyFiles@2 - displayName: 'Copy Deploy-Helm-Chart.ps1' - inputs: - SourceFolder: '$(System.DefaultWorkingDirectory)/scripts' - Contents: 'Deploy-Helm-Chart.ps1' - TargetFolder: '$(System.DefaultWorkingDirectory)/helm' - CleanTargetFolder: false - OverWrite: true - - - task: PublishBuildArtifacts@1 - displayName: 'Publish Helm Charts' - inputs: - PathtoPublish: '$(System.DefaultWorkingDirectory)/helm' - ArtifactName: 'helm' - publishLocation: 'Container' - - - task: PublishBuildArtifacts@1 - displayName: 'Publish Manifests' - inputs: - pathToPublish: '$(System.DefaultWorkingDirectory)/kubernetes' - artifactName: 'k8s-manifests' - publishLocation: 'Container' + - ${{ if eq(parameters.sonarCloudEnabled, true) }}: + - task: SonarCloudPublish@4 + inputs: + pollingTimeoutSec: "300" From ade191b55fa2ee273614a0917b785b49286cc1ec Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 22:25:20 +0200 Subject: [PATCH 15/22] files structure for azure pipelines --- .../deprecated/angular-build-azure-pipelines-ci.yml | 0 .../deprecated/auth-azure-pipelines-acr-push.yml | 0 .../deprecated}/auth-azure-pipelines-aks-helm-deploy.yml | 0 .../deprecated/azure-k8s-rollout-deploy-jobs.yml | 0 .../deprecated/consumer-azure-pipelines-acr-push.yml | 0 .../deprecated}/consumer-azure-pipelines-aks-helm-deploy.yml | 0 .../deprecated/docker-build-push-acr-jobs.yml | 0 .../deprecated}/helm-deploy-jobs.yml | 0 .../deprecated/sender-azure-pipelines-acr-push.yml | 0 .../deprecated}/sender-azure-pipelines-aks-helm-deploy.yml | 0 .../infrastructure}/configure-aks-cluster.yml | 0 .../infrastructure/terraform-create.yml | 0 .../infrastructure/terraform-destroy.yml | 0 .../pr-validation/pr-validation-auth.yml | 2 +- .../pr-validation/pr-validation-consumer.yml | 2 +- .../pr-validation/pr-validation-sender.yml | 2 +- .../templates/configure-cluster-stages.yml | 0 {build => azure-pipelines}/templates/docker-build-push-jobs.yml | 0 {build => azure-pipelines}/templates/terraform-apply-stages.yml | 0 {build => azure-pipelines}/templates/terraform-plan-stages.yml | 0 20 files changed, 3 insertions(+), 3 deletions(-) rename {build => azure-pipelines}/deprecated/angular-build-azure-pipelines-ci.yml (100%) rename {build => azure-pipelines}/deprecated/auth-azure-pipelines-acr-push.yml (100%) rename {build => azure-pipelines/deprecated}/auth-azure-pipelines-aks-helm-deploy.yml (100%) rename {build => azure-pipelines}/deprecated/azure-k8s-rollout-deploy-jobs.yml (100%) rename {build => azure-pipelines}/deprecated/consumer-azure-pipelines-acr-push.yml (100%) rename {build => azure-pipelines/deprecated}/consumer-azure-pipelines-aks-helm-deploy.yml (100%) rename {build => azure-pipelines}/deprecated/docker-build-push-acr-jobs.yml (100%) rename {build/templates => azure-pipelines/deprecated}/helm-deploy-jobs.yml (100%) rename {build => azure-pipelines}/deprecated/sender-azure-pipelines-acr-push.yml (100%) rename {build => azure-pipelines/deprecated}/sender-azure-pipelines-aks-helm-deploy.yml (100%) rename {build => azure-pipelines/infrastructure}/configure-aks-cluster.yml (100%) rename build/terraform-create-aks-cluster.yml => azure-pipelines/infrastructure/terraform-create.yml (100%) rename build/terraform-destroy-aks-cluster.yml => azure-pipelines/infrastructure/terraform-destroy.yml (100%) rename build/auth-azure-pipelines-pr-validation.yml => azure-pipelines/pr-validation/pr-validation-auth.yml (97%) rename build/consumer-azure-pipelines-pr-validation.yml => azure-pipelines/pr-validation/pr-validation-consumer.yml (97%) rename build/sender-azure-pipelines-pr-validation.yml => azure-pipelines/pr-validation/pr-validation-sender.yml (97%) rename {build => azure-pipelines}/templates/configure-cluster-stages.yml (100%) rename {build => azure-pipelines}/templates/docker-build-push-jobs.yml (100%) rename {build => azure-pipelines}/templates/terraform-apply-stages.yml (100%) rename {build => azure-pipelines}/templates/terraform-plan-stages.yml (100%) diff --git a/build/deprecated/angular-build-azure-pipelines-ci.yml b/azure-pipelines/deprecated/angular-build-azure-pipelines-ci.yml similarity index 100% rename from build/deprecated/angular-build-azure-pipelines-ci.yml rename to azure-pipelines/deprecated/angular-build-azure-pipelines-ci.yml diff --git a/build/deprecated/auth-azure-pipelines-acr-push.yml b/azure-pipelines/deprecated/auth-azure-pipelines-acr-push.yml similarity index 100% rename from build/deprecated/auth-azure-pipelines-acr-push.yml rename to azure-pipelines/deprecated/auth-azure-pipelines-acr-push.yml diff --git a/build/auth-azure-pipelines-aks-helm-deploy.yml b/azure-pipelines/deprecated/auth-azure-pipelines-aks-helm-deploy.yml similarity index 100% rename from build/auth-azure-pipelines-aks-helm-deploy.yml rename to azure-pipelines/deprecated/auth-azure-pipelines-aks-helm-deploy.yml diff --git a/build/deprecated/azure-k8s-rollout-deploy-jobs.yml b/azure-pipelines/deprecated/azure-k8s-rollout-deploy-jobs.yml similarity index 100% rename from build/deprecated/azure-k8s-rollout-deploy-jobs.yml rename to azure-pipelines/deprecated/azure-k8s-rollout-deploy-jobs.yml diff --git a/build/deprecated/consumer-azure-pipelines-acr-push.yml b/azure-pipelines/deprecated/consumer-azure-pipelines-acr-push.yml similarity index 100% rename from build/deprecated/consumer-azure-pipelines-acr-push.yml rename to azure-pipelines/deprecated/consumer-azure-pipelines-acr-push.yml diff --git a/build/consumer-azure-pipelines-aks-helm-deploy.yml b/azure-pipelines/deprecated/consumer-azure-pipelines-aks-helm-deploy.yml similarity index 100% rename from build/consumer-azure-pipelines-aks-helm-deploy.yml rename to azure-pipelines/deprecated/consumer-azure-pipelines-aks-helm-deploy.yml diff --git a/build/deprecated/docker-build-push-acr-jobs.yml b/azure-pipelines/deprecated/docker-build-push-acr-jobs.yml similarity index 100% rename from build/deprecated/docker-build-push-acr-jobs.yml rename to azure-pipelines/deprecated/docker-build-push-acr-jobs.yml diff --git a/build/templates/helm-deploy-jobs.yml b/azure-pipelines/deprecated/helm-deploy-jobs.yml similarity index 100% rename from build/templates/helm-deploy-jobs.yml rename to azure-pipelines/deprecated/helm-deploy-jobs.yml diff --git a/build/deprecated/sender-azure-pipelines-acr-push.yml b/azure-pipelines/deprecated/sender-azure-pipelines-acr-push.yml similarity index 100% rename from build/deprecated/sender-azure-pipelines-acr-push.yml rename to azure-pipelines/deprecated/sender-azure-pipelines-acr-push.yml diff --git a/build/sender-azure-pipelines-aks-helm-deploy.yml b/azure-pipelines/deprecated/sender-azure-pipelines-aks-helm-deploy.yml similarity index 100% rename from build/sender-azure-pipelines-aks-helm-deploy.yml rename to azure-pipelines/deprecated/sender-azure-pipelines-aks-helm-deploy.yml diff --git a/build/configure-aks-cluster.yml b/azure-pipelines/infrastructure/configure-aks-cluster.yml similarity index 100% rename from build/configure-aks-cluster.yml rename to azure-pipelines/infrastructure/configure-aks-cluster.yml diff --git a/build/terraform-create-aks-cluster.yml b/azure-pipelines/infrastructure/terraform-create.yml similarity index 100% rename from build/terraform-create-aks-cluster.yml rename to azure-pipelines/infrastructure/terraform-create.yml diff --git a/build/terraform-destroy-aks-cluster.yml b/azure-pipelines/infrastructure/terraform-destroy.yml similarity index 100% rename from build/terraform-destroy-aks-cluster.yml rename to azure-pipelines/infrastructure/terraform-destroy.yml diff --git a/build/auth-azure-pipelines-pr-validation.yml b/azure-pipelines/pr-validation/pr-validation-auth.yml similarity index 97% rename from build/auth-azure-pipelines-pr-validation.yml rename to azure-pipelines/pr-validation/pr-validation-auth.yml index 814dcf6e..e55c9e4b 100644 --- a/build/auth-azure-pipelines-pr-validation.yml +++ b/azure-pipelines/pr-validation/pr-validation-auth.yml @@ -28,7 +28,7 @@ stages: - stage: 'Build_${{ variables.appName }}' displayName: 'Build_${{ variables.appName }}' jobs: - - template: templates/docker-build-push-jobs.yml + - template: ../templates/docker-build-push-jobs.yml parameters: JobName: 'Build_${{ variables.appName }}' solution: '$(System.DefaultWorkingDirectory)/EventTriangleAPI.sln' diff --git a/build/consumer-azure-pipelines-pr-validation.yml b/azure-pipelines/pr-validation/pr-validation-consumer.yml similarity index 97% rename from build/consumer-azure-pipelines-pr-validation.yml rename to azure-pipelines/pr-validation/pr-validation-consumer.yml index 13156056..d0cab1b5 100644 --- a/build/consumer-azure-pipelines-pr-validation.yml +++ b/azure-pipelines/pr-validation/pr-validation-consumer.yml @@ -32,7 +32,7 @@ stages: - stage: 'Build_${{ variables.appName }}' displayName: 'Build_${{ variables.appName }}' jobs: - - template: templates/docker-build-push-jobs.yml + - template: ../templates/docker-build-push-jobs.yml parameters: JobName: 'Build_${{ variables.appName }}' solution: '$(System.DefaultWorkingDirectory)/EventTriangleAPI.sln' diff --git a/build/sender-azure-pipelines-pr-validation.yml b/azure-pipelines/pr-validation/pr-validation-sender.yml similarity index 97% rename from build/sender-azure-pipelines-pr-validation.yml rename to azure-pipelines/pr-validation/pr-validation-sender.yml index 0ae1cef4..36f65f3e 100644 --- a/build/sender-azure-pipelines-pr-validation.yml +++ b/azure-pipelines/pr-validation/pr-validation-sender.yml @@ -32,7 +32,7 @@ stages: - stage: 'Build_${{ variables.appName }}' displayName: 'Build_${{ variables.appName }}' jobs: - - template: templates/docker-build-push-jobs.yml + - template: ../templates/docker-build-push-jobs.yml parameters: JobName: 'Build_${{ variables.appName }}' solution: '$(System.DefaultWorkingDirectory)/EventTriangleAPI.sln' diff --git a/build/templates/configure-cluster-stages.yml b/azure-pipelines/templates/configure-cluster-stages.yml similarity index 100% rename from build/templates/configure-cluster-stages.yml rename to azure-pipelines/templates/configure-cluster-stages.yml diff --git a/build/templates/docker-build-push-jobs.yml b/azure-pipelines/templates/docker-build-push-jobs.yml similarity index 100% rename from build/templates/docker-build-push-jobs.yml rename to azure-pipelines/templates/docker-build-push-jobs.yml diff --git a/build/templates/terraform-apply-stages.yml b/azure-pipelines/templates/terraform-apply-stages.yml similarity index 100% rename from build/templates/terraform-apply-stages.yml rename to azure-pipelines/templates/terraform-apply-stages.yml diff --git a/build/templates/terraform-plan-stages.yml b/azure-pipelines/templates/terraform-plan-stages.yml similarity index 100% rename from build/templates/terraform-plan-stages.yml rename to azure-pipelines/templates/terraform-plan-stages.yml From bb4e6fdda268365936565bb6a9fcbb8475a3d1f6 Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 22:28:14 +0200 Subject: [PATCH 16/22] pr validation ignore md changes --- azure-pipelines/pr-validation/pr-validation-auth.yml | 2 ++ azure-pipelines/pr-validation/pr-validation-consumer.yml | 2 ++ azure-pipelines/pr-validation/pr-validation-sender.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/azure-pipelines/pr-validation/pr-validation-auth.yml b/azure-pipelines/pr-validation/pr-validation-auth.yml index e55c9e4b..bc1bdb92 100644 --- a/azure-pipelines/pr-validation/pr-validation-auth.yml +++ b/azure-pipelines/pr-validation/pr-validation-auth.yml @@ -12,6 +12,8 @@ pr: - src/authorization/EventTriangleAPI.Authorization.Presentation - src/shared/EventTriangleAPI.Shared.Application - src/shared/EventTriangleAPI.Shared.DTO + exclude: + - '**/*.md' variables: - name: appName diff --git a/azure-pipelines/pr-validation/pr-validation-consumer.yml b/azure-pipelines/pr-validation/pr-validation-consumer.yml index d0cab1b5..69cbf66e 100644 --- a/azure-pipelines/pr-validation/pr-validation-consumer.yml +++ b/azure-pipelines/pr-validation/pr-validation-consumer.yml @@ -16,6 +16,8 @@ pr: - src/consumer/EventTriangleAPI.Consumer.UnitTests - src/shared/EventTriangleAPI.Shared.Application - src/shared/EventTriangleAPI.Shared.DTO + exclude: + - '**/*.md' variables: - name: appName diff --git a/azure-pipelines/pr-validation/pr-validation-sender.yml b/azure-pipelines/pr-validation/pr-validation-sender.yml index 36f65f3e..4cf03376 100644 --- a/azure-pipelines/pr-validation/pr-validation-sender.yml +++ b/azure-pipelines/pr-validation/pr-validation-sender.yml @@ -16,6 +16,8 @@ pr: - src/sender/EventTriangleAPI.Sender.UnitTests - src/shared/EventTriangleAPI.Shared.Application - src/shared/EventTriangleAPI.Shared.DTO + exclude: + - '**/*.md' variables: - name: appName From 11e504334bc79e1941c4da7d2ff68341dfdbdbf6 Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 22:31:01 +0200 Subject: [PATCH 17/22] fix name --- azure-pipelines/pr-validation/pr-validation-auth.yml | 4 +--- azure-pipelines/pr-validation/pr-validation-consumer.yml | 4 +--- azure-pipelines/pr-validation/pr-validation-sender.yml | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/azure-pipelines/pr-validation/pr-validation-auth.yml b/azure-pipelines/pr-validation/pr-validation-auth.yml index bc1bdb92..03e75b31 100644 --- a/azure-pipelines/pr-validation/pr-validation-auth.yml +++ b/azure-pipelines/pr-validation/pr-validation-auth.yml @@ -20,14 +20,12 @@ variables: value: 'AuthorizationAPI' - name: System.Debug value: 'false' - - group: AKS_Settings - - group: Prefix_Library pool: vmImage: 'ubuntu-latest' stages: - - stage: 'Build_${{ variables.appName }}' + - stage: 'PR_Validation_${{ variables.appName }}' displayName: 'Build_${{ variables.appName }}' jobs: - template: ../templates/docker-build-push-jobs.yml diff --git a/azure-pipelines/pr-validation/pr-validation-consumer.yml b/azure-pipelines/pr-validation/pr-validation-consumer.yml index 69cbf66e..d6e1b60a 100644 --- a/azure-pipelines/pr-validation/pr-validation-consumer.yml +++ b/azure-pipelines/pr-validation/pr-validation-consumer.yml @@ -24,14 +24,12 @@ variables: value: 'ConsumerAPI' - name: System.Debug value: 'false' - - group: AKS_Settings - - group: Prefix_Library pool: vmImage: 'ubuntu-latest' stages: - - stage: 'Build_${{ variables.appName }}' + - stage: 'PR_Validation_${{ variables.appName }}' displayName: 'Build_${{ variables.appName }}' jobs: - template: ../templates/docker-build-push-jobs.yml diff --git a/azure-pipelines/pr-validation/pr-validation-sender.yml b/azure-pipelines/pr-validation/pr-validation-sender.yml index 4cf03376..2231628f 100644 --- a/azure-pipelines/pr-validation/pr-validation-sender.yml +++ b/azure-pipelines/pr-validation/pr-validation-sender.yml @@ -24,14 +24,12 @@ variables: value: 'SenderAPI' - name: System.Debug value: 'false' - - group: AKS_Settings - - group: Prefix_Library pool: vmImage: 'ubuntu-latest' stages: - - stage: 'Build_${{ variables.appName }}' + - stage: 'PR_Validation_${{ variables.appName }}' displayName: 'Build_${{ variables.appName }}' jobs: - template: ../templates/docker-build-push-jobs.yml From 81fdf77f71a0c494f418bdd9f2fb62f6d4cadb1c Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 22:38:46 +0200 Subject: [PATCH 18/22] fix name --- azure-pipelines/pr-validation/pr-validation-auth.yml | 4 ++-- azure-pipelines/pr-validation/pr-validation-consumer.yml | 4 ++-- azure-pipelines/pr-validation/pr-validation-sender.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-pipelines/pr-validation/pr-validation-auth.yml b/azure-pipelines/pr-validation/pr-validation-auth.yml index 03e75b31..2af10d43 100644 --- a/azure-pipelines/pr-validation/pr-validation-auth.yml +++ b/azure-pipelines/pr-validation/pr-validation-auth.yml @@ -26,11 +26,11 @@ pool: stages: - stage: 'PR_Validation_${{ variables.appName }}' - displayName: 'Build_${{ variables.appName }}' + displayName: 'PR_Validation_${{ variables.appName }}' jobs: - template: ../templates/docker-build-push-jobs.yml parameters: - JobName: 'Build_${{ variables.appName }}' + JobName: 'PR_Validation_${{ variables.appName }}' solution: '$(System.DefaultWorkingDirectory)/EventTriangleAPI.sln' buildConfiguration: 'Release' backendProjectPath: '$(System.DefaultWorkingDirectory)/src/authorization/EventTriangleAPI.Authorization.Presentation' diff --git a/azure-pipelines/pr-validation/pr-validation-consumer.yml b/azure-pipelines/pr-validation/pr-validation-consumer.yml index d6e1b60a..0a3594f6 100644 --- a/azure-pipelines/pr-validation/pr-validation-consumer.yml +++ b/azure-pipelines/pr-validation/pr-validation-consumer.yml @@ -30,11 +30,11 @@ pool: stages: - stage: 'PR_Validation_${{ variables.appName }}' - displayName: 'Build_${{ variables.appName }}' + displayName: 'PR_Validation_${{ variables.appName }}' jobs: - template: ../templates/docker-build-push-jobs.yml parameters: - JobName: 'Build_${{ variables.appName }}' + JobName: 'PR_Validation_${{ variables.appName }}' solution: '$(System.DefaultWorkingDirectory)/EventTriangleAPI.sln' buildConfiguration: 'Release' backendProjectPath: '$(System.DefaultWorkingDirectory)/src/consumer/EventTriangleAPI.Consumer.Presentation' diff --git a/azure-pipelines/pr-validation/pr-validation-sender.yml b/azure-pipelines/pr-validation/pr-validation-sender.yml index 2231628f..7a20dd79 100644 --- a/azure-pipelines/pr-validation/pr-validation-sender.yml +++ b/azure-pipelines/pr-validation/pr-validation-sender.yml @@ -30,11 +30,11 @@ pool: stages: - stage: 'PR_Validation_${{ variables.appName }}' - displayName: 'Build_${{ variables.appName }}' + displayName: 'PR_Validation_${{ variables.appName }}' jobs: - template: ../templates/docker-build-push-jobs.yml parameters: - JobName: 'Build_${{ variables.appName }}' + JobName: 'PR_Validation_${{ variables.appName }}' solution: '$(System.DefaultWorkingDirectory)/EventTriangleAPI.sln' buildConfiguration: 'Release' backendProjectPath: '$(System.DefaultWorkingDirectory)/src/sender/EventTriangleAPI.Sender.Presentation' From b26fd15da0f969a8f5a91f0874dca0fcf538e8d6 Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 22:59:00 +0200 Subject: [PATCH 19/22] sonar configuration --- azure-pipelines/templates/docker-build-push-jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines/templates/docker-build-push-jobs.yml b/azure-pipelines/templates/docker-build-push-jobs.yml index 28fe949d..6e35c81f 100644 --- a/azure-pipelines/templates/docker-build-push-jobs.yml +++ b/azure-pipelines/templates/docker-build-push-jobs.yml @@ -117,7 +117,7 @@ jobs: SonarCloud: SonarCloud_Service_Connection organization: event-triangle scannerMode: dotnet - projectKey: event-triangle_eventtriangleapi + projectKey: event-triangle-api projectName: eventtriangleapi extraProperties: | sonar.cs.vstest.reportsPaths=$(Agent.TempDirectory)/**/*.trx From 5244a049cb70705ae1e883f5797a79bad4055ce5 Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 23:00:12 +0200 Subject: [PATCH 20/22] move task upper --- azure-pipelines/templates/docker-build-push-jobs.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/azure-pipelines/templates/docker-build-push-jobs.yml b/azure-pipelines/templates/docker-build-push-jobs.yml index 6e35c81f..2a341592 100644 --- a/azure-pipelines/templates/docker-build-push-jobs.yml +++ b/azure-pipelines/templates/docker-build-push-jobs.yml @@ -135,6 +135,11 @@ jobs: - task: SonarCloudAnalyze@4 inputs: {} + - ${{ if eq(parameters.sonarCloudEnabled, true) }}: + - task: SonarCloudPublish@4 + inputs: + pollingTimeoutSec: "300" + - ${{ if eq(parameters.shouldRunUnitTests, true) }}: - task: DotnetCoreCLI@2 displayName: 'Run unit tests' @@ -186,8 +191,3 @@ jobs: tags: | $(version_step.semVer) latest - - - ${{ if eq(parameters.sonarCloudEnabled, true) }}: - - task: SonarCloudPublish@4 - inputs: - pollingTimeoutSec: "300" From 937acb8962749cd71c875e7d28a1c9e7b21d2880 Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 23:08:10 +0200 Subject: [PATCH 21/22] add build pipelines --- azure-pipelines/build/build-auth.yml | 41 ++++++++++++++++++++++++ azure-pipelines/build/build-consumer.yml | 40 +++++++++++++++++++++++ azure-pipelines/build/build-sender.yml | 40 +++++++++++++++++++++++ 3 files changed, 121 insertions(+) create mode 100644 azure-pipelines/build/build-auth.yml create mode 100644 azure-pipelines/build/build-consumer.yml create mode 100644 azure-pipelines/build/build-sender.yml diff --git a/azure-pipelines/build/build-auth.yml b/azure-pipelines/build/build-auth.yml new file mode 100644 index 00000000..e237384c --- /dev/null +++ b/azure-pipelines/build/build-auth.yml @@ -0,0 +1,41 @@ +trigger: + batch: true + branches: + include: + - main + +pr: none + +variables: + - name: appName + value: 'AuthorizationAPI' + - name: System.Debug + value: 'false' + +pool: + vmImage: 'ubuntu-latest' + +stages: + - stage: 'Build_${{ variables.appName }}' + displayName: 'Build_${{ variables.appName }}' + jobs: + - template: ../templates/docker-build-push-jobs.yml + parameters: + JobName: 'Build_${{ variables.appName }}' + solution: '$(System.DefaultWorkingDirectory)/EventTriangleAPI.sln' + buildConfiguration: 'Release' + backendProjectPath: '$(System.DefaultWorkingDirectory)/src/authorization/EventTriangleAPI.Authorization.Presentation' + unitTestsProjectPath: '$(System.DefaultWorkingDirectory)/src/authorization/EventTriangleAPI.Authorization.UnitTests/EventTriangleAPI.Authorization.UnitTests.csproj' + shouldRunUnitTests: true + shouldRunIntegrationTests: true + integrationTestsProjectPath: '$(System.DefaultWorkingDirectory)/src/authorization/EventTriangleAPI.Authorization.IntegrationTests/EventTriangleAPI.Authorization.IntegrationTests.csproj' + dockerRegistryUrl: 'docker.io/kaminome' + dockerBuildParameterUrl: 'https://auth-eventtriangle.razumovsky.me/' + imageRepository: 'auth-service' + dockerfilePath: '$(System.DefaultWorkingDirectory)/src/authorization/Dockerfile' + dockerServiceConnection: 'Docker_Hub_Connection' + shouldPushToAcr: true + acrRegistryUrl: 'acrsharedd01.azurecr.io' + acrServiceConnection: 'Azure_ACR_Connection' + sonarCloudEnabled: true + workingDirectoryForDocker: '$(System.DefaultWorkingDirectory)/src' diff --git a/azure-pipelines/build/build-consumer.yml b/azure-pipelines/build/build-consumer.yml new file mode 100644 index 00000000..8cecde6f --- /dev/null +++ b/azure-pipelines/build/build-consumer.yml @@ -0,0 +1,40 @@ +trigger: + batch: true + branches: + include: + - main + +pr: none + +variables: + - name: appName + value: 'ConsumerAPI' + - name: System.Debug + value: 'false' + +pool: + vmImage: 'ubuntu-latest' + +stages: + - stage: 'Build_${{ variables.appName }}' + displayName: 'Build_${{ variables.appName }}' + jobs: + - template: ../templates/docker-build-push-jobs.yml + parameters: + JobName: 'Build_${{ variables.appName }}' + solution: '$(System.DefaultWorkingDirectory)/EventTriangleAPI.sln' + buildConfiguration: 'Release' + backendProjectPath: '$(System.DefaultWorkingDirectory)/src/consumer/EventTriangleAPI.Consumer.Presentation' + unitTestsProjectPath: '$(System.DefaultWorkingDirectory)/src/consumer/EventTriangleAPI.Consumer.UnitTests/EventTriangleAPI.Consumer.UnitTests.csproj' + shouldRunUnitTests: true + shouldRunIntegrationTests: true + integrationTestsProjectPath: '$(System.DefaultWorkingDirectory)/src/consumer/EventTriangleAPI.Consumer.IntegrationTests/EventTriangleAPI.Consumer.IntegrationTests.csproj' + dockerRegistryUrl: 'docker.io/kaminome' + imageRepository: 'consumer-service' + dockerfilePath: '$(System.DefaultWorkingDirectory)/src/consumer/Dockerfile' + dockerServiceConnection: 'Docker_Hub_Connection' + shouldPushToAcr: true + acrRegistryUrl: 'acrsharedd01.azurecr.io' + acrServiceConnection: 'Azure_ACR_Connection' + sonarCloudEnabled: false + workingDirectoryForDocker: '$(System.DefaultWorkingDirectory)/src' diff --git a/azure-pipelines/build/build-sender.yml b/azure-pipelines/build/build-sender.yml new file mode 100644 index 00000000..25b62170 --- /dev/null +++ b/azure-pipelines/build/build-sender.yml @@ -0,0 +1,40 @@ +trigger: + batch: true + branches: + include: + - main + +pr: none + +variables: + - name: appName + value: 'SenderAPI' + - name: System.Debug + value: 'false' + +pool: + vmImage: 'ubuntu-latest' + +stages: + - stage: 'Build_${{ variables.appName }}' + displayName: 'Build_${{ variables.appName }}' + jobs: + - template: ../templates/docker-build-push-jobs.yml + parameters: + JobName: 'Build_${{ variables.appName }}' + solution: '$(System.DefaultWorkingDirectory)/EventTriangleAPI.sln' + buildConfiguration: 'Release' + backendProjectPath: '$(System.DefaultWorkingDirectory)/src/sender/EventTriangleAPI.Sender.Presentation' + unitTestsProjectPath: '$(System.DefaultWorkingDirectory)/src/sender/EventTriangleAPI.Sender.UnitTests/EventTriangleAPI.Sender.UnitTests.csproj' + shouldRunIntegrationTests: true + shouldRunUnitTests: true + integrationTestsProjectPath: '$(System.DefaultWorkingDirectory)/src/sender/EventTriangleAPI.Sender.IntegrationTests/EventTriangleAPI.Sender.IntegrationTests.csproj' + dockerRegistryUrl: 'docker.io/kaminome' + imageRepository: 'sender-service' + dockerfilePath: '$(System.DefaultWorkingDirectory)/src/sender/Dockerfile' + dockerServiceConnection: 'Docker_Hub_Connection' + shouldPushToAcr: true + acrRegistryUrl: 'acrsharedd01.azurecr.io' + acrServiceConnection: 'Azure_ACR_Connection' + sonarCloudEnabled: false + workingDirectoryForDocker: '$(System.DefaultWorkingDirectory)/src' From 132e8b0302cc4fad8790162d660c1c7c2500c3f5 Mon Sep 17 00:00:00 2001 From: Petro Kolosov Date: Mon, 13 Apr 2026 23:11:10 +0200 Subject: [PATCH 22/22] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32fcd3bb..7d577aaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,3 +39,5 @@ and this project adheres to [Semantic Versioning v2.0.0](https://semver.org/spec - Add Renovate dashboard link to README - Update GitVersion tasks in Azure DevOps - Add SonarCloud scan to Azure DevOps PR validation +- Add separate build pipelines in Azure DevOps +- Split pipelines by folders: pr validation, build, infrastructure