Skip to content
Permalink
Browse files
Support Jenkins
  • Loading branch information
Dave Cottlehuber committed Mar 21, 2013
1 parent c198990 commit fb225be6bc49e03f801643afb4ca3eea48842bc7
Showing 2 changed files with 64 additions and 14 deletions.
@@ -20,26 +20,44 @@ make dist 2>&1 | tee $COUCH_TOP/build_dist.txt
echo DONE. | tee -a $COUCH_TOP/build_dist.txt

echo ============= COUCHDB_BUILD_PDB-LOGS ==================
tar cvzf $COUCH_TOP/build_pdbs-logs.tar.gz \
tar cvzf $COUCH_TOP/etc/windows/build_pdbs-logs.tar.gz \
`find $COUCH_TOP -name \*.pdb` \
$COUCH_TOP/bui*.txt \
`find $ERL_TOP -name \*.pdb` \
$ERL_TOP/bui*.txt \
$COUCH_TOP/config.*
echo DONE.
echo to move build files to release area run the following:
echo PATCH=_otp_$OTP_REL.exe
echo DEST=/cygdrive/c/jenkins/release/CouchDB/Snapshots/`date +%Y%m%d`
echo pushd $COUCH_TOP/etc/windows/
echo rename .exe \$PATCH setup-couchdb-*
echo WINCOUCH=\`ls -1 setup-*.exe\`
echo rm \$WINCOUCH.*
echo shasum \$WINCOUCH \> \$WINCOUCH.sha
echo md5sum \$WINCOUCH \> \$WINCOUCH.md5
echo mkdir -p \$DEST/
echo mv setup-couchdb-* \$DEST/
echo mv $COUCH_TOP/build_pdbs-logs.tar.gz \$DEST/\$WINCOUCH.build_pdbs-logs.tar.gz
echo popd


if [ -z "$BUILD_WITH_JENKINS" ] ; then
echo to move build files to release area run the following:
echo PATCH=_$OTP_ARCH_otp_$OTP_REL.exe
echo DEST=/cygdrive/c/jenkins/release/CouchDB/Snapshots/`date +%Y%m%d`
echo pushd $COUCH_TOP/etc/windows/
echo rename .exe \$PATCH setup-couchdb-*
echo WINCOUCH=\`ls -1 setup-*.exe\`
echo rm \$WINCOUCH.*
echo shasum \$WINCOUCH \> \$WINCOUCH.sha
echo md5sum \$WINCOUCH \> \$WINCOUCH.md5
echo mkdir -p \$DEST/
echo mv setup-couchdb-* \$DEST/
echo mv build_pdbs-logs.tar.gz \$DEST/\$WINCOUCH.build_pdbs-logs.tar.gz
echo popd
else
echo ============= COUCHDB_BUILD_JENKINS ==================
# rename all files to match the build name
PATCH=_$OTP_ARCH_otp_$OTP_REL.exe
#DATE=/cygdrive/c/jenkins/release/CouchDB/Snapshots/`date +%Y%m%d`
pushd $COUCH_TOP/etc/windows/
rename .exe $PATCH setup-couchdb-*
WINCOUCH=`ls -1 setup-*.exe`
rm $WINCOUCH.*
shasum $WINCOUCH > $WINCOUCH.sha
md5sum $WINCOUCH > $WINCOUCH.md5
mv build_pdbs-logs.tar.gz $WINCOUCH.build_pdbs-logs.tar.gz
popd
fi


echo ============= COUCHDB_BUILD ===================
echo DONE.
@@ -0,0 +1,32 @@
@echo off
:: tell other glazier scripts to run automated
:: builds instead of usual interactive mode
set BUILD_WITH_JENKINS=1

:: decide where to find couchdb build scripts and tools
if not defined RELAX set RELAX=c:\relax

:: this is used only in jenkins.cmd to set up cygwin environment
:: right now we can't support these in the script but we will in future
if not defined OTP_REL set OTP_REL=R15B03-1
if not defined OTP_ARCH set OTP_ARCH=x86


:: a pristine copy of erlang artefacts is stored in WERL_SRC
:: cleans out any old build artefacts
if not defined WERL_SRC set WERL_SRC=c:\werl
if not defined WERL_DIR set WERL_DIR=c:\jenkins\workspace\werl
robocopy %WERL_SRC% %WERL_DIR% -mir -log:NUL: -r:0 -w:0

:: expect crash and burn for the moment

:: this allows you to run the jenkins build interactively TODO HACKHACKHACK
if not defined WORKSPACE set WORKSPACE=c:\jenkins\workspace\Apache-CouchDB-Windows-master\label\Windows-8-x64\

:: This script must run with elevated (admin/uac) permissions for the
:: cp -p stage in couchdb autotools script to complete successfully.

call c:\relax\bin\shell.cmd
:: and relax

:: output when all is well, ends up in /etc/windows/ for better or for worse!

0 comments on commit fb225be

Please sign in to comment.