rcp: Add a "deploy-rcp" profile to deploy nightly RCP builds
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Fri, 28 Nov 2014 22:05:16 +0000 (17:05 -0500)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Fri, 5 Dec 2014 18:59:12 +0000 (13:59 -0500)
This can be added to the Hudson job to put nightly RCP builds
on download.eclipse.org.

It can be used locally (by overriding 'rcpDestination') but is not
of much use since it doesn't do much more than just copying files.
So I don't think it's worth documenting in the README.

Change-Id: Ic5db3f2fad8f9baec0e96b5d6c041ac09bd8ad9c
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/37309
Tested-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
org.eclipse.tracecompass.rcp.product/pom.xml

index eb5c1fdad3d8972118a4219c2f85605ecfff98f4..c4f6da463aef2581c2f931b262c8147f758aac41 100644 (file)
             </plugin>
         </plugins>
     </build>
-    <groupId>org.eclipse.tracecompass</groupId>
+
+  <profiles>
+    <profile>
+      <id>deploy-rcp</id>
+      <properties>
+        <rcpDestination>/home/data/httpd/download.eclipse.org/tracecompass/rcp/nightly/</rcpDestination>
+        <productDir>target/products</productDir> <!-- Should not be overriden! -->
+      </properties>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>deploy</id>
+                <phase>install</phase>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+                <configuration>
+                  <target>
+                    <!-- Delete the current contents of the destination -->
+                    <symlink action="delete" link="${rcpDestination}/trace-compass-latest-linux.gtk.x86_64.tar.gz" />
+                    <symlink action="delete" link="${rcpDestination}/trace-compass-latest-linux.gtk.x86.tar.gz" />
+                    <symlink action="delete" link="${rcpDestination}/trace-compass-latest-macosx.cocoa.x86_64.tar.gz" />
+                    <symlink action="delete" link="${rcpDestination}/trace-compass-latest-win32.win32.x86_64.zip" />
+                    <symlink action="delete" link="${rcpDestination}/trace-compass-latest-win32.win32.x86.zip" />
+                    <delete includeemptydirs="false">
+                      <fileset dir="${rcpDestination}">
+                        <include name="**" />
+                      </fileset>
+                    </delete>
+
+                    <!-- Copy the archives to the destination -->
+                    <copy includeemptydirs="false" todir="${rcpDestination}">
+                      <fileset dir="${productDir}">
+                        <include name="trace-compass-*" />
+                      </fileset>
+                    </copy>
+
+                    <!-- Re-create the symlinks pointing to the latest archives -->
+                    <symlink link="${rcpDestination}/trace-compass-latest-linux.gtk.x86_64.tar.gz"    resource="trace-compass-${project.version}-${build.timestamp}-linux.gtk.x86_64.tar.gz" />
+                    <symlink link="${rcpDestination}/trace-compass-latest-linux.gtk.x86.tar.gz"       resource="trace-compass-${project.version}-${build.timestamp}-linux.gtk.x86.tar.gz" />
+                    <symlink link="${rcpDestination}/trace-compass-latest-macosx.cocoa.x86_64.tar.gz" resource="trace-compass-${project.version}-${build.timestamp}-macosx.cocoa.x86_64.tar.gz" />
+                    <symlink link="${rcpDestination}/trace-compass-latest-win32.win32.x86_64.zip"     resource="trace-compass-${project.version}-${build.timestamp}-win32.win32.x86_64.zip" />
+                    <symlink link="${rcpDestination}/trace-compass-latest-win32.win32.x86.zip"        resource="trace-compass-${project.version}-${build.timestamp}-win32.win32.x86.zip" />
+                  </target>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+
+  <groupId>org.eclipse.tracecompass</groupId>
 </project>
This page took 0.027455 seconds and 5 git commands to generate.