Преглед изворни кода

Promotion with mirror task to get

benjamin.schwertfeger@gmail.com пре 13 година
родитељ
комит
e2fdd0ba9f

+ 22 - 52
releng/org.yakindu.base.releng/promote-pom.xml

@@ -14,72 +14,42 @@
 
 	<properties>
 		<!-- scp settings for publishing udpdate site -->
-		<yakindu.keyFile>${env.HUDSON_HOME}/jobs/${env.JOB_NAME}/yakindu.openSSH</yakindu.keyFile>
-		<yakindu.passphrase>Yakindu-Update Site Passphrase 2009</yakindu.passphrase>
-		<update.site.scp>yus@ftp.itemis.de:/data/yakindu/${env.promotionTarget}</update.site.scp>
+		<promotionTarget>indigo/integration</promotionTarget>
+		<promotionSource>http://builds.itemis.de/urlToCIJob/lastSuccessfulBuild</promotionSource>
+		<updateSiteUrl>http://updates.yakindu.com/${promotionTarget}</updateSiteUrl>
 		<local.update.site>${project.build.directory}/local-update-site</local.update.site>
 	</properties>
 
 	<build>
 		<plugins>
 			<plugin>
-				<artifactId>maven-antrun-plugin</artifactId>
-				<version>1.7</version>
+				<groupId>org.eclipse.tycho.extras</groupId>
+				<artifactId>tycho-p2-extras-plugin</artifactId>
+				<version>${tycho-version}</version>
+				<inherited>false</inherited>
 				<executions>
 					<execution>
-						<id>download Repository</id>
+						<id>copyRemoteSite</id>
 						<phase>prepare-package</phase>
-						<configuration>
-							<target name="fetch_old_repo">
-								<delete dir="${local.update.site}" />
-								<mkdir dir="${local.update.site}" />
-								<scp todir="${local.update.site}" keyfile="${yakindu.keyFile}"
-									failonerror="${scp.fail_on_error}" passphrase="${yakindu.passphrase}"
-									trust="true" file="${update.site.scp}" sftp="true" />
-							</target>
-						</configuration>
 						<goals>
-							<goal>run</goal>
+							<goal>mirror</goal>
 						</goals>
-					</execution>
-					<execution>
-						<id>upload Repository</id>
-						<phase>install</phase>
 						<configuration>
-							<target name="push_merged_repo">
-								<scp keyfile="${yakindu.keyFile}" failonerror="${scp.fail_on_error}"
-									passphrase="${yakindu.passphrase}" trust="true" toDir="${update.site.scp}"
-									sftp="true">
-									<fileset dir="${local.update.site}" />
-								</scp>
-							</target>
+							<source>
+								<!-- source repositori(es) to mirror from -->
+								<repository>
+									<url>${updateSiteUrl}</url>
+									<layout>p2</layout>
+									<!-- sypported layouts are "p2-metadata", "p2-artifacts", and "p2" 
+										(for joint repositories) -->
+								</repository>
+							</source>
+
+							<destination>${local.update.site}</destination>
+							<compress>true</compress>
+							<append>false</append>
 						</configuration>
-						<goals>
-							<goal>run</goal>
-						</goals>
 					</execution>
-				</executions>
-				<dependencies>
-					<dependency>
-						<groupId>org.apache.ant</groupId>
-						<artifactId>ant-jsch</artifactId>
-						<version>1.7.0</version>
-					</dependency>
-					<dependency>
-						<groupId>jsch</groupId>
-						<artifactId>jsch</artifactId>
-						<version>0.1.25</version>
-					</dependency>
-					
-				</dependencies>
-			</plugin>
-
-			<plugin>
-				<groupId>org.eclipse.tycho.extras</groupId>
-				<artifactId>tycho-p2-extras-plugin</artifactId>
-				<version>${tycho-version}</version>
-				<inherited>false</inherited>
-				<executions>
 					<execution>
 						<id>appendYakinduBase</id>
 						<phase>package</phase>

+ 43 - 0
releng/org.yakindu.base.releng/promote.hudson.README

@@ -0,0 +1,43 @@
+To execute this build as a Hudson build job, you have to configure the following:
+
+Parameterized-build:
++ Run Parameter
+	Name: promotionSource
+	Project: YAKINDU_Base_CI
+	Description: Select the build to be promoted.
+
++ Selection
+	Name: promotionTarget
+	Selections:
+		indigo/integration
+		indigo/milestones
+		indigo/releases
+	Description:
+		Select the update site to promote to.
+
+Source-Code-Management:
++ SVN
+	URL: http://svn.codespot.com/a/eclipselabs.org/yakindu/BASE/trunk/releng/org.yakindu.base.releng
+	Location: releng
+ 
+Build:
+
++ Invoke Maven 3
+	Goals
+		clean install
+	POM File
+		promote-pom.xml
+	Properties
+		promotionSource=${env.promotionSource}
+		promotionTarget=${env.promotionTarget}
+	Profiles
+	JVM Options
+		
+	
+Post-Build-Actions:
++ Send build artifacts over SSH
+	Name: Yakindu Update Site
+	Source files: releng/target/local-update-site/**
+	Remove prefix: releng/target/local-update-site
+	Remote directory: /yakindu/${promotionTarget}
+