From 5134e51ef04b245f833d25de12fdd07667f8176e Mon Sep 17 00:00:00 2001 From: Selahattin <98191442+SelahattinSert@users.noreply.github.com> Date: Sat, 22 Feb 2025 04:30:55 +0300 Subject: [PATCH 01/20] Add CI for push docker image [skip ci] --- azure-pipelines.yml | 52 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..9341904 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,52 @@ +# Docker +# Build and push an image to Azure Container Registry +# https://docs.microsoft.com/azure/devops/pipelines/languages/docker + +trigger: +- main + +resources: +- repo: self + +variables: + dockerRegistryServiceConnection: '4c281479-6e31-4cb5-8e58-712d66f03a90' + imageRepository: 'cameraonboarding' + containerRegistry: 'acrcameraonboarding.azurecr.io' + dockerfilePath: '$(Build.SourcesDirectory)/Dockerfile' + buildVersion: $[format('{0:yyyyMMdd}-{1}', pipeline.startTime, variables['Build.SourceVersion'])] + + vmImageName: 'ubuntu-latest' + +stages: +- stage: Build + displayName: Build and push stage + jobs: + - job: Build + displayName: Build + pool: + vmImage: $(vmImageName) + steps: + - task: Docker@2 + displayName: Login to ACR + inputs: + command: login + containerRegistry: $(dockerRegistryServiceConnection) + + - task: Docker@2 + displayName: Build Docker Image + inputs: + command: build + repository: $(containerRegistry)/$(imageRepository) + dockerfile: $(dockerfilePath) + tags: | + $(buildVersion) + latest + + - task: Docker@2 + displayName: Push Docker Image + inputs: + command: push + repository: $(containerRegistry)/$(imageRepository) + tags: | + $(buildVersion) + latest \ No newline at end of file From 38e68feb31a5ff0c9b5a47d447d5218056153cc9 Mon Sep 17 00:00:00 2001 From: Selahattin <98191442+SelahattinSert@users.noreply.github.com> Date: Sat, 22 Feb 2025 21:24:30 +0300 Subject: [PATCH 02/20] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9341904..fa48c8d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -24,7 +24,7 @@ stages: - job: Build displayName: Build pool: - vmImage: $(vmImageName) + name: "SSERT-TUF" steps: - task: Docker@2 displayName: Login to ACR @@ -36,7 +36,7 @@ stages: displayName: Build Docker Image inputs: command: build - repository: $(containerRegistry)/$(imageRepository) + repository: $(imageRepository) dockerfile: $(dockerfilePath) tags: | $(buildVersion) @@ -46,7 +46,7 @@ stages: displayName: Push Docker Image inputs: command: push - repository: $(containerRegistry)/$(imageRepository) + repository: $(imageRepository) tags: | $(buildVersion) latest \ No newline at end of file From ecc82eaad087624674737c7f87c94147bced7477 Mon Sep 17 00:00:00 2001 From: Selahattin <98191442+SelahattinSert@users.noreply.github.com> Date: Sat, 22 Feb 2025 23:04:42 +0300 Subject: [PATCH 03/20] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fa48c8d..e8674cc 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -24,7 +24,7 @@ stages: - job: Build displayName: Build pool: - name: "SSERT-TUF" + name: "Default" steps: - task: Docker@2 displayName: Login to ACR From 80aef305ab11f32b9b023aacf962c134641bb8e2 Mon Sep 17 00:00:00 2001 From: Selahattin <98191442+SelahattinSert@users.noreply.github.com> Date: Sat, 22 Feb 2025 23:15:27 +0300 Subject: [PATCH 04/20] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 73 ++++++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 34 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e8674cc..6eefb36 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,10 +3,10 @@ # https://docs.microsoft.com/azure/devops/pipelines/languages/docker trigger: -- main + - main resources: -- repo: self + - repo: self variables: dockerRegistryServiceConnection: '4c281479-6e31-4cb5-8e58-712d66f03a90' @@ -15,38 +15,43 @@ variables: dockerfilePath: '$(Build.SourcesDirectory)/Dockerfile' buildVersion: $[format('{0:yyyyMMdd}-{1}', pipeline.startTime, variables['Build.SourceVersion'])] - vmImageName: 'ubuntu-latest' - stages: -- stage: Build - displayName: Build and push stage - jobs: - - job: Build - displayName: Build - pool: - name: "Default" - steps: - - task: Docker@2 - displayName: Login to ACR - inputs: - command: login - containerRegistry: $(dockerRegistryServiceConnection) + - stage: Build + displayName: Build and push stage + jobs: + - job: Build + displayName: Build + pool: + name: "Default" + steps: + - script: | + echo "Checking Docker service status..." + sudo systemctl status docker || sudo systemctl start docker + echo "Docker service started successfully." + displayName: "Ensure Docker Daemon is Running" + continueOnError: true - - task: Docker@2 - displayName: Build Docker Image - inputs: - command: build - repository: $(imageRepository) - dockerfile: $(dockerfilePath) - tags: | - $(buildVersion) - latest + - task: Docker@2 + displayName: Login to ACR + inputs: + command: login + containerRegistry: $(dockerRegistryServiceConnection) - - task: Docker@2 - displayName: Push Docker Image - inputs: - command: push - repository: $(imageRepository) - tags: | - $(buildVersion) - latest \ No newline at end of file + - task: Docker@2 + displayName: Build Docker Image + inputs: + command: build + repository: $(imageRepository) + dockerfile: $(dockerfilePath) + tags: | + $(buildVersion) + latest + + - task: Docker@2 + displayName: Push Docker Image + inputs: + command: push + repository: $(imageRepository) + tags: | + $(buildVersion) + latest From c50d4d0d3b59374ab00c14d1064af39074c3a120 Mon Sep 17 00:00:00 2001 From: Selahattin <98191442+SelahattinSert@users.noreply.github.com> Date: Sat, 22 Feb 2025 23:26:28 +0300 Subject: [PATCH 05/20] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6eefb36..061f23f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -25,10 +25,12 @@ stages: name: "Default" steps: - script: | - echo "Checking Docker service status..." - sudo systemctl status docker || sudo systemctl start docker - echo "Docker service started successfully." - displayName: "Ensure Docker Daemon is Running" + echo "Checking if Docker is running..." + docker info || ( + echo "Docker is not running! Trying to start Docker..." + start-process -FilePath "C:\Program Files\Docker\Docker\Docker Desktop.exe" + ) + displayName: "Ensure Docker Daemon is Running (Windows)" continueOnError: true - task: Docker@2 @@ -43,10 +45,11 @@ stages: command: build repository: $(imageRepository) dockerfile: $(dockerfilePath) + arguments: "--platform=linux/amd64" tags: | $(buildVersion) latest - + - task: Docker@2 displayName: Push Docker Image inputs: @@ -55,3 +58,4 @@ stages: tags: | $(buildVersion) latest + From dff5be8160c29a07c12285b4480d30fb29fe4252 Mon Sep 17 00:00:00 2001 From: Selahattin <98191442+SelahattinSert@users.noreply.github.com> Date: Sun, 23 Feb 2025 00:39:23 +0300 Subject: [PATCH 06/20] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 061f23f..ece9921 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -32,6 +32,14 @@ stages: ) displayName: "Ensure Docker Daemon is Running (Windows)" continueOnError: true + - task: Maven@4 + displayName: Build Maven + inputs: + mavenPomFile: 'pom.xml' + goals: 'clean package' + mavenOptions: '-Xmx3072m' + javaHomeOption: 'JDKVersion' + jdkVersionOption: '21' - task: Docker@2 displayName: Login to ACR From 0b041a307827249029bf10effb50ecb92a080233 Mon Sep 17 00:00:00 2001 From: Selahattin <98191442+SelahattinSert@users.noreply.github.com> Date: Sun, 23 Feb 2025 00:49:47 +0300 Subject: [PATCH 07/20] Update dockerf --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 572b234..ace1ffc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build Stage -FROM --platform=linux/amd64 eclipse-temurin:21 +FROM eclipse-temurin:21 # ARG JAR_FILE=target/camera-onboarding-0.0.1-SNAPSHOT.jar From dca5ba080c4d141b6063189951f7041162235798 Mon Sep 17 00:00:00 2001 From: Selahattin <98191442+SelahattinSert@users.noreply.github.com> Date: Sun, 23 Feb 2025 00:51:04 +0300 Subject: [PATCH 08/20] Update azure-pipelines.yml --- azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ece9921..d9b7aa6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -32,6 +32,7 @@ stages: ) displayName: "Ensure Docker Daemon is Running (Windows)" continueOnError: true + - task: Maven@4 displayName: Build Maven inputs: @@ -53,7 +54,7 @@ stages: command: build repository: $(imageRepository) dockerfile: $(dockerfilePath) - arguments: "--platform=linux/amd64" + arguments: "--platform linux/amd64" tags: | $(buildVersion) latest From 1290a8b7cbbf8fa3cb6f982920ba5985c96b6cb0 Mon Sep 17 00:00:00 2001 From: Selahattin <98191442+SelahattinSert@users.noreply.github.com> Date: Sun, 23 Feb 2025 01:13:12 +0300 Subject: [PATCH 09/20] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ace1ffc..e8796ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM eclipse-temurin:21 # -ARG JAR_FILE=target/camera-onboarding-0.0.1-SNAPSHOT.jar +ARG JAR_FILE=target/*.jar # Set the working directory inside the container WORKDIR /app From a4ae0f1d2402ce8a5b4c76f5997a10c850151f81 Mon Sep 17 00:00:00 2001 From: Selahattin <98191442+SelahattinSert@users.noreply.github.com> Date: Sun, 23 Feb 2025 20:48:00 +0300 Subject: [PATCH 10/20] Refactor variables, remove latest tag --- azure-pipelines.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d9b7aa6..ce9e712 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,11 +9,11 @@ resources: - repo: self variables: - dockerRegistryServiceConnection: '4c281479-6e31-4cb5-8e58-712d66f03a90' - imageRepository: 'cameraonboarding' - containerRegistry: 'acrcameraonboarding.azurecr.io' - dockerfilePath: '$(Build.SourcesDirectory)/Dockerfile' - buildVersion: $[format('{0:yyyyMMdd}-{1}', pipeline.startTime, variables['Build.SourceVersion'])] + dockerRegistryServiceConnection: $(DOCKER_REGISTRY_CONNECTION) + imageRepository: $(IMAGE_REPOSITORY) + containerRegistry: $(CONTAINER_REGISTRY) + dockerfilePath: $(DOCKERFILE_PATH) + buildVersion: $(BUILD_VERSION) stages: - stage: Build @@ -57,7 +57,6 @@ stages: arguments: "--platform linux/amd64" tags: | $(buildVersion) - latest - task: Docker@2 displayName: Push Docker Image From e68890c2fd50e5e603fcc366286e826f64974c6d Mon Sep 17 00:00:00 2001 From: Selahattin <98191442+SelahattinSert@users.noreply.github.com> Date: Sun, 23 Feb 2025 21:57:39 +0300 Subject: [PATCH 11/20] =?UTF-8?q?Fi=C3=85x=20variable=20handling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- azure-pipelines.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ce9e712..5aacb66 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,11 +9,7 @@ resources: - repo: self variables: - dockerRegistryServiceConnection: $(DOCKER_REGISTRY_CONNECTION) - imageRepository: $(IMAGE_REPOSITORY) - containerRegistry: $(CONTAINER_REGISTRY) - dockerfilePath: $(DOCKERFILE_PATH) - buildVersion: $(BUILD_VERSION) + - group: camera-onboarding-variable-group stages: - stage: Build @@ -46,24 +42,23 @@ stages: displayName: Login to ACR inputs: command: login - containerRegistry: $(dockerRegistryServiceConnection) + containerRegistry: $(DOCKER_REGISTRY_CONNECTION) - task: Docker@2 displayName: Build Docker Image inputs: command: build - repository: $(imageRepository) - dockerfile: $(dockerfilePath) + repository: $(IMAGE_REPOSITORY) + dockerfile: $(DOCKERFILE_PATH) arguments: "--platform linux/amd64" tags: | - $(buildVersion) + $(BUILD_VERSION) - task: Docker@2 displayName: Push Docker Image inputs: command: push - repository: $(imageRepository) + repository: $(IMAGE_REPOSITORY) tags: | - $(buildVersion) - latest + $(BUILD_VERSION) From 0f6a5e816ae420352040074c5a057fcad74ae4c4 Mon Sep 17 00:00:00 2001 From: Selahattin <98191442+SelahattinSert@users.noreply.github.com> Date: Mon, 24 Feb 2025 23:59:34 +0300 Subject: [PATCH 12/20] Add build version script --- azure-pipelines.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5aacb66..ef1ab4b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -44,6 +44,11 @@ stages: command: login containerRegistry: $(DOCKER_REGISTRY_CONNECTION) + - script: | + echo "##[set-variable name=BUILD_VERSION]$(BUILD_VERSION)" + echo "::add-mask::$(BUILD_VERSION)" + displayName: "Set Secret Build Version" + - task: Docker@2 displayName: Build Docker Image inputs: From c9e978294e0752fb76623989d7ac26d09bd1e110 Mon Sep 17 00:00:00 2001 From: Selahattin <98191442+SelahattinSert@users.noreply.github.com> Date: Tue, 25 Feb 2025 00:32:28 +0300 Subject: [PATCH 13/20] Fix build version script --- azure-pipelines.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ef1ab4b..6678c4a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -45,9 +45,10 @@ stages: containerRegistry: $(DOCKER_REGISTRY_CONNECTION) - script: | - echo "##[set-variable name=BUILD_VERSION]$(BUILD_VERSION)" - echo "::add-mask::$(BUILD_VERSION)" - displayName: "Set Secret Build Version" + echo "Setting BUILD_VERSION..." + echo "##vso[task.setvariable variable=BUILD_VERSION]$(date +'%Y%m%d')-$(Build.SourceVersionShort)" + echo "::add-mask::$(date +'%Y%m%d')-$(Build.SourceVersionShort)" + displayName: "Set Secret Build Version" - task: Docker@2 displayName: Build Docker Image From 2d0b9d381f0936f65d07effacd4ea98992a74f0d Mon Sep 17 00:00:00 2001 From: Selahattin <98191442+SelahattinSert@users.noreply.github.com> Date: Tue, 25 Feb 2025 02:19:00 +0300 Subject: [PATCH 14/20] Fix build version script --- azure-pipelines.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6678c4a..85aa25b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -46,8 +46,9 @@ stages: - script: | echo "Setting BUILD_VERSION..." - echo "##vso[task.setvariable variable=BUILD_VERSION]$(date +'%Y%m%d')-$(Build.SourceVersionShort)" - echo "::add-mask::$(date +'%Y%m%d')-$(Build.SourceVersionShort)" + BUILD_VERSION=$(date +'%Y%m%d')-$(Build.SourceVersionShort) + echo "##vso[task.setvariable variable=BUILD_VERSION]$BUILD_VERSION" + echo "::add-mask::$BUILD_VERSION" displayName: "Set Secret Build Version" - task: Docker@2 From 6451c554c489ada43edb0ee3b8df615cb0fdff7a Mon Sep 17 00:00:00 2001 From: Selahattin <98191442+SelahattinSert@users.noreply.github.com> Date: Tue, 25 Feb 2025 03:52:05 +0300 Subject: [PATCH 15/20] Fix build version script --- azure-pipelines.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 85aa25b..c84dfc8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -47,9 +47,10 @@ stages: - script: | echo "Setting BUILD_VERSION..." BUILD_VERSION=$(date +'%Y%m%d')-$(Build.SourceVersionShort) - echo "##vso[task.setvariable variable=BUILD_VERSION]$BUILD_VERSION" + echo "##vso[task.setvariable variable=BUILD_VERSION;isOutput=true]$BUILD_VERSION" echo "::add-mask::$BUILD_VERSION" - displayName: "Set Secret Build Version" + name: SetVersion + displayName: "Set Secret Build Version" - task: Docker@2 displayName: Build Docker Image From 2a1cdbf0a8b090a9a79cec56a34a420481e11725 Mon Sep 17 00:00:00 2001 From: Selahattin <98191442+SelahattinSert@users.noreply.github.com> Date: Tue, 25 Feb 2025 04:16:56 +0300 Subject: [PATCH 16/20] Fix build version script --- azure-pipelines.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c84dfc8..8e476ab 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -46,11 +46,11 @@ stages: - script: | echo "Setting BUILD_VERSION..." - BUILD_VERSION=$(date +'%Y%m%d')-$(Build.SourceVersionShort) - echo "##vso[task.setvariable variable=BUILD_VERSION;isOutput=true]$BUILD_VERSION" - echo "::add-mask::$BUILD_VERSION" - name: SetVersion - displayName: "Set Secret Build Version" + set BUILD_VERSION=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%-%BUILD_SOURCEVERSION:~0,7% + echo BUILD_VERSION=%BUILD_VERSION% + echo "##vso[task.setvariable variable=BUILD_VERSION;isOutput=true]%BUILD_VERSION%" + echo "::add-mask::%BUILD_VERSION%" + displayName: "Set Secret Build Version" - task: Docker@2 displayName: Build Docker Image From 4b0afc21fa042ab495595f6a6b1ac9edbff3fc4f Mon Sep 17 00:00:00 2001 From: Selahattin <98191442+SelahattinSert@users.noreply.github.com> Date: Tue, 25 Feb 2025 18:14:24 +0300 Subject: [PATCH 17/20] Fix build version --- azure-pipelines.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8e476ab..584b8d8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,6 +10,7 @@ resources: variables: - group: camera-onboarding-variable-group + buildVersion: $[format('{0:yyyyMMdd}-{1}', pipeline.startTime, variables['Build.SourceVersion'])] stages: - stage: Build @@ -44,14 +45,6 @@ stages: command: login containerRegistry: $(DOCKER_REGISTRY_CONNECTION) - - script: | - echo "Setting BUILD_VERSION..." - set BUILD_VERSION=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%-%BUILD_SOURCEVERSION:~0,7% - echo BUILD_VERSION=%BUILD_VERSION% - echo "##vso[task.setvariable variable=BUILD_VERSION;isOutput=true]%BUILD_VERSION%" - echo "::add-mask::%BUILD_VERSION%" - displayName: "Set Secret Build Version" - - task: Docker@2 displayName: Build Docker Image inputs: @@ -60,7 +53,7 @@ stages: dockerfile: $(DOCKERFILE_PATH) arguments: "--platform linux/amd64" tags: | - $(BUILD_VERSION) + $(buildVersion) - task: Docker@2 displayName: Push Docker Image @@ -68,5 +61,5 @@ stages: command: push repository: $(IMAGE_REPOSITORY) tags: | - $(BUILD_VERSION) + $(buildVersion) From efa8a0a4c58b5e7d6e6b083c43215922e4cc538d Mon Sep 17 00:00:00 2001 From: Selahattin <98191442+SelahattinSert@users.noreply.github.com> Date: Tue, 25 Feb 2025 18:22:01 +0300 Subject: [PATCH 18/20] Fix build version --- azure-pipelines.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 584b8d8..5ca69bb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,7 +10,9 @@ resources: variables: - group: camera-onboarding-variable-group - buildVersion: $[format('{0:yyyyMMdd}-{1}', pipeline.startTime, variables['Build.SourceVersion'])] + + - name: buildVersion + value: $[format('{0:yyyyMMdd}-{1}', pipeline.startTime, variables['Build.SourceVersion'])] stages: - stage: Build From f70d2d75af3d8f8d8188bf749ab5658f4b2c4ece Mon Sep 17 00:00:00 2001 From: Selahattin <98191442+SelahattinSert@users.noreply.github.com> Date: Tue, 25 Feb 2025 18:33:16 +0300 Subject: [PATCH 19/20] Refactor build version tag --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5ca69bb..1ea389a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,7 +12,7 @@ variables: - group: camera-onboarding-variable-group - name: buildVersion - value: $[format('{0:yyyyMMdd}-{1}', pipeline.startTime, variables['Build.SourceVersion'])] + value: $[format('{0:yyyyMMdd}-{1}', pipeline.startTime, variables['Build.SourceVersionShort'])] stages: - stage: Build From 59b8ba72c1652003b0b14aa71dfda2fe5202c2e6 Mon Sep 17 00:00:00 2001 From: Selahattin <98191442+SelahattinSert@users.noreply.github.com> Date: Tue, 25 Feb 2025 18:46:29 +0300 Subject: [PATCH 20/20] Refactor build version tag --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1ea389a..d89af52 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,7 +12,7 @@ variables: - group: camera-onboarding-variable-group - name: buildVersion - value: $[format('{0:yyyyMMdd}-{1}', pipeline.startTime, variables['Build.SourceVersionShort'])] + value: $[format('{0:yyyyMMdd}-{1}', pipeline.startTime, substring(variables['Build.SourceVersion'], 0, 7))] stages: - stage: Build