Skip to content

Commit

Permalink
Update Nightly Test Command (#16892)
Browse files Browse the repository at this point in the history
* Update nightly test command to match PR validation

* Skip additional steps in Java 10 and below build of azure-core-http-jdk-httpclient to prevent build failures in Java 8

* Add surefire skipping in Java 8
  • Loading branch information
alzimmermsft authored Oct 27, 2020
1 parent 0e2443a commit 017a6c7
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 61 deletions.
16 changes: 8 additions & 8 deletions eng/pipelines/templates/jobs/archetype-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ parameters:
TestCanary: false
TimeoutInMinutes: 60
TestStepMavenInputs:
options: '-Dmaven.wagon.http.pool=false -DtrimStackTrace=false $(DefaultOptions) -pl $(ProjectList)'
options: '$(DefaultOptions) -Dmaven.javadoc.skip=true -Dspotbugs.skip=true -Dcheckstyle.skip=true -Drevapi.skip=true -DtrimStackTrace=false -pl $(ProjectList)'
mavenOptions: '$(MemoryOptions) $(LoggingOptions)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '$(JavaTestVersion)'
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'test'
goals: 'verify'
TestResultsFiles: ''
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ResourceGroupLocationCanary: "centraluseuap"
Expand All @@ -69,15 +69,15 @@ jobs:
value: ${{ parameters.Location }}

strategy:
matrix:
matrix:
${{ insert }}: ${{ parameters.Matrix }}
${{ if eq(parameters.TestCanary, 'true') }}:
Linux - Java 11 (AzureCloudCanary):
${{ if eq(parameters.TestCanary, 'true') }}:
Linux - Java 11 (AzureCloudCanary):
OSVmImage: 'ubuntu-18.04'
JavaTestVersion: '1.11'
DisplayName: 'Linux - Java 11'
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview)
Location: ${{ parameters.ResourceGroupLocationCanary }}
DisplayName: 'Linux - Java 11'
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview)
Location: ${{ parameters.ResourceGroupLocationCanary }}
AZURE_TEST_HTTP_CLIENTS: netty
maxParallel: ${{ parameters.MaxParallel }}

Expand Down
116 changes: 63 additions & 53 deletions sdk/core/azure-core-http-jdk-httpclient/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,24 @@
</dependency>
</dependencies>

<!-- Start: Override client.pom.xml profiles -->
<profiles>
<!-- Override the parent client.pom.xml's java8 profile to skip the compilation completely -->
<!-- Library cannot build for Java 10 and below -->
<profile>
<id>java8</id>
<activation>
<jdk>[1.8,11)</jdk>
<jdk>[,11)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version> <!-- {x-version-update;org.jacoco:jacoco-maven-plugin;external_dependency} -->
<configuration>
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand All @@ -145,74 +153,78 @@
<skip>true</skip>
</configuration>
</plugin>
<!-- Configure the javadoc plugin -->

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-surefire-plugin;external_dependency} -->
<configuration>
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version> <!-- {x-version-update;org.apache.maven.plugins:maven-javadoc-plugin;external_dependency} -->
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<skipMain>true</skipMain>
<skip>true</skip>
</configuration>
</execution>
</executions>
<configuration>
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.2</version> <!-- {x-version-update;org.apache.maven.plugins:maven-jar-plugin;external_dependency} -->
<configuration>
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-checkstyle-plugin;external_dependency} -->
<configuration>
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>3.1.12.2</version> <!-- {x-version-update;com.github.spotbugs:spotbugs-maven-plugin;external_dependency} -->
<configuration>
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<groupId>org.revapi</groupId>
<artifactId>revapi-maven-plugin</artifactId>
<version>0.11.2</version> <!-- {x-version-update;org.revapi:revapi-maven-plugin;external_dependency} -->
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<!-- Override the parent client.pom.xml's java11+ profile to override target of base-compile execution from 1.8 to 11-->
<profile>
<id>java-lts</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version> <!-- {x-version-update;org.apache.maven.plugins:maven-compiler-plugin;external_dependency} -->
<configuration>
<testRelease>11</testRelease>
<compilerArgs>
<!-- Turn off annotation processing -->
<arg>-proc:none</arg>

<!-- https://docs.oracle.com/javase/7/docs/technotes/tools/windows/javac.html#xlintwarnings -->
<arg>-Xlint:cast</arg>
<arg>-Xlint:classfile</arg>
<!-- <arg>-Xlint:deprecation</arg> --> <!-- FIXME: We should enable this ASAP -->
<arg>-Xlint:dep-ann</arg>
<arg>-Xlint:divzero</arg>
<arg>-Xlint:empty</arg>
<arg>-Xlint:fallthrough</arg>
<arg>-Xlint:finally</arg>
<arg>-Xlint:options</arg>
<arg>-Xlint:overrides</arg>
<arg>-Xlint:path</arg>
<!-- <arg>-Xlint:processing</arg> -->
<arg>-Xlint:rawtypes</arg>
<!-- <arg>-Xlint:serial</arg> -->
<arg>-Xlint:static</arg>
<arg>-Xlint:try</arg>
<arg>-Xlint:unchecked</arg>
<arg>-Xlint:varargs</arg>
<arg>-Xlint:-module</arg> <!-- FIXME: this is required for now as it introduces a build failure -->
<arg>-Xlint:-requires-transitive-automatic
</arg> <!-- FIXME: this is required for now as it introduces a build failure -->
</compilerArgs>
</configuration>
<executions>
<execution>
Expand All @@ -221,9 +233,8 @@
<release>11</release>
</configuration>
</execution>
<!-- Here the 'base-compile' execution section of java-lts profile defined
in parent pom.client.xml is overridden. In parent pom, this execution entry
enforces java8 release compatibility. The new http APIs are not available
<!-- Here the 'base-compile' execution section of java-lts profile defined in parent pom.client.xml is overridden.
In parent pom, this execution entry enforces java8 release compatibility. The new http APIs are not available
in Java8, hence here in this pom we override that release compact to 11.
-->
<execution>
Expand All @@ -241,6 +252,5 @@
</build>
</profile>
</profiles>
<!-- End: Override client.pom.xml profiles -->

</project>

0 comments on commit 017a6c7

Please sign in to comment.