From 9383e2035b58fcaefe2ce513f1819460509fb11c Mon Sep 17 00:00:00 2001 From: Michael Auer Date: Mon, 24 Nov 2025 08:33:42 +0000 Subject: [PATCH] Merged PR 2039: New Docker Tag --- azure-pipelines.yml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c3da98967..1429f950c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,6 +18,13 @@ variables: - name: 'BuildUniqueID' value: '$(Build.BuildID)-$(Agent.Id)-$(System.DefinitionId)-$(System.JobId)' - group: 'GithubCMF' + # Docker Tag Variablen + - name: 'DockerTagSourceBranch' + value: $[replace(replace(variables['Build.SourceBranch'], 'refs/heads/', ''), '/', '_')] + - name: 'CommitHash' + value: $[replace(variables['Build.SourceVersion'], format('{0}-', variables['Build.SourceBranchName']), '')] + - name: 'DockerTag' + value: '$(Major).$(Minor).$(Patch)-$(DockerTagSourceBranch)-$(CommitHash)' jobs: - job: unittests @@ -87,13 +94,6 @@ jobs: - Agent.OS -equals Linux - docker condition: and(ne(variables['Build.SourceBranch'], 'refs/heads/integration'), ne(variables['Build.SourceBranch'], 'refs/heads/master'), not(startsWith(variables['Build.SourceBranch'], 'refs/heads/hotfix/')), not(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'))) - variables: - - name: DockerTagSourceBranch - value: $[replace(variables['Build.SourceBranch'], '/', '-')] - - name: 'DockerTag' - value: | - $(Build.BuildNumber)-$(Build.SourceVersion) - $(DockerTagSourceBranch) steps: - task: npmAuthenticate@0 displayName: 'npm auth' @@ -156,13 +156,6 @@ jobs: - Agent.OS -equals Linux - docker condition: or(eq(variables['Build.SourceBranch'], 'refs/heads/integration'), eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'], 'refs/heads/hotfix/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/')) - variables: - - name: DockerTagSourceBranch - value: $[replace(variables['Build.SourceBranch'], '/', '_')] - - name: 'DockerTag' - value: | - $(Build.BuildNumber)-$(Build.SourceVersion) - $(DockerTagSourceBranch) steps: - task: npmAuthenticate@0 displayName: 'npm auth'