diff options
author | Mark Macdonald <mamacdon@gmail.com> | 2014-05-21 14:18:50 -0400 |
---|---|---|
committer | Mark Macdonald <mamacdon@gmail.com> | 2014-05-21 14:40:01 -0400 |
commit | 4f400c8d9d3b82df254cb17f7f657c2d88f045a2 (patch) | |
tree | a8d6f2bfe073b2d554623c6278f558eef422105e | |
parent | 87bb2f8fb32b579e2fac3437271c0ffa432df943 (diff) | |
download | org.eclipse.orion.client-origin/sauce.zip org.eclipse.orion.client-origin/sauce.tar.gz org.eclipse.orion.client-origin/sauce.tar.bz2 |
[Bug 434268] Add child pom for running unit testsorigin/sauce
-rw-r--r-- | pom.xml | 3 | ||||
-rw-r--r-- | releng/org.eclipse.orion.client.releng/pom.xml | 136 | ||||
-rw-r--r-- | releng/org.eclipse.orion.client.releng/test/assembly.xml | 52 |
3 files changed, 190 insertions, 1 deletions
@@ -116,6 +116,7 @@ <module>features/org.eclipse.orion.client-feature</module> + <module>releng/org.eclipse.orion.client.releng</module> <module>releng/org.eclipse.orion.client.repository</module> </modules> @@ -251,4 +252,4 @@ </plugins> </pluginManagement> </build> -</project> +</project>
\ No newline at end of file diff --git a/releng/org.eclipse.orion.client.releng/pom.xml b/releng/org.eclipse.orion.client.releng/pom.xml new file mode 100644 index 0000000..3d1864f --- /dev/null +++ b/releng/org.eclipse.orion.client.releng/pom.xml @@ -0,0 +1,136 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2014 IBM Corporation and others. + + All rights reserved. This program and the accompanying materials are made + available under the terms of the Eclipse Public License v1.0 + (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution + License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.eclipse.orion</groupId> + <artifactId>org.eclipse.orion.client.releng</artifactId> + <version>1.0.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <parent> + <groupId>org.eclipse.orion</groupId> + <artifactId>org.eclipse.orion.client.parent</artifactId> + <version>1.0.0-SNAPSHOT</version> + <relativePath>../..</relativePath> + </parent> + + <dependencies> + </dependencies> + + <build> + <plugins> + <plugin> + <!-- NOTE: We don't need a groupId specification because the group is org.apache.maven.plugins, which is assumed by default. --> + <artifactId>maven-assembly-plugin</artifactId> + <version>2.4</version> + <executions> + <!-- Builds the CF app zip. --> + <execution> + <id>create-test-app</id> + <phase>process-test-resources</phase> + <configuration> + <appendAssemblyId>false</appendAssemblyId> + <attach>false</attach> + <descriptors> + <descriptor>test/assembly.xml</descriptor> + </descriptors> + <finalName>orion-test-app</finalName> + </configuration> + <goals> + <goal>single</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <!-- Deploys the CF test app. --> + <!-- This plugin requires system properties to be set externally: -Dcf.username -Dcf.password --> + <!-- https://github.com/cloudfoundry/cf-java-client/tree/master/cloudfoundry-maven-plugin#readme --> + <groupId>org.cloudfoundry</groupId> + <artifactId>cf-maven-plugin</artifactId> + <version>1.0.2</version> + <executions> + <execution> + <id>deploy-test-app</id> + <phase>process-test-resources</phase> + <configuration> + <appname>orion-test</appname> + <url>orion-test.ng.bluemix.net</url> + <memory>1024</memory> + <instances>1</instances> + <path>${project.build.directory}/orion-test-app.zip</path> + <server>orion-test</server> + <org>orion</org> + <space>dev</space> + <target>https://api.ng.bluemix.net</target> + <command>node runtests.js</command> + <env> + <BUILD_ID>${env.BUILD_ID}</BUILD_ID> + <BUILD_NAME>${env.BUILD_NAME}</BUILD_NAME> + <BUILD_TAG>${env.BUILD_TAG}</BUILD_TAG> + <SAUCE_USERNAME>${SAUCE_USERNAME}</SAUCE_USERNAME> + <SAUCE_ACCESS_KEY>${SAUCE_ACCESS_KEY}</SAUCE_ACCESS_KEY> + </env> + </configuration> + <goals> + <goal>push-only</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-antrun-plugin</artifactId> + <inherited>false</inherited> + <executions> + <execution> + <!-- Clean up previous test and deploy artifacts --> + <id>clean-artifacts</id> + <phase>clean</phase> + <configuration> + <target> + <delete failonerror="false" verbose="true"> + <fileset dir="${project.build.directory}" includes="orion-test-app.zip" /> + <fileset dir="${project.build.directory}/test-reports" includes="*.xml, *.zip" /> + </delete> + </target> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + <execution> + <!-- Fetches the test results. --> + <id>fetch-results</id> + <phase>process-test-resources</phase> + <configuration> + <target> + <property name="url" value="http://orion-test.ng.bluemix.net/testresults" /> + <property name="test.directory" value="${project.build.directory}/test-reports" /> + <property name="results.file" value="${test.directory}/results.zip" /> + + <mkdir dir="${test.directory}" /> + <echo message="Downloading test results to ${test.directory}..." /> + <get src="${url}" dest="${results.file}" httpusecaches="false" maxtime="300" /> + <echo message="Unzipping test results..." /> + <unzip src="${results.file}" dest="${test.directory}" stripAbsolutePathSpec="true" /> + </target> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project>
\ No newline at end of file diff --git a/releng/org.eclipse.orion.client.releng/test/assembly.xml b/releng/org.eclipse.orion.client.releng/test/assembly.xml new file mode 100644 index 0000000..71f664f --- /dev/null +++ b/releng/org.eclipse.orion.client.releng/test/assembly.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2014 IBM Corporation and others. + + All rights reserved. This program and the accompanying materials are made + available under the terms of the Eclipse Public License v1.0 + (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution + License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). +--> +<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> + <id>orion-test-assembly</id> + <formats> + <format>zip</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <fileSets> + <fileSet> + <!-- Zip the entire source repo, which is the parent --> + <directory>${project.parent.basedir}</directory> + <outputDirectory>/</outputDirectory> + <useDefaultExcludes>true</useDefaultExcludes> + + <!-- The excludes here should be kept equivalent to the top-level .cfignore file --> + <excludes> + <exclude>.git/**</exclude> + <!-- Maven build artifacts: target/ --> + <exclude>**/${project.build.directory}/**</exclude> + <!-- Eclipse/OSGi --> + <exclude>**/.settings/**</exclude> + <exclude>**/META-INF/**</exclude> + <!-- Orion node artifacts --> + <exclude>**/.temp/**</exclude> + <exclude>**/.workspace/**</exclude> + <exclude>**/.test_workspace/**</exclude> + <!-- Source dirs, image resources not needed for CF app --> + <exclude>doc/**</exclude> + <exclude>features/</exclude> + <exclude>**/*.gif</exclude> + <exclude>**/*.png</exclude> + <!-- Client build output --> + <exclude>built-js/**</exclude> + <exclude>optimized/**</exclude> + <exclude>staging/**</exclude> + <!-- Node/npm --> + <exclude>**/*.log</exclude> + <exclude>**/node_modules/**</exclude> + </excludes> + </fileSet> + </fileSets> +</assembly>
\ No newline at end of file |