Changeset 80468
- Timestamp:
- 07/13/11 08:23:45 (4 years ago)
- Location:
- contrib/buildbot
- Files:
-
- 2 edited
-
deploy_archives.sh (modified) (2 diffs)
-
master.cfg (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
contrib/buildbot/deploy_archives.sh
r80462 r80468 14 14 fi 15 15 16 # path where itkeeps archives16 # path where download server keeps archives 17 17 if [[ -z "$DLPATH" ]]; then 18 DLPATH=" /archives"18 DLPATH="./deployed_archives" 19 19 fi 20 20 21 # path where archives get uploaded to master21 # path where archives get uploaded to buildmaster 22 22 if [[ -z "$ULPATH" ]]; then 23 ULPATH=" ${PREFIX}/var/macports/software"23 ULPATH="./archive_staging" 24 24 fi 25 25 … … 30 30 31 31 32 for portname in `cat $PORTLISTFILE`; do 33 if ls logs-*/success/${portname}.log > /dev/null 2>&1 ; then 34 if ./mpexport/base/portmgr/jobs/port_binary_distributable.tcl ${portname}; then 35 echo $portname is distributable 36 portversion=$(${PREFIX}/bin/port info --version --line ${portname}) 37 portrevision=$(${PREFIX}/bin/port info --revision --line ${portname}) 38 for archive in ${ULPATH}/${portname}/${portname}-${portversion}_${portrevision}[+.]*; do 39 aname=$(basename $archive) 40 echo deploying archive: $aname 41 if [[ -n "$PRIVKEY" ]]; then 42 openssl dgst -ripemd160 -sign "${PRIVKEY}" -out ./${aname}.rmd160 ${archive} 43 fi 44 if [[ -n "$DLHOST" ]]; then 45 ssh ${DLHOST} mkdir -p ${DLPATH}/${portname}; 46 rsync -av --ignore-existing ./${aname}.rmd160 ${archive} ${DLHOST}:${DLPATH}/${portname}; 47 else 48 mkdir -p ${DLPATH}/${portname}; 49 rsync -av --ignore-existing ./${aname}.rmd160 ${archive} ${DLPATH}/${portname}; 50 fi 51 rm -f ./${aname}.rmd160 52 done 53 else 54 echo $portname is not distributable 55 fi 32 for archive in ${ULPATH}/*/*; do 33 portname=$(basename $(dirname $archive)) 34 aname=$(basename $archive) 35 echo deploying archive: $aname 36 if [[ -n "$PRIVKEY" ]]; then 37 openssl dgst -ripemd160 -sign "${PRIVKEY}" -out ${ULPATH}/${portname}/${aname}.rmd160 ${archive} 56 38 fi 57 39 done 40 41 if [[ -n "$DLHOST" ]]; then 42 rsync -av --ignore-existing ${ULPATH}/ ${DLHOST}:${DLPATH} 43 else 44 rsync -av --ignore-existing ${ULPATH}/ ${DLPATH} 45 fi 46 47 # clean up after ourselves 48 rm -rf $ULPATH -
contrib/buildbot/master.cfg
r80457 r80468 159 159 src_prefix='%(workdir)s/opt/mports' 160 160 dlhost='' 161 dlpath='. '161 dlpath='./deployed_archives' 162 162 163 163 ports_factory = BuildFactory() … … 177 177 'SRC_PREFIX': WithProperties(src_prefix)})) 178 178 179 ulpath='archive_staging' 180 ports_factory.addStep(ShellCommand(command=["./gather_archives.sh"], 181 name="gather archives", 182 description="gather distributable archives into one place for upload", 183 env={'PREFIX': WithProperties(prefix), 184 'ULPATH': ulpath})) 185 # upload archives from build slave to master 186 from buildbot.steps.transfer import DirectoryUpload 187 ports_factory.addStep(DirectoryUpload(slavesrc=ulpath, masterdest=ulpath)) 179 188 # sign generated binaries and sync to download server (if distributable) 180 ports_factory.addStep(MasterShellCommand(command=["mpab/deploy_archives.sh"], 189 from buildbot.steps.master import MasterShellCommand 190 ports_factory.addStep(MasterShellCommand(command=["./deploy_archives.sh"], 181 191 name="deploy archives", 182 192 description="deploy archives", 183 193 env={'PREFIX': WithProperties(prefix), 184 194 'PRIVKEY': privkey, 195 'ULPATH': ulpath, 185 196 'DLHOST': dlhost, 186 197 'DLPATH': dlpath})) … … 192 203 env={'PREFIX': WithProperties(prefix)}, 193 204 logfiles={"portstatus": "portstatus.log"})) 194 # do we want to upload the individual logs so maintainers can review them?195 ports_factory.addStep(ShellCommand(command="rm -rf ./logs-* ",205 # TODO: do we want to upload the individual logs so maintainers can review them? 206 ports_factory.addStep(ShellCommand(command="rm -rf ./logs-* ./"+ulpath, 196 207 name="cleanup", 197 208 description="cleanup"))
Note: See TracChangeset
for help on using the changeset viewer.

