From daf3f9515c900ab6c214bb0ab340637b81da2cd9 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 ed9798b2989d..25c5332fd1c9 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 c1e7ce9370e11b4bee07a4d54664c151b718153c 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 25c5332fd1c9..3e7c4c6ba070 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 03ed233363b89a2856875c86956b58426cd823ff 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 3e7c4c6ba070..d281582039d9 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: