blob: 7a9aa40fd01d44e1f16ac06a229db8282c9ea9b0 [file] [log] [blame]
mparker58a86182009-12-18 00:39:43 +00001JOB_ID=cbi-amp-nightly
2BUILD_TYPE=N
3ANT=/opt/public/common/apache-ant-1.7.1/bin/ant
4RELENG_DIR=/opt/users/hudsonbuild/.hudson/jobs/$JOB_ID/workspace/build/org.eclipse.amp.releng
5PROMO_LOGS_DIR=/home/data/users/mparker/promo_logs
6BUILD_LOC=/home/data/users/mparker/promo_build
7logFile=$PROMO_LOGS_DIR/promo_log.txt
8
9DATE=`date +%Y%m%d-%H%M`
10
11echo "$DATE: getting last successful build" >> $logFile
12mkdir -p $BUILD_LOC
13rm -f $BUILD_LOC/build.zip
14rm -rf $BUILD_LOC/build
15cd $BUILD_LOC
16wget --no-check-certificate "https://build.eclipse.org/hudson/job/$JOB_ID/lastSuccessfulBuild/artifact/build/*zip*/build.zip"
17if [ ! -f build.zip ]; then echo "ERROR:build.zip (from Hudson) not found"; exit -2; fi
18unzip build.zip
19echo "$DATE: publishing nightly build ..." >> $logFile
20cd ../
21mkdir -p $PROMO_LOGS_DIR
22$ANT -f $RELENG_DIR/promote.xml -Dpromote.properties=$RELENG_DIR/promote-$BUILD_TYPE.properties -verbose 2>/dev/null 1> $PROMO_LOGS_DIR/$JOB_ID-promo-$BUILD_TYPE.txt
23
24$ANT -f $RELENG_DIR/promote.xml -Dpromote.properties=$RELENG_DIR/promote-$BUILD_TYPE.properties -verbose 2>/dev/null 1> $PROMO_LOGS_DIR/$JOB_ID-promo-$BUILD_TYPE.txt
25
26/opt/public/common/apache-ant-1.7.1/bin/ant -f /opt/users/hudsonbuild/.hudson/jobs/cbi-amp-nightly/workspace/build/org.eclipse.amp.releng/promote.xml -Dpromote.properties=/opt/users/hudsonbuild/.hudson/jobs/cbi-amp-nightly/workspace/build/org.eclipse.amp.releng/promote-I.properties 2>/dev/null 1> ~/promo_logs/cbi-amp-interim-promo.txt