From 3d1a58e3f86a78bc211689bf07cdb446f1d2d949 Mon Sep 17 00:00:00 2001 From: Chidozie Ononiwu <31145988+chidozieononiwu@users.noreply.github.com> Date: Tue, 23 Mar 2021 11:34:30 -0700 Subject: [PATCH] =?UTF-8?q?Fixup=20CHANGELOG.md,=20add=20SetPackageVersion?= =?UTF-8?q?,=20add=20calls=20to=20set-test-pipe=E2=80=A6=20(#1936)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixup CHANGELOG.md, add SetPackageVersion, add calls to set-test-pipeline-version.yml * Run set-test-pipeline-version.yml per artifact, open testpipeline as draft * git diff to view changes in file * Move set-test-pipeline-version.yml after Validate Clang Format * remove second artifact loop in archetype-cpp-release.yml --- .../templates/jobs/archetype-sdk-client.yml | 19 ++++++++++++++++++- .../stages/archetype-cpp-release.yml | 7 +++++++ .../templates/stages/archetype-sdk-client.yml | 4 ++++ eng/scripts/Language-Settings.ps1 | 9 ++++++++- sdk/template/azure-template/CHANGELOG.md | 15 +++++++-------- 5 files changed, 44 insertions(+), 10 deletions(-) diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index 8fb52d694..4b8305fec 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -5,6 +5,9 @@ parameters: - name: ServiceDirectory type: string default: not-specified + - name: TestPipeline + type: boolean + default: false - name: Coverage type: string default: '' @@ -156,6 +159,13 @@ jobs: displayName: Validate Clang Format condition: and(succeededOrFailed(), eq(variables['CHECK_CLANG_FORMAT'], 1)) + + - ${{ each artifact in parameters.Artifacts }}: + - template: /eng/common/pipelines/templates/steps/set-test-pipeline-version.yml + parameters: + PackageName: ${{ artifact.Name }} + ServiceDirectory: ${{ parameters.ServiceDirectory }} + TestPipeline: ${{ parameters.TestPipeline }} # Install apt dependencies (if appropriate) - bash: sudo apt install -y $(AptDependencies) @@ -213,7 +223,14 @@ jobs: parameters: Directory: '' CheckLinkGuidance: $true - + + - ${{ each artifact in parameters.Artifacts }}: + - template: /eng/common/pipelines/templates/steps/set-test-pipeline-version.yml + parameters: + PackageName: ${{ artifact.Name }} + ServiceDirectory: ${{ parameters.ServiceDirectory }} + TestPipeline: ${{ parameters.TestPipeline }} + - pwsh: | $setupFile="doxygen-1.8.18-setup.exe"; diff --git a/eng/pipelines/templates/stages/archetype-cpp-release.yml b/eng/pipelines/templates/stages/archetype-cpp-release.yml index c4af6b90e..d9a5c2f5a 100644 --- a/eng/pipelines/templates/stages/archetype-cpp-release.yml +++ b/eng/pipelines/templates/stages/archetype-cpp-release.yml @@ -1,6 +1,7 @@ parameters: Artifacts: [] ArtifactName: 'not-specified' + TestPipeline: false stages: - ${{if and(eq(variables['Build.Reason'], 'Manual'), eq(variables['System.TeamProject'], 'internal'))}}: @@ -25,6 +26,11 @@ stages: deploy: steps: - checkout: self + - template: /eng/common/pipelines/templates/steps/set-test-pipeline-version.yml + parameters: + PackageName: ${{ artifact.Name }} + ServiceDirectory: ${{ parameters.ServiceDirectory }} + TestPipeline: ${{ parameters.TestPipeline }} - pwsh: Get-ChildItem -Recurse $(Pipeline.Workspace)/packages/${{artifact.Name}} displayName: Output Visible Artifacts - task: Powershell@2 @@ -181,6 +187,7 @@ stages: PRBody: Update vcpkg ports for Azure SDK release. This release may contain multiple ports. SkipCheckingForChanges: true BaseBranchName: master + OpenAsDraft: ${{ parameters.TestPipeline }} - ${{if ne(artifact.skipUpdatePackageVersion, 'true')}}: - deployment: UpdatePackageVersion diff --git a/eng/pipelines/templates/stages/archetype-sdk-client.yml b/eng/pipelines/templates/stages/archetype-sdk-client.yml index e44adbd73..9853b71b5 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-client.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -37,6 +37,8 @@ stages: CtestRegex: ${{ parameters.CtestRegex }} Coverage: ${{ parameters.Coverage }} CoverageReportPath: ${{ parameters.CoverageReportPath }} + ${{ if eq(parameters.ServiceDirectory, 'template') }}: + TestPipeline: true - ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(parameters.LiveTestCtestRegex, '')) }}: - stage: LiveTest @@ -60,3 +62,5 @@ stages: - Build Artifacts: ${{ parameters.Artifacts }} ArtifactName: packages + ${{ if eq(parameters.ServiceDirectory, 'template') }}: + TestPipeline: true diff --git a/eng/scripts/Language-Settings.ps1 b/eng/scripts/Language-Settings.ps1 index 574b1e90f..0cbc0baa4 100644 --- a/eng/scripts/Language-Settings.ps1 +++ b/eng/scripts/Language-Settings.ps1 @@ -74,7 +74,8 @@ function Publish-cpp-GithubIODocs ($DocLocation, $PublicArtifactLocation) Upload-Blobs -DocDir $DocLocation -PkgName $packageInfo.name -DocVersion $packageInfo.version -ReleaseTag $releaseTag } -function Get-cpp-GithubIoDocIndex() { +function Get-cpp-GithubIoDocIndex() +{ # Update the main.js and docfx.json language content UpdateDocIndexFiles -appTitleLang "C++" # Fetch out all package metadata from csv file. @@ -86,3 +87,9 @@ function Get-cpp-GithubIoDocIndex() { # Generate yml/md toc files and build site. GenerateDocfxTocContent -tocContent $tocContent -lang "C++" } + +function SetPackageVersion ($PackageName, $Version, $ServiceDirectory) +{ + & "$EngDir/scripts/Update-PkgVersion.ps1" -ServiceDirectory $ServiceDirectory -PackageName $PackageName ` + -NewVersionString $Version +} diff --git a/sdk/template/azure-template/CHANGELOG.md b/sdk/template/azure-template/CHANGELOG.md index 81f44e16d..85e974f20 100644 --- a/sdk/template/azure-template/CHANGELOG.md +++ b/sdk/template/azure-template/CHANGELOG.md @@ -1,31 +1,30 @@ # Release History -## 1.0.0-beta.25 (2020-01-12) +## 1.0.0-beta.25 (2021-01-12) * Validate vcpkg publishing automation (part 20) -## 1.0.0-beta.24 (2020-01-11) +## 1.0.0-beta.24 (2021-01-11) * Validate vcpkg publishing automation (part 19) -## 1.0.0-beta.23 (2020-01-11) +## 1.0.0-beta.23 (2021-01-11) * Validate vcpkg publishing automation (part 18) -## 1.0.0-beta.22 (2020-01-08) +## 1.0.0-beta.22 (2021-01-08) * Validate vcpkg publishing automation (part 17) -## 1.0.0-beta.21 (2020-01-08) +## 1.0.0-beta.21 (2021-01-08) * Validate vcpkg publishing automation (part 17) -## 1.0.0-beta.20 (2020-01-08) - +## 1.0.0-beta.20 (2021-01-08) * Validate vcpkg publishing automation (part 16) -## 1.0.0-beta.19 (2020-01-08) +## 1.0.0-beta.19 (2021-01-08) * Validate vcpkg publishing automation (part 15)