Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions .azure-pipelines/client.test.live.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,30 @@ jobs:
vmImage: 'vs2017-win2016'

steps:
# Adding -Dmaven.wagon.http.pool=false to the mvn command as a workaround to prevent build failures at maven artifacts downloading stage.
- task: Maven@3
displayName: 'Run Live tests'
inputs:
mavenPomFile: $(pomFilePath)
options: '--batch-mode -Dmaven.wagon.http.pool=false -Dsurefire.rerunFailingTestsCount=3'
mavenOptions: '-Xmx3072m -Dorg.slf4j.simpleLogger.defaultLogLevel=error -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'test'
env:
ARM_CLIENTID: $(java-keyvault-test-arm-client-id)
ARM_CLIENTKEY: $(java-keyvault-test-arm-client-key)
AZURE_TEST_MODE: RECORD
AZURE_BATCH_ACCOUNT: $(java-batch-test-account-name)
AZURE_BATCH_ACCESS_KEY: $(java-batch-test-account-access-key)
STORAGE_ACCOUNT_KEY: $(java-batch-test-storage-account-key)
STORAGE_ACCOUNT_NAME: $(java-batch-test-storage-account-name)
AZURE_BATCH_ENDPOINT: https://servbatch.centralus.batch.azure.com
# Adding -Dmaven.wagon.http.pool=false to the mvn command as a workaround to prevent build failures at maven artifacts downloading stage.
- task: Maven@3
displayName: 'Run Live tests'
inputs:
mavenPomFile: $(pomFilePath)
options: '--batch-mode -Dmaven.wagon.http.pool=false -Dsurefire.rerunFailingTestsCount=3'
mavenOptions: '-Xmx3072m -Dorg.slf4j.simpleLogger.defaultLogLevel=error -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'test'
env:
ARM_CLIENTID: $(java-keyvault-test-arm-client-id)
ARM_CLIENTKEY: $(java-keyvault-test-arm-client-key)
AZURE_TEST_MODE: RECORD
AZURE_BATCH_ACCOUNT: $(java-batch-test-account-name)
AZURE_BATCH_ACCESS_KEY: $(java-batch-test-account-access-key)
STORAGE_ACCOUNT_KEY: $(java-batch-test-storage-account-key)
STORAGE_ACCOUNT_NAME: $(java-batch-test-storage-account-name)
AZURE_BATCH_ENDPOINT: https://servbatch.centralus.batch.azure.com

- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
mergeTestResults: true
testRunTitle: 'Live tests for $(pomFilePath)'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
mergeTestResults: true
testRunTitle: 'Live tests for $(pomFilePath)'
167 changes: 84 additions & 83 deletions .azure-pipelines/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ jobs:
publishJUnitResults: false

- powershell: |
# use sources files as a marker to find POM files so we can copy them to the output. The sources.jar file is generally
# in a target folder next to the pom.xml file so $_.Directory.Parent should get us the folder that contains the POM.
dir -r -i *-sources.jar | % { copy (Join-Path $_.Directory.Parent.FullName "pom.xml") (Join-Path $(Build.ArtifactStagingDirectory) $_.Name.Replace("-sources.jar",".pom")) }
dir -r -i *.jar | % { copy $_ $(Build.ArtifactStagingDirectory) }
# use sources files as a marker to find POM files so we can copy them to the output. The sources.jar file is generally
# in a target folder next to the pom.xml file so $_.Directory.Parent should get us the folder that contains the POM.
dir -r -i *-sources.jar | % { copy (Join-Path $_.Directory.Parent.FullName "pom.xml") (Join-Path $(Build.ArtifactStagingDirectory) $_.Name.Replace("-sources.jar",".pom")) }
dir -r -i *.jar | % { copy $_ $(Build.ArtifactStagingDirectory) }
displayName: 'Copy JAR and POM files to artifact staging'

- task: PublishBuildArtifacts@1
displayName: 'Publish'
displayName: 'Publish Artifacts $(ArtifactName)'
inputs:
artifactName: '$(ArtifactName)'

Expand All @@ -56,55 +56,56 @@ jobs:
vmImage: 'ubuntu-16.04'

steps:
# sudo is required for pip install, as a console_entrypoint shim needs to be placed in bin
- script: |
pip install setuptools wheel
sudo pip install doc-warden
ward scan -d $(Build.SourcesDirectory) -c $(Build.SourcesDirectory)/eng/.docsettings.yml
displayName: 'Verify Readmes'

- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
# ComponentGovernance is currently unable to run on pull requests of public projects. Running on non-PR
# builds should be sufficient.
condition: and(succeededOrFailed(), ne(variables['Build.Reason'], 'PullRequest'))
displayName: 'Component Detection'

