Author: nickboldt
Date: 2011-03-03 16:32:24 -0500 (Thu, 03 Mar 2011)
New Revision: 29479
Modified:
branches/jbosstools-3.2.x/build/target-platform/publish.sh
Log:
backport updated script from trunk to 3.2.x branch; use consistent variable names
Modified: branches/jbosstools-3.2.x/build/target-platform/publish.sh
===================================================================
--- branches/jbosstools-3.2.x/build/target-platform/publish.sh 2011-03-03 21:32:12 UTC
(rev 29478)
+++ branches/jbosstools-3.2.x/build/target-platform/publish.sh 2011-03-03 21:32:24 UTC
(rev 29479)
@@ -1,9 +1,9 @@
#!/bin/bash
-# Hudson creates a repo in ${repoPath}; copy it into other places for access by
downstream jobs and users
+# Hudson creates a repo in ${repoDir}; copy it into other places for access by downstream
jobs and users
# defaults for JBoss Tools
-targetFile=e361-wtp322.target
-repoPath=/home/hudson/static_build_env/jbds/tools/sources/REPO
+targetZipFile=e361-wtp322.target
+repoDir=/home/hudson/static_build_env/jbds/tools/sources/REPO
destinationPath=/home/hudson/static_build_env/jbds/target-platform
DESTINATION=tools@filemgmt.jboss.org:/downloads_htdocs/tools/updates/target-platform
include="*"
@@ -11,16 +11,45 @@
while [ "$#" -gt 0 ]; do
case $1 in
- '-targetFile') targetFile="$2"; shift 2;;
- '-repoPath') repoPath="$2"; shift 2;;
+ '-targetFile') targetZipFile="$2"; shift 2;; # old flag name
(collision with build.xml's ${targetFile}, which points to a .target file)
+ '-targetZipFile') targetZipFile="$2"; shift 2;;
+ '-repoPath') repoDir="$2"; shift 2;; # old flag name (refactored to
match build.xml's ${repoDir})
+ '-repoDir') repoDir="$2"; shift 2;;
'-destinationPath') destinationPath="$2"; shift 2;;
'-DESTINATION') DESTINATION="$2"; shift 2;;
'-include') include="$2"; shift 2;;
'-exclude') exclude="$2"; shift 2;;
+ '-jbt_trunk')
+ # defaults for JBT (trunk)
+ targetZipFile=e361-wtp322.target
+ repoDir=/home/hudson/static_build_env/jbds/tools/sources/REPO_trunk
+ destinationPath=/home/hudson/static_build_env/jbds/target-platform_trunk
+ DESTINATION=tools@filemgmt.jboss.org:/downloads_htdocs/tools/updates/target-platform_trunk
+ include="*"
+ exclude="--exclude '.blobstore'" # exclude the .blobstore
+ shift 1;;
+ '-jbt')
+ # defaults for JBT (stable branch)
+ targetZipFile=e361-wtp322.target
+ repoDir=/home/hudson/static_build_env/jbds/tools/sources/REPO
+ destinationPath=/home/hudson/static_build_env/jbds/target-platform
+ DESTINATION=tools@filemgmt.jboss.org:/downloads_htdocs/tools/updates/target-platform
+ include="*"
+ exclude="--exclude '.blobstore'" # exclude the .blobstore
+ shift 1;;
+ '-jbds_trunk')
+ # defaults for JBDS (trunk)
+ targetZipFile=jbds400-e361-wtp322.target
+ repoDir=/home/hudson/static_build_env/jbds/tools/sources/JBDS-REPO_trunk
+ destinationPath=/home/hudson/static_build_env/jbds/jbds-target-platform_trunk
+ DESTINATION=/qa/services/http/binaries/RHDS/updates/jbds-target-platform_trunk
+ include=".blobstore *" # include the .blobstore
+ exclude=""
+ shift 1;;
'-jbds')
- # defaults for JBDS
- targetFile=jbds400-e361-wtp322.target
- repoPath=/home/hudson/static_build_env/jbds/tools/sources/JBDS-REPO
+ # defaults for JBDS (stable branch)
+ targetZipFile=jbds400-e361-wtp322.target
+ repoDir=/home/hudson/static_build_env/jbds/tools/sources/JBDS-REPO
destinationPath=/home/hudson/static_build_env/jbds/jbds-target-platform
DESTINATION=/qa/services/http/binaries/RHDS/updates/jbds-target-platform
include=".blobstore *" # include the .blobstore
@@ -29,18 +58,18 @@
esac
done
-if [[ -d ${repoPath} ]]; then
- cd ${repoPath}
+if [[ -d ${repoDir} ]]; then
+ cd ${repoDir}
- if [[ ! -d ${destinationPath}/${targetFile} ]]; then
- mkdir -p ${destinationPath}/${targetFile}
+ if [[ ! -d ${destinationPath}/${targetZipFile} ]]; then
+ mkdir -p ${destinationPath}/${targetZipFile}
fi
- du -sh ${repoPath} ${destinationPath}/${targetFile}
+ du -sh ${repoDir} ${destinationPath}/${targetZipFile}
# copy/update into central place for reuse by local downstream build jobs
- date; rsync -arzqc --delete-after --delete-excluded --rsh=ssh ${exclude} ${include}
${destinationPath}/${targetFile}/
+ date; rsync -arzqc --delete-after --delete-excluded --rsh=ssh ${exclude} ${include}
${destinationPath}/${targetZipFile}/
- du -sh ${repoPath} ${destinationPath}/${targetFile}
+ du -sh ${repoDir} ${destinationPath}/${targetZipFile}
# upload to
http://download.jboss.org/jbossotools/updates/target-platform/latest/ for
public use
if [[ ${DESTINATION/@/} == ${DESTINATION} ]]; then # local path, no user@server
@@ -49,9 +78,9 @@
# if the following line fails, make sure that ${DESTINATION} is already created on
target server
date; rsync -arzqc --delete-after --delete-excluded --rsh=ssh ${exclude} ${include}
${DESTINATION}/latest/
- targetZip=/tmp/${targetFile}.zip
+ targetZip=/tmp/${targetZipFile}.zip
- # create zip, then upload to
http://download.jboss.org/jbossotools/updates/target-platform/${targetFil... for public
use
+ # create zip, then upload to
http://download.jboss.org/jbossotools/updates/target-platform/${targetZip... for
public use
zip -q -r9 ${targetZip} ${include}
du -sh ${targetZip}