From a7c8dbd04485fa95b48b01834aaf572be2c64ec3 Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Thu, 10 Dec 2020 14:31:37 -0800 Subject: [PATCH 01/14] testing --- .../templates/steps/docs-metadata-release.yml | 35 ++++++++++--------- sdk/template/ci.yml | 1 + 2 files changed, 19 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 ed9798b2989d9..25c5332fd1c9b 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: diff --git a/sdk/template/ci.yml b/sdk/template/ci.yml index dd134830740c2..ca665acac18bb 100644 --- a/sdk/template/ci.yml +++ b/sdk/template/ci.yml @@ -30,3 +30,4 @@ extends: - name: azure-sdk-template groupId: com.azure safeName: azuresdktemplate + skipUpdatePackageJson: true From a0b6dd021702b695dd4338313bc716f4d4bdbcab Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Thu, 10 Dec 2020 14:51:13 -0800 Subject: [PATCH 02/14] Fixed some variables --- eng/common/pipelines/templates/steps/docs-metadata-release.yml | 3 ++- eng/pipelines/templates/stages/archetype-java-release.yml | 1 + 2 files changed, 3 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 25c5332fd1c9b..23c85ab9c6081 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: | @@ -53,7 +54,7 @@ steps: env: GH_TOKEN: $(azuresdk-github-pat) - - ${{if ne(artifact.skipUpdatePackageJson, 'true')}}: + - ${{if ne(SkipPackageJson, 'true')}}: - task: PowerShell@2 displayName: 'Update Docs.MS CI Targeted Packages' condition: and(succeededOrFailed(), eq('${{ parameters.OnboardingBranch }}','')) diff --git a/eng/pipelines/templates/stages/archetype-java-release.yml b/eng/pipelines/templates/stages/archetype-java-release.yml index 231355a68b3a2..7dd17ac6a8e63 100644 --- a/eng/pipelines/templates/stages/archetype-java-release.yml +++ b/eng/pipelines/templates/stages/archetype-java-release.yml @@ -189,6 +189,7 @@ stages: GHReviewersVariable: 'OwningGHUser' CIConfigs: $(CIConfigs) CloseAfterOpenForTesting: '${{ parameters.TestPipeline }}' + SkipPackageJson: artifact.skipPublishDocMs - ${{if ne(artifact.skipPublishDocGithubIo, 'true')}}: - deployment: PublishDocs From 07c7c03c1a529f30bdc1b82e4cc25621c6a647e8 Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Thu, 10 Dec 2020 14:53:11 -0800 Subject: [PATCH 03/14] fix --- eng/common/pipelines/templates/steps/docs-metadata-release.yml | 2 +- eng/pipelines/templates/stages/archetype-java-release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/common/pipelines/templates/steps/docs-metadata-release.yml b/eng/common/pipelines/templates/steps/docs-metadata-release.yml index 23c85ab9c6081..f5c2c8c853b35 100644 --- a/eng/common/pipelines/templates/steps/docs-metadata-release.yml +++ b/eng/common/pipelines/templates/steps/docs-metadata-release.yml @@ -54,7 +54,7 @@ steps: env: GH_TOKEN: $(azuresdk-github-pat) - - ${{if ne(SkipPackageJson, 'true')}}: + - ${{if ne(parameters.SkipPackageJson, 'true')}}: - task: PowerShell@2 displayName: 'Update Docs.MS CI Targeted Packages' condition: and(succeededOrFailed(), eq('${{ parameters.OnboardingBranch }}','')) diff --git a/eng/pipelines/templates/stages/archetype-java-release.yml b/eng/pipelines/templates/stages/archetype-java-release.yml index 7dd17ac6a8e63..8066802998f6c 100644 --- a/eng/pipelines/templates/stages/archetype-java-release.yml +++ b/eng/pipelines/templates/stages/archetype-java-release.yml @@ -189,7 +189,7 @@ stages: GHReviewersVariable: 'OwningGHUser' CIConfigs: $(CIConfigs) CloseAfterOpenForTesting: '${{ parameters.TestPipeline }}' - SkipPackageJson: artifact.skipPublishDocMs + SkipPackageJson: ${{artifact.skipPublishDocMs}} - ${{if ne(artifact.skipPublishDocGithubIo, 'true')}}: - deployment: PublishDocs From fae2444ffa07efb364758d32a4b010bfd8e0088a Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Thu, 10 Dec 2020 14:56:47 -0800 Subject: [PATCH 04/14] fix the call --- eng/common/pipelines/templates/steps/docs-metadata-release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eng/common/pipelines/templates/steps/docs-metadata-release.yml b/eng/common/pipelines/templates/steps/docs-metadata-release.yml index f5c2c8c853b35..bcfac0d381050 100644 --- a/eng/common/pipelines/templates/steps/docs-metadata-release.yml +++ b/eng/common/pipelines/templates/steps/docs-metadata-release.yml @@ -53,8 +53,7 @@ steps: pwsh: true env: GH_TOKEN: $(azuresdk-github-pat) - - - ${{if ne(parameters.SkipPackageJson, 'true')}}: + - ${{if ne(${{ parameters.SkipPackageJson }}, 'true')}}: - task: PowerShell@2 displayName: 'Update Docs.MS CI Targeted Packages' condition: and(succeededOrFailed(), eq('${{ parameters.OnboardingBranch }}','')) From a622e206521e2295adef61c6ba0b1262b8667cab Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Thu, 10 Dec 2020 15:11:57 -0800 Subject: [PATCH 05/14] try --- .../templates/steps/docs-metadata-release.yml | 36 +++++++++---------- 1 file changed, 18 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 bcfac0d381050..3fabb2ee19532 100644 --- a/eng/common/pipelines/templates/steps/docs-metadata-release.yml +++ b/eng/common/pipelines/templates/steps/docs-metadata-release.yml @@ -53,24 +53,24 @@ steps: pwsh: true env: GH_TOKEN: $(azuresdk-github-pat) - - ${{if ne(${{ parameters.SkipPackageJson }}, '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) + + - 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: From 08dbf25f09c63973cfb5c62f43a51ce349e34347 Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Thu, 10 Dec 2020 15:17:52 -0800 Subject: [PATCH 06/14] Indentation --- .../templates/steps/docs-metadata-release.yml | 34 +++++++++---------- 1 file changed, 17 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 3fabb2ee19532..d281582039d9f 100644 --- a/eng/common/pipelines/templates/steps/docs-metadata-release.yml +++ b/eng/common/pipelines/templates/steps/docs-metadata-release.yml @@ -54,23 +54,23 @@ steps: 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) +- 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: From 6a3d079171b2c4b5e5da79600f69fa2de9b80af6 Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Thu, 10 Dec 2020 17:11:00 -0800 Subject: [PATCH 07/14] enable long path --- .../pipelines/templates/steps/docs-metadata-release.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/eng/common/pipelines/templates/steps/docs-metadata-release.yml b/eng/common/pipelines/templates/steps/docs-metadata-release.yml index d281582039d9f..34edc99088f75 100644 --- a/eng/common/pipelines/templates/steps/docs-metadata-release.yml +++ b/eng/common/pipelines/templates/steps/docs-metadata-release.yml @@ -22,6 +22,14 @@ parameters: SkipPackageJson: false steps: +- pwsh: | + if ($IsWindows) { + REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem /f /v LongPathsEnabled /t REG_DWORD /d 1 + } + else { + Write-Host "This script is not executing on Windows, skipping registry modification." + } + displayName: Enable Long Paths if Necessary - pwsh: | git clone https://github.com/${{ parameters.TargetDocRepoOwner }}/${{ parameters.TargetDocRepoName }} ${{ parameters.WorkingDirectory }}/repo From fafe70799b7abc34499261706c099296ab6406e6 Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Thu, 10 Dec 2020 17:35:33 -0800 Subject: [PATCH 08/14] More on longpath --- eng/common/pipelines/templates/steps/docs-metadata-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/common/pipelines/templates/steps/docs-metadata-release.yml b/eng/common/pipelines/templates/steps/docs-metadata-release.yml index 34edc99088f75..4bae10a9e8100 100644 --- a/eng/common/pipelines/templates/steps/docs-metadata-release.yml +++ b/eng/common/pipelines/templates/steps/docs-metadata-release.yml @@ -25,6 +25,7 @@ steps: - pwsh: | if ($IsWindows) { REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem /f /v LongPathsEnabled /t REG_DWORD /d 1 + git config --system core.longpaths true } else { Write-Host "This script is not executing on Windows, skipping registry modification." From d464d193b707857c2aef74a616ddf8abd479fcae Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Thu, 10 Dec 2020 21:58:30 -0800 Subject: [PATCH 09/14] more testing --- .../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 4bae10a9e8100..474e5ed0b4e8d 100644 --- a/eng/common/pipelines/templates/steps/docs-metadata-release.yml +++ b/eng/common/pipelines/templates/steps/docs-metadata-release.yml @@ -63,23 +63,24 @@ steps: 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) +- ${{if ne( parameters['SkipPackageJson'], 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) - template: /eng/common/pipelines/templates/steps/create-pull-request.yml parameters: From 1eb4a8696a1ddbc2ba1ec574834f4edf1b642d39 Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Thu, 10 Dec 2020 22:00:02 -0800 Subject: [PATCH 10/14] more testings --- .../templates/steps/docs-metadata-release.yml | 36 +++++++++---------- .../stages/archetype-java-release.yml | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/eng/common/pipelines/templates/steps/docs-metadata-release.yml b/eng/common/pipelines/templates/steps/docs-metadata-release.yml index 474e5ed0b4e8d..ba418b55b570a 100644 --- a/eng/common/pipelines/templates/steps/docs-metadata-release.yml +++ b/eng/common/pipelines/templates/steps/docs-metadata-release.yml @@ -63,24 +63,24 @@ steps: env: GH_TOKEN: $(azuresdk-github-pat) -- ${{if ne( parameters['SkipPackageJson'], 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) +#- ${{if ne( parameters['SkipPackageJson'], 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) - template: /eng/common/pipelines/templates/steps/create-pull-request.yml parameters: diff --git a/eng/pipelines/templates/stages/archetype-java-release.yml b/eng/pipelines/templates/stages/archetype-java-release.yml index 8066802998f6c..03184b3df84a8 100644 --- a/eng/pipelines/templates/stages/archetype-java-release.yml +++ b/eng/pipelines/templates/stages/archetype-java-release.yml @@ -159,7 +159,7 @@ stages: displayName: "Publish Updates for Docs.MS" condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true')) environment: github - dependsOn: PublishPackage + # dependsOn: PublishPackage variables: CIConfigs: "{'targets':[{'path_to_config':'package.json','mode':'Preview','monikerid':'1','content_folder':'docs-ref-services/preview'},{'path_to_config':'package.json','mode':'Latest','monikerid':'0','content_folder':'docs-ref-services/latest'}]}" skipComponentGovernanceDetection: true From ba17c3f270b59b299b1b2d0edac553745b9a4ac1 Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Thu, 10 Dec 2020 22:34:58 -0800 Subject: [PATCH 11/14] 1 --- .../templates/steps/docs-metadata-release.yml | 36 ++++----- .../templates/jobs/archetype-sdk-client.yml | 76 +++++++++---------- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/eng/common/pipelines/templates/steps/docs-metadata-release.yml b/eng/common/pipelines/templates/steps/docs-metadata-release.yml index ba418b55b570a..a72f32235854f 100644 --- a/eng/common/pipelines/templates/steps/docs-metadata-release.yml +++ b/eng/common/pipelines/templates/steps/docs-metadata-release.yml @@ -63,24 +63,24 @@ steps: env: GH_TOKEN: $(azuresdk-github-pat) -#- ${{if ne( parameters['SkipPackageJson'], 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) +- ${{if ne( parameters['SkipPackageJson'], true)}}: + - task: PowerShell@2 + displayName: 'Update Docs.MS CI Targeted Packages ${{parameters.SkipPackageJson}}' + 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: diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index 4024283f3fe80..57ecddeebfa8f 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -306,44 +306,44 @@ jobs: # we want to run this when TestFromSource isn't true condition: and(succeeded(), ne(variables['TestFromSource'],'true')) - - task: Maven@3 - displayName: 'Build for From Source run' - inputs: - mavenPomFile: ClientAggregatePom.xml - goals: 'install' - # Build and install every track 2, client, library. The purpose is to have all of - # the libraries installed on the machine so we can simply run tests with the -amd - # switch and we can remove the SNAFU of dependencies that bloated the ci.yml files' - # AdditionalModules because we ended up having to list every transitive azure client - # dependency. Note: The -T 1C says spin up a build thread per core. Since we're building - # all of the track 2, client, libraries (which is now over 100) this effectively cuts the - # the build time in half. - options: '$(DefaultOptions) -T 1C -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Drevapi.skip=true' - mavenOptions: '$(MemoryOptions) $(LoggingOptions)' - javaHomeOption: 'JDKVersion' - jdkVersionOption: $(JavaBuildVersion) - jdkArchitectureOption: 'x64' - publishJUnitResults: false - condition: and(succeeded(), and(eq(variables['TestFromSource'],'true'), eq(variables['ShouldRunSourceTests'],'true'))) - - - task: Maven@3 - displayName: 'Run tests for From Source run' - inputs: - mavenPomFile: ClientAggregatePom.xml - # For the From Source runs we don't want the -am switch as we don't care about running tests for our dependencies - # but we do want the -amd switch because we want to run tests on things that depend on us. - options: ${{ parameters.TestOptions }} -pl $(PLSkipOptions)$(ProjectList) -amd - mavenOptions: '$(MemoryOptions) $(LoggingOptions)' - javaHomeOption: 'JDKVersion' - jdkVersionOption: $(JavaTestVersion) - jdkArchitectureOption: 'x64' - publishJUnitResults: false - # The From Source runs only care about running tests for libraries within an SDK/area - # as well as libraries which depend on them and not the other stages in the Maven - # lifecycle that test or verify targets would execute. The libraries were already - # compiled and installed in the previous task, this tasks only runs tests. - goals: 'surefire:test' - condition: and(succeeded(), and(eq(variables['TestFromSource'],'true'), eq(variables['ShouldRunSourceTests'],'true'))) + # - task: Maven@3 + # displayName: 'Build for From Source run' + # inputs: + # mavenPomFile: ClientAggregatePom.xml + # goals: 'install' + # # Build and install every track 2, client, library. The purpose is to have all of + # # the libraries installed on the machine so we can simply run tests with the -amd + # # switch and we can remove the SNAFU of dependencies that bloated the ci.yml files' + # # AdditionalModules because we ended up having to list every transitive azure client + # # dependency. Note: The -T 1C says spin up a build thread per core. Since we're building + # # all of the track 2, client, libraries (which is now over 100) this effectively cuts the + # # the build time in half. + # options: '$(DefaultOptions) -T 1C -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Drevapi.skip=true' + # mavenOptions: '$(MemoryOptions) $(LoggingOptions)' + # javaHomeOption: 'JDKVersion' + # jdkVersionOption: $(JavaBuildVersion) + # jdkArchitectureOption: 'x64' + # publishJUnitResults: false + # condition: and(succeeded(), and(eq(variables['TestFromSource'],'true'), eq(variables['ShouldRunSourceTests'],'true'))) + + # - task: Maven@3 + # displayName: 'Run tests for From Source run' + # inputs: + # mavenPomFile: ClientAggregatePom.xml + # # For the From Source runs we don't want the -am switch as we don't care about running tests for our dependencies + # # but we do want the -amd switch because we want to run tests on things that depend on us. + # options: ${{ parameters.TestOptions }} -pl $(PLSkipOptions)$(ProjectList) -amd + # mavenOptions: '$(MemoryOptions) $(LoggingOptions)' + # javaHomeOption: 'JDKVersion' + # jdkVersionOption: $(JavaTestVersion) + # jdkArchitectureOption: 'x64' + # publishJUnitResults: false + # # The From Source runs only care about running tests for libraries within an SDK/area + # # as well as libraries which depend on them and not the other stages in the Maven + # # lifecycle that test or verify targets would execute. The libraries were already + # # compiled and installed in the previous task, this tasks only runs tests. + # goals: 'surefire:test' + # condition: and(succeeded(), and(eq(variables['TestFromSource'],'true'), eq(variables['ShouldRunSourceTests'],'true'))) - template: ../steps/upload-repository-on-failure.yml From 9a2c210ef3bdd2ee8068f9cd59336304ba1df34d Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Thu, 10 Dec 2020 22:41:07 -0800 Subject: [PATCH 12/14] change to right name --- eng/pipelines/templates/stages/archetype-java-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/templates/stages/archetype-java-release.yml b/eng/pipelines/templates/stages/archetype-java-release.yml index 03184b3df84a8..78c9c93e5e1a2 100644 --- a/eng/pipelines/templates/stages/archetype-java-release.yml +++ b/eng/pipelines/templates/stages/archetype-java-release.yml @@ -189,7 +189,7 @@ stages: GHReviewersVariable: 'OwningGHUser' CIConfigs: $(CIConfigs) CloseAfterOpenForTesting: '${{ parameters.TestPipeline }}' - SkipPackageJson: ${{artifact.skipPublishDocMs}} + SkipPackageJson: ${{artifact.skipUpdatePackageJson}} - ${{if ne(artifact.skipPublishDocGithubIo, 'true')}}: - deployment: PublishDocs From 2643f73a9dbf784a7225ab76cd816670eb7dbb3d Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Thu, 10 Dec 2020 22:54:45 -0800 Subject: [PATCH 13/14] another tests --- .../templates/steps/docs-metadata-release.yml | 36 +++++++++---------- .../stages/archetype-java-release.yml | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/eng/common/pipelines/templates/steps/docs-metadata-release.yml b/eng/common/pipelines/templates/steps/docs-metadata-release.yml index a72f32235854f..fba83308a3c5a 100644 --- a/eng/common/pipelines/templates/steps/docs-metadata-release.yml +++ b/eng/common/pipelines/templates/steps/docs-metadata-release.yml @@ -63,24 +63,24 @@ steps: env: GH_TOKEN: $(azuresdk-github-pat) -- ${{if ne( parameters['SkipPackageJson'], true)}}: - - task: PowerShell@2 - displayName: 'Update Docs.MS CI Targeted Packages ${{parameters.SkipPackageJson}}' - 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) +#- ${{if ne( parameters['SkipPackageJson'], true)}}: +- task: PowerShell@2 + displayName: 'Update Docs.MS CI Targeted Packages ${{parameters.SkipPackageJson}}' + 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: diff --git a/eng/pipelines/templates/stages/archetype-java-release.yml b/eng/pipelines/templates/stages/archetype-java-release.yml index 78c9c93e5e1a2..80c0b6ff6399d 100644 --- a/eng/pipelines/templates/stages/archetype-java-release.yml +++ b/eng/pipelines/templates/stages/archetype-java-release.yml @@ -156,7 +156,7 @@ stages: - ${{if ne(artifact.skipPublishDocMs, 'true')}}: - deployment: PublicDocsMs - displayName: "Publish Updates for Docs.MS" + displayName: "Publish Updates for Docs.MS ${{artifact.skipUpdatePackageJson}}" condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true')) environment: github # dependsOn: PublishPackage From 78c6f5cd1046d545052d9efa8eee07ffc1ed3ec7 Mon Sep 17 00:00:00 2001 From: Sima Zhu Date: Thu, 10 Dec 2020 23:06:46 -0800 Subject: [PATCH 14/14] another tests1 --- eng/common/pipelines/templates/steps/docs-metadata-release.yml | 2 +- 1 file changed, 1 insertion(+), 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 fba83308a3c5a..d7fe0f9ae0337 100644 --- a/eng/common/pipelines/templates/steps/docs-metadata-release.yml +++ b/eng/common/pipelines/templates/steps/docs-metadata-release.yml @@ -66,7 +66,7 @@ steps: #- ${{if ne( parameters['SkipPackageJson'], true)}}: - task: PowerShell@2 displayName: 'Update Docs.MS CI Targeted Packages ${{parameters.SkipPackageJson}}' - condition: and(succeededOrFailed(), eq('${{ parameters.OnboardingBranch }}',''), ne('${{ parameters.SkipPackageJson }}', 'true')) + condition: and(succeededOrFailed(), eq('${{ parameters.OnboardingBranch }}',''), ne('${{ parameters.SkipPackageJson }}', true)) inputs: targetType: filePath filePath: ${{ parameters.ScriptDirectory }}/update-docs-ci.ps1