From 812807c5cbe2cebc2e6cc49eff0dbde0f4e3a460 Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Wed, 29 May 2024 23:21:56 +0100 Subject: [PATCH] [ci] Fix rev for version (#22716) * [ci] Fix OfficialBuildId * Just on pack --- eng/pipelines/common/pack.yml | 2 +- eng/pipelines/handlers.yml | 4 ++++ eng/pipelines/maui-release-internal.yml | 3 +++ eng/pipelines/maui-release.yml | 3 +++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/common/pack.yml b/eng/pipelines/common/pack.yml index 9d6eb962d201..3b215f2d7602 100644 --- a/eng/pipelines/common/pack.yml +++ b/eng/pipelines/common/pack.yml @@ -131,7 +131,7 @@ steps: DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) PRIVATE_BUILD: $(PrivateBuild) - - pwsh: ./build.ps1 --target=dotnet-pack --configuration="${{ parameters.buildConfiguration }}" --verbosity=diagnostic --nugetsource="${{ parameters.nugetFolder }}" + - pwsh: ./build.ps1 --target=dotnet-pack --configuration="${{ parameters.buildConfiguration }}" --verbosity=diagnostic --nugetsource="${{ parameters.nugetFolder }}" --officialbuildid="${{ parameters.officialBuildId }}" displayName: 'Pack .NET Maui' name: PackMaui workingDirectory: ${{ parameters.checkoutDirectory }} diff --git a/eng/pipelines/handlers.yml b/eng/pipelines/handlers.yml index cde962d9a285..7d6fd2fda87e 100644 --- a/eng/pipelines/handlers.yml +++ b/eng/pipelines/handlers.yml @@ -204,6 +204,9 @@ stages: value: $(Build.SourcesDirectory)/build.cmd -ci - name: _BuildConfig value: Release + - name: _BuildOfficalId + value: $[ format('{0}.{1}', format('{0:yyyyMMdd}', pipeline.startTime), counter(format('{0:yyyyMMdd}', pipeline.startTime), 1) )] + steps: - template: common/pack.yml parameters: @@ -219,6 +222,7 @@ stages: repoLogPath: $(Build.Arcade.LogsPath) repoTestResultsPath: $(Build.Arcade.TestResultsPath) gitHubToken: $(github--pat--vs-mobiletools-engineering-service2) + officialBuildId: $(_BuildOfficalId) prepareSteps: - template: common/provision.yml parameters: diff --git a/eng/pipelines/maui-release-internal.yml b/eng/pipelines/maui-release-internal.yml index 5f48e06c1db1..5b8c16d2ef5f 100644 --- a/eng/pipelines/maui-release-internal.yml +++ b/eng/pipelines/maui-release-internal.yml @@ -164,6 +164,8 @@ extends: value: $(Build.SourcesDirectory)/build.cmd -ci - name: _BuildConfig value: Release + - name: _BuildOfficalId + value: $[ format('{0}.{1}', format('{0:yyyyMMdd}', pipeline.startTime), counter(format('{0:yyyyMMdd}', pipeline.startTime), 1) )] preSteps: - checkout: self @@ -185,6 +187,7 @@ extends: repoArtifactsPath: $(Build.Arcade.ArtifactsPath) repoLogPath: $(Build.Arcade.LogsPath) repoTestResultsPath: $(Build.Arcade.TestResultsPath) + officialBuildId: $(_BuildOfficalId) # prepareSteps: # - template: /eng/pipelines/common/provision.yml@self # parameters: diff --git a/eng/pipelines/maui-release.yml b/eng/pipelines/maui-release.yml index 3847ac918199..d8022981a0a0 100644 --- a/eng/pipelines/maui-release.yml +++ b/eng/pipelines/maui-release.yml @@ -137,6 +137,8 @@ extends: value: $(Build.SourcesDirectory)/build.cmd -ci - name: _BuildConfig value: Release + - name: _BuildOfficalId + value: $[ format('{0}.{1}', format('{0:yyyyMMdd}', pipeline.startTime), counter(format('{0:yyyyMMdd}', pipeline.startTime), 1) )] steps: - template: /eng/pipelines/common/pack.yml@self @@ -153,6 +155,7 @@ extends: repoArtifactsPath: $(Build.Arcade.ArtifactsPath) repoLogPath: $(Build.Arcade.LogsPath) repoTestResultsPath: $(Build.Arcade.TestResultsPath) + officialBuildId: $(_BuildOfficalId) prepareSteps: - template: /eng/pipelines/common/provision.yml@self parameters: