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

Cut over to 1ES hosted pools for Java pipelines #18432

Merged
merged 10 commits into from
Jan 11, 2021
128 changes: 82 additions & 46 deletions eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,75 @@
parameters:
SDKType: client
ServiceDirectory: not-specified # Set a default that breaks in obvious ways.
TestPipeline: false
Artifacts: []
AdditionalModules: []
PreTestSteps: []
TestOptions: '$(DefaultOptions) -DtrimStackTrace=false -Dmaven.javadoc.skip=true -Dspotbugs.skip=true -Dcheckstyle.skip=true -Drevapi.skip=true -Dparallel-test-playback'
TestGoals: verify
TestMatrix:
Linux - Java 8:
OSVmImage: 'ubuntu-18.04'
JavaTestVersion: '1.8'
RunTitle: 'Linux on Java 1.8'
macOS - Java 8:
OSVmImage: 'macOS-10.15'
JavaTestVersion: '1.8'
RunTitle: 'macOS on Java 1.8'
Windows - Java 8:
OSVmImage: 'windows-2019'
JavaTestVersion: '1.8'
RunTitle: 'Windows on Java 1.8'
Linux - Java 11:
OSVmImage: 'ubuntu-18.04'
JavaTestVersion: '1.11'
RunTitle: 'Linux on Java 1.11'
macOS - Java 11:
OSVmImage: 'macOS-10.15'
JavaTestVersion: '1.11'
RunTitle: 'macOS on Java 1.11'
Windows - Java 11:
OSVmImage: 'windows-2019'
JavaTestVersion: '1.11'
RunTitle: 'Windows on Java 1.11'
Linux From Source - Java 11:
OSVmImage: 'ubuntu-18.04'
JavaTestVersion: '1.11'
RunTitle: 'From Source: Linux on Java 1.11'
AdditionalOptions: '-amd'
TestFromSource: true
- name: SDKType
type: string
default: client
- name: ServiceDirectory
type: string
default: 'not-specified' # Set a default that breaks in obvious ways.
- name: TestPipeline
type: boolean
default: false
- name: Artifacts
type: object
default: []
- name: AdditionalModules
type: object
default: []
- name: PreTestSteps
type: object
default: []
- name: TestOptions
type: string
default: '$(DefaultOptions) -DtrimStackTrace=false -Dmaven.javadoc.skip=true -Dspotbugs.skip=true -Dcheckstyle.skip=true -Drevapi.skip=true -Dparallel-test-playback'
- name: TestGoals
type: string
default: verify
- name: WindowsPool
type: string
default: azsdk-pool-mms-win-2019-general
- name: LinuxPool
type: string
default: azsdk-pool-mms-ubuntu-1804-general
- name: TestMatrix
type: object
default:
Linux - Java 8:
Pool: $(LinuxPool)
OSVmImage:
JavaTestVersion: '1.8'
RunTitle: 'Linux on Java 1.8'
macOS - Java 8:
Pool:
OSVmImage: 'macOS-10.15'
JavaTestVersion: '1.8'
RunTitle: 'macOS on Java 1.8'
Windows - Java 8:
Pool: $(WindowsPool)
OSVmImage:
JavaTestVersion: '1.8'
RunTitle: 'Windows on Java 1.8'
Linux - Java 11:
Pool: $(LinuxPool)
OSVmImage:
JavaTestVersion: '1.11'
RunTitle: 'Linux on Java 1.11'
macOS - Java 11:
Pool:
OSVmImage: 'macOS-10.15'
JavaTestVersion: '1.11'
RunTitle: 'macOS on Java 1.11'
Windows - Java 11:
Pool: $(WindowsPool)
OSVmImage:
JavaTestVersion: '1.11'
RunTitle: 'Windows on Java 1.11'
Linux From Source - Java 11:
Pool: $(LinuxPool)
OSVmImage:
JavaTestVersion: '1.11'
RunTitle: 'From Source: Linux on Java 1.11'
AdditionalOptions: '-amd'
TestFromSource: true


jobs:
- job: 'Build'
Expand All @@ -46,7 +78,7 @@ jobs:
- template: ../variables/globals.yml

pool:
vmImage: 'ubuntu-18.04'
name: ${{ parameters.LinuxPool }}

strategy:
matrix:
Expand Down Expand Up @@ -144,11 +176,9 @@ jobs:

variables:
- template: ../variables/globals.yml
- name: OSVmImage
value: 'ubuntu-18.04'

pool:
vmImage: $(OSVmImage)
name: ${{ parameters.LinuxPool }}

steps:
- pwsh: |
Expand Down Expand Up @@ -231,8 +261,15 @@ jobs:
- job: 'Test'
condition: and(succeeded(), ne(variables['Skip.Test'], 'true'))

# HACK: We can't reference parameters to define other parameters, so I am
# setting some variables with the value of parameters which can then
# be used later in the test evaluations.
variables:
- template: ../variables/globals.yml
- name: WindowsPool
value: ${{parameters.WindowsPool}}
- name: LinuxPool
value: ${{parameters.LinuxPool}}

strategy:
matrix:
Expand All @@ -243,11 +280,10 @@ jobs:
${{ insert }}: ${{ matrixEntry.value }}

pool:
vmImage: $(OSVmImage)
name: $[coalesce(variables['Pool'], '')]
vmImage: $[coalesce(variables['OSVmImage'], '')]

steps:
- template: /eng/common/pipelines/templates/steps/verify-agent-os.yml

- template: ../steps/cache-maven-repository.yml

- template: ../steps/install-reporting-tools.yml
Expand Down
30 changes: 24 additions & 6 deletions eng/pipelines/templates/stages/archetype-java-release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
parameters:
Artifacts: []
TestPipeline: false
ArtifactName: 'not-specified'
TargetDocRepoOwner: ''
TargetDocRepoName: ''
EnableIntegrationStage: true
- name: Artifacts
type: object
default: []
- name: TestPipeline
type: boolean
default: false
- name: ArtifactName
type: string
default: 'not-specified'
- name: TargetDocRepoOwner
type: string
default: ''
- name: TargetDocRepoName
type: string
default: ''
- name: EnableIntegrationStage
type: boolean
default: true
- name: WindowsPool
type: string
default: azsdk-pool-mms-win-2019-general
- name: LinuxPool
type: string
default: azsdk-pool-mms-ubuntu-1804-general

stages:
# The signing stage is responsible for submitting binaries to ESRP for our official signing
Expand Down