# We `install` separately from running `site:site site:stage` so that the `install` brings in the non-shipping-modules,
# but we don't include them in the Maven site commands (so that we don't generate reports for the non-shipping modules).
- task: Maven@3
displayName: 'Install reporting tools'
inputs:
mavenPomFile: $(pomFile)
options: '$(DefaultOptions) -Dinclude-non-shipping-modules -DskipTests -Dgpg.skip'
mavenOptions: '$(LoggingOptions)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'install'

- task: Maven@3
displayName: 'Generate Maven project site, including JavaDocs, SpotBugs, and CheckStyle reports'
inputs:
mavenPomFile: $(pomFile)
options: '$(DefaultOptions) -DskipTests -Dgpg.skip'
mavenOptions: '$(LoggingOptions)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'site:site site:stage'

- powershell: |
copy -r target/staging $(Build.ArtifactStagingDirectory)
copy eng/code-quality-reports/src/main/resources/index.html $(Build.ArtifactStagingDirectory)
copy eng/spotbugs-aggregate-report/target/spotbugs/spotbugsXml.html (Join-Path $(Build.ArtifactStagingDirectory) "staging")
displayName: 'Copy reports to artifact staging'

- task: PublishBuildArtifacts@1
displayName: 'Publish'
inputs:
artifactName: reports
# sudo is required for pip install, as a console_entrypoint shim needs to be placed in bin
- script: |
pip install setuptools wheel
sudo pip install doc-warden
ward scan -d $(Build.SourcesDirectory) -c $(Build.SourcesDirectory)/eng/.docsettings.yml
displayName: 'Verify Readmes'

- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
# ComponentGovernance is currently unable to run on pull requests of public projects. Running on non-PR
# builds should be sufficient.
condition: and(succeededOrFailed(), ne(variables['Build.Reason'], 'PullRequest'))
displayName: 'Component Detection'

# We `install` separately from running `site:site site:stage` so that the `install` brings in the non-shipping-modules,
# but we don't include them in the Maven site commands (so that we don't generate reports for the non-shipping modules).
- task: Maven@3
displayName: 'Install reporting tools'
inputs:
mavenPomFile: $(pomFile)
options: '$(DefaultOptions) -Dinclude-non-shipping-modules -DskipTests -Dgpg.skip'
mavenOptions: '$(LoggingOptions)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'install'

- task: Maven@3
displayName: 'Generate Maven project site, including JavaDocs, SpotBugs, and CheckStyle reports'
inputs:
mavenPomFile: $(pomFile)
options: '$(DefaultOptions) -DskipTests -Dgpg.skip'
mavenOptions: '$(LoggingOptions)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'site:site site:stage'

- powershell: |
copy -r target/staging $(Build.ArtifactStagingDirectory)
copy eng/code-quality-reports/src/main/resources/index.html $(Build.ArtifactStagingDirectory)
copy eng/spotbugs-aggregate-report/target/spotbugs/spotbugsXml.html (Join-Path $(Build.ArtifactStagingDirectory) "staging")
displayName: 'Copy reports to artifact staging'

- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
displayName: 'Publish Report Artifacts'
inputs:
artifactName: reports

- job: 'Test'

Expand Down Expand Up @@ -145,32 +146,32 @@ jobs:
vmImage: $(OSVmImage)

steps:
- task: Maven@3
displayName: 'Start Jetty'
inputs:
mavenPomFile: $(pomFile)
options: '$(DefaultOptions) $(ProfileFlag)'
mavenOptions: '$(LoggingOptions)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: $(JavaVersion)
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'jetty:run-forked'

- task: Maven@3
displayName: 'Run tests'
inputs:
mavenPomFile: $(pomFile)
options: '$(DefaultOptions) $(ProfileFlag)'
mavenOptions: '-Xmx3072m $(LoggingOptions)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: $(JavaVersion)
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'test'

- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
mergeTestResults: true
testRunTitle: '$(OSName) on Java $(JavaVersion)'
- task: Maven@3
displayName: 'Start Jetty'
inputs:
mavenPomFile: $(pomFile)
options: '$(DefaultOptions) $(ProfileFlag)'
mavenOptions: '$(LoggingOptions)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: $(JavaVersion)
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'jetty:run-forked'

- task: Maven@3
displayName: 'Run tests'
inputs:
mavenPomFile: $(pomFile)
options: '$(DefaultOptions) $(ProfileFlag)'
mavenOptions: '-Xmx3072m $(LoggingOptions)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: $(JavaVersion)
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'test'

- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
mergeTestResults: true
testRunTitle: '$(OSName) on Java $(JavaVersion)'