Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing skip package json settings #18077

Closed
wants to merge 14 commits into from
15 changes: 13 additions & 2 deletions eng/common/pipelines/templates/steps/docs-metadata-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,18 @@ parameters:
GHTeamReviewersVariable: '' # externally set, as eng-common does not have the identity-resolver. Run as pre-step
OnboardingBranch: ''
CloseAfterOpenForTesting: false
SkipPackageJson: false

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."
}
displayName: Enable Long Paths if Necessary
- pwsh: |
git clone https://github.com/${{ parameters.TargetDocRepoOwner }}/${{ parameters.TargetDocRepoName }} ${{ parameters.WorkingDirectory }}/repo

Expand Down Expand Up @@ -53,9 +63,10 @@ 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 }}',''))
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
Expand Down
76 changes: 38 additions & 38 deletions eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions eng/pipelines/templates/stages/archetype-java-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ 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
# 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
Expand Down Expand Up @@ -189,6 +189,7 @@ stages:
GHReviewersVariable: 'OwningGHUser'
CIConfigs: $(CIConfigs)
CloseAfterOpenForTesting: '${{ parameters.TestPipeline }}'
SkipPackageJson: ${{artifact.skipUpdatePackageJson}}

- ${{if ne(artifact.skipPublishDocGithubIo, 'true')}}:
- deployment: PublishDocs
Expand Down
1 change: 1 addition & 0 deletions sdk/template/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ extends:
- name: azure-sdk-template
groupId: com.azure
safeName: azuresdktemplate
skipUpdatePackageJson: true