Skip to content

Commit

Permalink
Nightly build fix - org.eclipse.persistence.nightly refactor (#1703)
Browse files Browse the repository at this point in the history
POM org.eclipse.persistence.nightly from bundles/nightly/pom.xml was removed from org.eclipse.persistence.parent/org.eclipse.persistence.bundles and it's used/called as a standalone module/project to prepare EclipseLink bundles and test results for publishing into nightly builds storage/page during Jenkins build only.
It prepare/aggregate JPA test report from org.eclipse.persistence.jpa.test, org.eclipse.persistence.jpa.testapps and org.eclipse.persistence.jpa.jse.test modules.

Signed-off-by: Radek Felcman <radek.felcman@oracle.com>
  • Loading branch information
rfelcman committed Sep 13, 2022
1 parent 297f3fa commit e081108
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 53 deletions.
111 changes: 64 additions & 47 deletions bundles/nightly/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2019, 2021 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -22,6 +22,7 @@
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.nightly</artifactId>
<packaging>pom</packaging>
<description>This project file is used as a standalone module/project to prepare EclipseLink bundles and test results for publishing into nightly builds storage/page.</description>

<parent>
<groupId>org.eclipse.persistence</groupId>
Expand All @@ -36,51 +37,6 @@
<nightlyTestReportsDir>${project.build.directory}${nightlyDir}/Eclipse</nightlyTestReportsDir>
</properties>

<dependencies>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.core.test</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.dbws</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.dbws.builder</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.moxy</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa.test</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa.wdf.test</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.sdo</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<type>zip</type>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.bundles.other</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<!--Initialize build.date and build.time buildNumber properties. -->
Expand Down Expand Up @@ -111,6 +67,67 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<copy todir="${project.build.directory}/jpa-test-reports">
<fileset dir="${project.build.directory}/../../../jpa/eclipselink.jpa.test">
<include name="**/target/surefire-reports/TEST*.xml"/>
<include name="**/target/failsafe-reports/TEST*.xml"/>
</fileset>
<flattenmapper/>
</copy>
<copy todir="${project.build.directory}/jpa-test-reports">
<fileset dir="${project.build.directory}/../../../jpa/eclipselink.jpa.testapps">
<include name="**/target/surefire-reports/TEST*.xml"/>
<include name="**/target/failsafe-reports/TEST*.xml"/>
</fileset>
<flattenmapper/>
</copy>
<copy todir="${project.build.directory}/jpa-test-reports">
<fileset dir="${project.build.directory}/../../../jpa/eclipselink.jpa.test.jse">
<include name="**/target/surefire-reports/TEST*.xml"/>
<include name="**/target/failsafe-reports/TEST*.xml"/>
</fileset>
<flattenmapper/>
</copy>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<configuration>
<linkXRef>false</linkXRef>
</configuration>
<executions>
<execution>
<id>generate-test-summary-html-report</id>
<phase>package</phase>
<goals>
<goal>failsafe-report-only</goal>
</goals>
<configuration>
<reportsDirectories>
<reportsDirectory>${project.build.directory}/jpa-test-reports</reportsDirectory>
</reportsDirectories>
<outputDirectory>${project.build.directory}/jpa-test-reports/${project.build.testReports.subdirectory}</outputDirectory>
<outputName>${project.build.testReports.summaryFile}</outputName>
<title>EclipseLink JPA Test - Test Summary (more details on ${env.BUILD_URL} )</title>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
Expand Down Expand Up @@ -157,7 +174,7 @@
</fileSet>
<fileSet>
<sourceFile>
../../jpa/eclipselink.jpa.test/target/${project.build.testReports.subdirectory}/${project.build.testReports.summaryFile}.html
${project.build.directory}/jpa-test-reports/${project.build.testReports.subdirectory}/${project.build.testReports.summaryFile}.html
</sourceFile>
<destinationFile>
${project.build.directory}${nightlyDir}/Eclipse/eclipselink-jpa-lrg${nightlyVersion}.html
Expand Down
6 changes: 0 additions & 6 deletions bundles/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@
<module>tests</module>
</modules>
</profile>
<profile>
<id>test-lrg</id>
<modules>
<module>nightly</module>
</modules>
</profile>
<profile>
<id>no-deploy</id>
<activation>
Expand Down
1 change: 1 addition & 0 deletions etc/jenkins/publish_nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ if [ ${CONTINUOUS_BUILD} = "true" ]; then
echo '-[ EclipseLink Continuous Build -> No publishing any artifacts]-------------------------------'
else
echo '-[ EclipseLink Publish to Nightly ]-----------------------------------------------------------'
mvn -V -B clean package -f bundles/nightly/pom.xml
scp -r $WORKSPACE/bundles/nightly/target/nightlybuild/* genie.eclipselink@projects-storage.eclipse.org:$BUILD_RESULTS_TARGET_DIR
fi

0 comments on commit e081108

Please sign in to comment.