[jbosstools-commits] JBoss Tools SVN: r43932 - trunk/build/publish.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Fri Sep 21 11:46:15 EDT 2012


Author: nickboldt
Date: 2012-09-21 11:46:15 -0400 (Fri, 21 Sep 2012)
New Revision: 43932

Added:
   trunk/build/publish/promote.sh
Log:
new promote script as used by SwitchYard and Modeshape

Added: trunk/build/publish/promote.sh
===================================================================
--- trunk/build/publish/promote.sh	                        (rev 0)
+++ trunk/build/publish/promote.sh	2012-09-21 15:46:15 UTC (rev 43932)
@@ -0,0 +1,42 @@
+#!/bin/bash
+# Hudson script used to promote a nightly snapshot build to development milestone or stable release.
+
+# these should not need to change
+DESTINATION=tools at filemgmt.jboss.org:/downloads_htdocs/tools/
+PARENT_FOLDER=soa-tooling/
+OPERATION=COPY
+
+# develoment or stable
+BUILD_TYPE=$1
+
+# indigo, juno, kepler, ...
+TARGET_PLATFORM=$2
+
+# 0.5.0.Beta3, 0.6.0.Final, ...
+TARGET_FOLDER=$3
+
+# switchyard, modeshape, droolsjbpm, ...
+PROJECT_NAME=$4
+
+# should be ${JOB_NAME}/all/repo, but may also be something else, eg., for SwitchYard-Tools, use ${JOB_NAME}/eclipse
+if [[ ${JOB_NAME} ]]; then PUBLISH_PATH=${JOB_NAME}/all/repo; fi
+if [[ $5 ]]; then PUBLISH_PATH=$5; fi
+
+if [[ $4 ]]; then
+  echo "mkdir ${BUILD_TYPE}" | sftp tools at filemgmt.jboss.org:/downloads_htdocs/tools/updates/
+  echo "mkdir ${BUILD_TYPE}/${TARGET_PLATFORM}" | sftp tools at filemgmt.jboss.org:/downloads_htdocs/tools/updates/
+  echo "mkdir ${BUILD_TYPE}/${TARGET_PLATFORM}/${PARENT_FOLDER}" | sftp tools at filemgmt.jboss.org:/downloads_htdocs/tools/updates/
+  echo "mkdir ${BUILD_TYPE}/${TARGET_PLATFORM}/${PARENT_FOLDER}${PROJECT_NAME}" | sftp tools at filemgmt.jboss.org:/downloads_htdocs/tools/updates/
+  if [[ ${OPERATION} ==  "MOVE" ]]; then
+    echo -e "rename builds/staging/${PUBLISH_PATH} updates/${BUILD_TYPE}/${TARGET_PLATFORM}/${PARENT_FOLDER}${PROJECT_NAME}/${TARGET_FOLDER}" | sftp ${DESTINATION}
+  else
+    rsync -arzq --protocol=28 ${DESTINATION}/builds/staging/${PUBLISH_PATH}/* ${WORKSPACE}/${JOB_NAME}/
+    rsync -arzq --protocol=28 --delete ${WORKSPACE}/${JOB_NAME}/* ${DESTINATION}/updates/${BUILD_TYPE}/${TARGET_PLATFORM}/${PARENT_FOLDER}${PROJECT_NAME}/${TARGET_FOLDER}/
+  fi
+  echo "Site promoted by ${OPERATION} to: http://download.jboss.org/jbosstools/updates/${BUILD_TYPE}/${TARGET_PLATFORM}/${PARENT_FOLDER}${PROJECT_NAME}/${TARGET_FOLDER}/"
+else
+  echo "Usage  : $0 \${BUILD_TYPE} \${TARGET_PLATFORM} \${TARGET_FOLDER} \${PROJECT_NAME} [PUBLISH_PATH]"
+  echo "Example: $0 development juno 3.3.0.Beta3 modeshape"
+  echo "Example: $0 stable indigo 0.5.0.Final switchyard ${JOB_NAME}/eclipse"
+  exit 1
+fi
\ No newline at end of file


Property changes on: trunk/build/publish/promote.sh
___________________________________________________________________
Added: svn:executable
   + *



More information about the jbosstools-commits mailing list