From 814941230de2ef31c3b036a35a9e2747f60fb9a9 Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Thu, 10 Dec 2020 14:22:00 -0800 Subject: [PATCH 1/3] Added a step of skipping package json update for spring boot packages --- .../templates/steps/docs-metadata-release.yml | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/eng/common/pipelines/templates/steps/docs-metadata-release.yml b/eng/common/pipelines/templates/steps/docs-metadata-release.yml index ed9798b2989..25c5332fd1c 100644 --- a/eng/common/pipelines/templates/steps/docs-metadata-release.yml +++ b/eng/common/pipelines/templates/steps/docs-metadata-release.yml @@ -53,23 +53,24 @@ steps: env: GH_TOKEN: $(azuresdk-github-pat) -- task: PowerShell@2 - displayName: 'Update Docs.MS CI Targeted Packages' - condition: and(succeededOrFailed(), eq('${{ parameters.OnboardingBranch }}','')) - inputs: - targetType: filePath - filePath: ${{ parameters.ScriptDirectory }}/update-docs-ci.ps1 - arguments: > - -ArtifactLocation ${{ parameters.ArtifactLocation }} - -WorkDirectory "${{ parameters.WorkingDirectory }}" - -RepoId ${{ parameters.RepoId }} - -Repository ${{ parameters.PackageRepository }} - -ReleaseSHA ${{ parameters.ReleaseSha }} - -DocRepoLocation "${{ parameters.WorkingDirectory }}/repo" - -Configs "${{ parameters.CIConfigs }}" - pwsh: true - env: - GH_TOKEN: $(azuresdk-github-pat) + - ${{if ne(artifact.skipUpdatePackageJson, 'true')}}: + - task: PowerShell@2 + displayName: 'Update Docs.MS CI Targeted Packages' + condition: and(succeededOrFailed(), eq('${{ parameters.OnboardingBranch }}','')) + inputs: + targetType: filePath + filePath: ${{ parameters.ScriptDirectory }}/update-docs-ci.ps1 + arguments: > + -ArtifactLocation ${{ parameters.ArtifactLocation }} + -WorkDirectory "${{ parameters.WorkingDirectory }}" + -RepoId ${{ parameters.RepoId }} + -Repository ${{ parameters.PackageRepository }} + -ReleaseSHA ${{ parameters.ReleaseSha }} + -DocRepoLocation "${{ parameters.WorkingDirectory }}/repo" + -Configs "${{ parameters.CIConfigs }}" + pwsh: true + env: + GH_TOKEN: $(azuresdk-github-pat) - template: /eng/common/pipelines/templates/steps/create-pull-request.yml parameters: From 517a209a590757d0e28a2a1b5b7cfcf0fdbcfe29 Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Thu, 10 Dec 2020 23:56:16 -0800 Subject: [PATCH 2/3] Added skip package json config --- eng/common/pipelines/templates/steps/docs-metadata-release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/common/pipelines/templates/steps/docs-metadata-release.yml b/eng/common/pipelines/templates/steps/docs-metadata-release.yml index 25c5332fd1c..3e7c4c6ba07 100644 --- a/eng/common/pipelines/templates/steps/docs-metadata-release.yml +++ b/eng/common/pipelines/templates/steps/docs-metadata-release.yml @@ -19,6 +19,7 @@ parameters: GHTeamReviewersVariable: '' # externally set, as eng-common does not have the identity-resolver. Run as pre-step OnboardingBranch: '' CloseAfterOpenForTesting: false + SkipPackageJson: false steps: - pwsh: | @@ -56,7 +57,7 @@ steps: - ${{if ne(artifact.skipUpdatePackageJson, 'true')}}: - task: PowerShell@2 displayName: 'Update Docs.MS CI Targeted Packages' - condition: and(succeededOrFailed(), eq('${{ parameters.OnboardingBranch }}','')) + condition: and(succeededOrFailed(), eq('${{ parameters.OnboardingBranch }}',''), ne('${{ parameters.SkipPackageJson }}', true)) inputs: targetType: filePath filePath: ${{ parameters.ScriptDirectory }}/update-docs-ci.ps1 From 57ce097a27501d3179f8eac1707947b977b67865 Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Fri, 11 Dec 2020 09:24:22 -0800 Subject: [PATCH 3/3] Update the indentation --- .../templates/steps/docs-metadata-release.yml | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/eng/common/pipelines/templates/steps/docs-metadata-release.yml b/eng/common/pipelines/templates/steps/docs-metadata-release.yml index 3e7c4c6ba07..d281582039d 100644 --- a/eng/common/pipelines/templates/steps/docs-metadata-release.yml +++ b/eng/common/pipelines/templates/steps/docs-metadata-release.yml @@ -54,24 +54,23 @@ steps: env: GH_TOKEN: $(azuresdk-github-pat) - - ${{if ne(artifact.skipUpdatePackageJson, 'true')}}: - - task: PowerShell@2 - displayName: 'Update Docs.MS CI Targeted Packages' - condition: and(succeededOrFailed(), eq('${{ parameters.OnboardingBranch }}',''), ne('${{ parameters.SkipPackageJson }}', true)) - inputs: - targetType: filePath - filePath: ${{ parameters.ScriptDirectory }}/update-docs-ci.ps1 - arguments: > - -ArtifactLocation ${{ parameters.ArtifactLocation }} - -WorkDirectory "${{ parameters.WorkingDirectory }}" - -RepoId ${{ parameters.RepoId }} - -Repository ${{ parameters.PackageRepository }} - -ReleaseSHA ${{ parameters.ReleaseSha }} - -DocRepoLocation "${{ parameters.WorkingDirectory }}/repo" - -Configs "${{ parameters.CIConfigs }}" - pwsh: true - env: - GH_TOKEN: $(azuresdk-github-pat) +- task: PowerShell@2 + displayName: 'Update Docs.MS CI Targeted Packages' + condition: and(succeededOrFailed(), eq('${{ parameters.OnboardingBranch }}',''), ne('${{ parameters.SkipPackageJson }}', true)) + inputs: + targetType: filePath + filePath: ${{ parameters.ScriptDirectory }}/update-docs-ci.ps1 + arguments: > + -ArtifactLocation ${{ parameters.ArtifactLocation }} + -WorkDirectory "${{ parameters.WorkingDirectory }}" + -RepoId ${{ parameters.RepoId }} + -Repository ${{ parameters.PackageRepository }} + -ReleaseSHA ${{ parameters.ReleaseSha }} + -DocRepoLocation "${{ parameters.WorkingDirectory }}/repo" + -Configs "${{ parameters.CIConfigs }}" + pwsh: true + env: + GH_TOKEN: $(azuresdk-github-pat) - template: /eng/common/pipelines/templates/steps/create-pull-request.yml parameters: