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

Build and test with Java 17 #24144

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
07b0a28
Update default java version to 17
mikeharder Sep 15, 2021
b63272e
Disable analyze and test jobs
mikeharder Sep 15, 2021
4f6b966
Download and install Java 17
mikeharder Sep 15, 2021
b4b30c9
Use temp and tools directory variables
mikeharder Sep 15, 2021
464e5f6
Skip javadoc
mikeharder Sep 15, 2021
f23e398
Use default pool for faster build startup
mikeharder Sep 15, 2021
625bd0b
Run analyze and test on Java 17
mikeharder Sep 15, 2021
97a77ee
Specify named pool
mikeharder Sep 15, 2021
ef76bcb
Fix template parameter
mikeharder Sep 15, 2021
713be8b
Generate matrix on Azure Pipelines
mikeharder Sep 15, 2021
bd03139
Fix template
mikeharder Sep 15, 2021
4ac396b
Remote extra quote
mikeharder Sep 15, 2021
418e9bf
Fix typo
mikeharder Sep 15, 2021
37e7a93
Add quotes around parameters
mikeharder Sep 15, 2021
d9d08bb
Fix install java template
mikeharder Sep 15, 2021
b04fb86
Fix install java
mikeharder Sep 15, 2021
a5525ea
Fix install-java on Windows and MacOS
mikeharder Sep 15, 2021
0a8ae18
Move variables to globals.yml
mikeharder Sep 15, 2021
f281ef2
Skip javadoc in analyze
mikeharder Sep 15, 2021
3917244
Move jdk vars to params
mikeharder Sep 15, 2021
371a6f9
Remove parameters
mikeharder Sep 15, 2021
fb80439
Move template expression
mikeharder Sep 15, 2021
4d14d03
Change if expressions to conditions
mikeharder Sep 15, 2021
611ba70
Try global variables again
mikeharder Sep 15, 2021
28e89e2
Back to task conditions
mikeharder Sep 15, 2021
11798bb
Fix conditions
mikeharder Sep 15, 2021
d8f25c8
Revert changes to agent pools
mikeharder Oct 2, 2021
e92b61b
Only install Java 17 on Linux
mikeharder Oct 2, 2021
ec47e1a
Only install Java 17 on Linux
mikeharder Oct 2, 2021
98833dc
Only install Java 17 on Linux
mikeharder Oct 2, 2021
8658ee7
Fix whitespace
mikeharder Oct 2, 2021
b30ec7d
Fix template conditional
mikeharder Oct 2, 2021
4c0b04a
Only install Java 17 on Linux
mikeharder Oct 2, 2021
f4b34f3
Don't install Java 17
mikeharder Jan 24, 2022
436d541
Don't install Java 17, fix bad merge
mikeharder Jan 24, 2022
0660701
Don't install Java 17 on any OS
mikeharder Jan 24, 2022
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
4 changes: 2 additions & 2 deletions eng/pipelines/templates/jobs/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ jobs:
inputs:
mavenPomFile: pom.xml
goals: 'deploy'
options: '$(DefaultOptions) -T ${{parameters.MavenBuildPackageParallelization}} ${{parameters.SparkShading}} --quiet -DskipTests -Dgenerate-overview -Dspotbugs.skip=true -Dcheckstyle.skip=true -Drevapi.skip=true -pl $(ProjectList) -am -DaltDeploymentRepository=id::default::file://$(System.DefaultWorkingDirectory)/build' # We include template-module so we ensure it always builds in CI
options: '$(DefaultOptions) -T ${{parameters.MavenBuildPackageParallelization}} ${{parameters.SparkShading}} --quiet -DskipTests -Dgenerate-overview -Dspotbugs.skip=true -Dcheckstyle.skip=true -Drevapi.skip=true -Dmaven.javadoc.skip=true -pl $(ProjectList) -am -DaltDeploymentRepository=id::default::file://$(System.DefaultWorkingDirectory)/build' # We include template-module so we ensure it always builds in CI
mavenOptions: '$(MemoryOptions) $(LoggingOptions)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: $(JavaBuildVersion)
Expand Down Expand Up @@ -320,7 +320,7 @@ jobs:
displayName: 'Run SpotBugs, Checkstyle, RevApi, and Javadoc'
inputs:
mavenPomFile: pom.xml
options: '$(DefaultOptions) --no-transfer-progress -DskipTests -Dgpg.skip -Dverify-readme -Dmaven.main.skip=true -Dmaven.test.skip=true ${{ parameters.MavenVerifyAdditionalOptions }} -pl $(ProjectList)'
options: '$(DefaultOptions) --no-transfer-progress -DskipTests -Dgpg.skip -Dverify-readme -Dmaven.main.skip=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true ${{ parameters.MavenVerifyAdditionalOptions }} -pl $(ProjectList)'
mavenOptions: '$(MemoryOptions)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: $(JavaBuildVersion)
Expand Down
12 changes: 3 additions & 9 deletions eng/pipelines/templates/stages/platform-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,18 @@
"windows-2019": { "OSVmImage": "MMS2019", "Pool": "azsdk-pool-mms-win-2019-general" },
"macOS-10.15": { "OSVmImage": "macOS-10.15", "Pool": "Azure Pipelines" }
},
"JavaTestVersion": [ "1.8", "1.11" ],
"JavaTestVersion": [ "1.17" ],
"AZURE_TEST_HTTP_CLIENTS": [ "okhttp", "netty" ],
"TestGoals": "surefire:test",
"AdditionalTestGoals": "",
"TestOptions": ""
},
"exclude": [
{
"Pool": "azsdk-pool-mms-win-2019-general",
"JavaTestVersion": "1.11"
}
],
"include": [
{
"Agent": {
"ubuntu-20.04": { "OSVmImage": "MMSUbuntu20.04", "Pool": "azsdk-pool-mms-ubuntu-2004-general" }
},
"JavaTestVersion": "1.11",
"JavaTestVersion": "1.17",
"AZURE_TEST_HTTP_CLIENTS": "netty",
"TestFromSource": true,
"TestGoals": "surefire:test",
Expand All @@ -35,7 +29,7 @@
"Agent": {
"windows-2019": { "OSVmImage": "MMS2019", "Pool": "azsdk-pool-mms-win-2019-general" }
},
"JavaTestVersion": "1.11",
"JavaTestVersion": "1.17",
"AZURE_TEST_HTTP_CLIENTS": "netty",
"AdditionalOptions": "-am",
"TestGoals": "verify",
Expand Down
39 changes: 39 additions & 0 deletions eng/pipelines/templates/steps/install-java-17.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# steps:
# - pwsh: Invoke-WebRequest -Uri https://download.java.net/java/GA/jdk17/0d483333a00540d886896bac774ff48b/35/GPL/openjdk-17_linux-x64_bin.tar.gz -OutFile $(agent.tempDirectory)/openjdk-17_linux-x64_bin.tar.gz
# condition: and(succeeded(), contains(variables['Agent.OS'], 'linux'))

# - pwsh: Invoke-WebRequest -Uri https://download.java.net/java/GA/jdk17/0d483333a00540d886896bac774ff48b/35/GPL/openjdk-17_macos-x64_bin.tar.gz -OutFile $(agent.tempDirectory)/openjdk-17_macos-x64_bin.tar.gz
# condition: and(succeeded(), contains(variables['Agent.OS'], 'darwin'))

# - pwsh: Invoke-WebRequest -Uri https://download.java.net/java/GA/jdk17/0d483333a00540d886896bac774ff48b/35/GPL/openjdk-17_windows-x64_bin.zip -OutFile $(agent.tempDirectory)/openjdk-17_windows-x64_bin.zip
# condition: and(succeeded(), contains(variables['Agent.OS'], 'windows'))

# - task: JavaToolInstaller@0
# inputs:
# versionSpec: "17"
# jdkArchitectureOption: x64
# jdkSourceOption: LocalDirectory
# jdkFile: "$(agent.tempDirectory)/openjdk-17_linux-x64_bin.tar.gz"
# jdkDestinationDirectory: "$(agent.toolsDirectory)/jdk17"
# cleanDestinationDirectory: false
# condition: and(succeeded(), contains(variables['Agent.OS'], 'linux'))

# - task: JavaToolInstaller@0
# inputs:
# versionSpec: "17"
# jdkArchitectureOption: x64
# jdkSourceOption: LocalDirectory
# jdkFile: "$(agent.tempDirectory)/openjdk-17_macos-x64_bin.tar.gz"
# jdkDestinationDirectory: "$(agent.toolsDirectory)/jdk17"
# cleanDestinationDirectory: false
# condition: and(succeeded(), contains(variables['Agent.OS'], 'darwin'))

# - task: JavaToolInstaller@0
# inputs:
# versionSpec: "17"
# jdkArchitectureOption: x64
# jdkSourceOption: LocalDirectory
# jdkFile: "$(agent.tempDirectory)/openjdk-17_windows-x64_bin.zip"
# jdkDestinationDirectory: "$(agent.toolsDirectory)/jdk17"
# cleanDestinationDirectory: false
# condition: and(succeeded(), contains(variables['Agent.OS'], 'windows'))
5 changes: 3 additions & 2 deletions eng/pipelines/templates/variables/globals.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
variables:
DocWardenVersion: '0.7.1'
# This is the default Java build version. It's the version used to build the shipping libraries, Spotbugs etc.
JavaBuildVersion: '1.11'
JavaBuildVersion: '1.17'
# This is the default Java test version. It's the version used when running tests.
JavaTestVersion: '1.11'
JavaTestVersion: '1.17'

# Maven build/test options
MAVEN_CACHE_FOLDER: $(Pipeline.Workspace)/.m2/repository
Expand All @@ -22,3 +22,4 @@ variables:
skipComponentGovernanceDetection: true
IsDebug: $[coalesce(variables['System.Debug'], 'false')]
Package.EnableSBOMSigning: true