From: <wda...@us...> - 2010-08-13 00:12:29
|
Revision: 6103 http://oorexx.svn.sourceforge.net/oorexx/?rev=6103&view=rev Author: wdashley Date: 2010-08-13 00:12:23 +0000 (Fri, 13 Aug 2010) Log Message: ----------- New scripts for the new VMs. Modified Paths: -------------- websites/build/trunk/docroot/builds/scripts/realrpmbuild.rex websites/build/trunk/docroot/builds/scripts/virtdebbuild.rex websites/build/trunk/docroot/builds/scripts/virtdocsbuild.rex websites/build/trunk/docroot/builds/scripts/virtrpmbuild.rex Modified: websites/build/trunk/docroot/builds/scripts/realrpmbuild.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/realrpmbuild.rex 2010-08-12 22:39:31 UTC (rev 6102) +++ websites/build/trunk/docroot/builds/scripts/realrpmbuild.rex 2010-08-13 00:12:23 UTC (rev 6103) @@ -54,7 +54,7 @@ build~homedir = '/home/'userid() -- always do first! -- build~builddir = build~homedir'/buildorx' build~builddir = '/data/buildorx' -- value for oorexx.osdl.marist.edu -build~targetdir = '/home/dashley/website/trunk/docroot/builds/interpreter-main' +build~targetdir = '/pub/www/build/docroot/builds/interpreter-main' build~osname = osname build~builddate = date('S') build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname @@ -69,7 +69,7 @@ 'scp' build~statusfile()' , 'da...@bu...:/home/dashley/website/trunk/docroot/builds/status/' ||, build~builddate() || '-' || build~osname -call SysFileDelete build~homedir() || '/BuildRPM.log' +call SysFileDelete build~statusfile return @@ -100,7 +100,7 @@ ::method log -- log messages use strict arg msg -strm = .stream~new(self~homedir() || '/BuildRPM.log') +strm = .stream~new(self~statusfile) strm~open('write append') msg = date('S') time('N') msg say msg Modified: websites/build/trunk/docroot/builds/scripts/virtdebbuild.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/virtdebbuild.rex 2010-08-12 22:39:31 UTC (rev 6102) +++ websites/build/trunk/docroot/builds/scripts/virtdebbuild.rex 2010-08-13 00:12:23 UTC (rev 6103) @@ -55,7 +55,7 @@ build = .build~new() build~homedir = '/home/'userid() -- always do first! build~builddir = build~homedir'/buildorx' -build~targetdir = '/home/dashley/website/trunk/docroot/builds/interpreter-main' +build~targetdir = '/pub/www/build/docroot/builds/interpreter-main' build~osname = osname build~builddate = date('S') build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname @@ -68,9 +68,9 @@ -- Cleanup 'scp' build~statusfile() , - 'dashley@192.168.0.104:/home/dashley/website/trunk/docroot/builds/status/' ||, + 'da...@bu...:/home/dashley/website/trunk/docroot/builds/status/' ||, build~builddate() || '-' || build~osname -call SysFileDelete build~homedir() || '/BuildRPM.log' +call SysFileDelete build~statusfile return @@ -144,16 +144,16 @@ return end newdir = self~targetdir'/'svnver'/'self~osname -if \sysisfiledirectory(newdir) then do +if self~targetexists('dashley', 'build.oorexx.org', newdir) = .false then do -- build the deb self~log('Building SVN revision' svnver'.') './bootstrap 2>&1 | tee -a' buildrpt './configure --disable-static 2>&1 | tee -a' buildrpt 'make deb 2>&1 | tee -a' buildrpt -- copy the results to the host - 'ssh dashley@192.168.0.104 "mkdir -p' newdir'"' - 'scp ../oorexx*.deb dashley@192.168.0.104:'newdir - 'scp' buildrpt 'dashley@192.168.0.104:'newdir + 'ssh da...@bu... "mkdir -p' newdir'"' + 'scp ../oorexx*.deb da...@bu...:'newdir + 'scp' buildrpt 'da...@bu...:'newdir end else self~log('This was a duplicate build request for SVN revision' svnver'.') -- remove everything @@ -163,3 +163,19 @@ self~log('Finished build.') return +/*----------------------------------------------------------------------------*/ +/* Method: targetexist */ +/*----------------------------------------------------------------------------*/ + +::method targetexists +use strict arg userid, host, target +tempf = '/tmp/orxbuild.tmp' +'ssh' userid'@'host '"ls -l' target'" >' tempf +strm = .stream~new(tempf) +strm~open('read') +arr = strm~arrayin() +strm~close() +if arr~items() = 0 then return .false +if arr[1]~pos('cannot access') > 0 then return .false +return .true + Modified: websites/build/trunk/docroot/builds/scripts/virtdocsbuild.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/virtdocsbuild.rex 2010-08-12 22:39:31 UTC (rev 6102) +++ websites/build/trunk/docroot/builds/scripts/virtdocsbuild.rex 2010-08-13 00:12:23 UTC (rev 6103) @@ -54,15 +54,22 @@ build = .build~new() build~homedir = '/home/'userid() -- always do first! build~builddir = build~homedir'/buildorx' -build~targetdir = '/imports/builds/docs' +build~targetdir = '/pub/www/build/docroot/builds/docs' build~osname = osname build~builddate = date('S') +build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname -- Set our home directory call directory build~homedir -- Do the build build~build_docs() + +-- Cleanup +'scp' build~statusfile() , + 'da...@bu...:/home/dashley/website/trunk/docroot/builds/status/' ||, + build~builddate() || '-' || build~osname +call SysFileDelete build~statusfile return @@ -84,6 +91,7 @@ ::attribute builddir -- the temp build dir ::attribute osname ::attribute builddate +::attribute statusfile /*----------------------------------------------------------------------------*/ /* build_docs */ @@ -112,26 +120,26 @@ self~log('Building SVN revision' svnver'.') 'make all 2>&1 | tee -a' buildrpt -- copy the results to the host - 'mkdir' newdir - 'cp ./oodialog/oodialog.pdf' newdir - 'cp ./oodialog/oodialog-html.zip' newdir - 'cp ./readme/readme.pdf' newdir - 'cp ./readme/readme.html' newdir - 'cp ./rexxpg/rexxpg.pdf' newdir - 'cp ./rexxpg/rexxpg-html.zip' newdir - 'cp ./rexxref/rexxref.pdf' newdir - 'cp ./rexxref/rexxref-html.zip' newdir - 'cp ./rxftp/rxftp.pdf' newdir - 'cp ./rxftp/rxftp-html.zip' newdir - 'cp ./rxmath/rxmath.pdf' newdir - 'cp ./rxmath/rxmath-html.zip' newdir - 'cp ./rxsock/rxsock.pdf' newdir - 'cp ./rxsock/rxsock-html.zip' newdir - 'cp ./rexxextensions/rexxextensions.pdf' newdir - 'cp ./rexxextensions/rexxextensions-html.zip' newdir - 'cp ./winextensions/winextensions.pdf' newdir - 'cp ./winextensions/winextensions-html.zip' newdir - 'cp' buildrpt newdir + 'ssh da...@bu... "mkdir' newdir'"' + 'cp ./oodialog/oodialog.pdf da...@bu...:'newdir + 'cp ./oodialog/oodialog-html.zip da...@bu...:'newdir + 'cp ./readme/readme.pdf da...@bu...:'newdir + 'cp ./readme/readme.html da...@bu...:'newdir + 'cp ./rexxpg/rexxpg.pdf da...@bu...:'newdir + 'cp ./rexxpg/rexxpg-html.zip da...@bu...:'newdir + 'cp ./rexxref/rexxref.pdf da...@bu...:'newdir + 'cp ./rexxref/rexxref-html.zip da...@bu...:'newdir + 'cp ./rxftp/rxftp.pdf da...@bu...:'newdir + 'cp ./rxftp/rxftp-html.zip da...@bu...:'newdir + 'cp ./rxmath/rxmath.pdf da...@bu...:'newdir + 'cp ./rxmath/rxmath-html.zip da...@bu...:'newdir + 'cp ./rxsock/rxsock.pdf da...@bu...:'newdir + 'cp ./rxsock/rxsock-html.zip da...@bu...:'newdir + 'cp ./rexxextensions/rexxextensions.pdf da...@bu...:'newdir + 'cp ./rexxextensions/rexxextensions-html.zip da...@bu...:'newdir + 'cp ./winextensions/winextensions.pdf da...@bu...:'newdir + 'cp ./winextensions/winextensions-html.zip da...@bu...:'newdir + 'scp' buildrpt 'da...@bu...:'newdir end else self~log('This was a duplicate build request.') -- remove everything @@ -168,7 +176,7 @@ use strict arg msg msg = date('S') time('N') msg say msg -strm = .stream~new('/imports/builds/status/' || self~builddate() || '-' || self~osname) +strm = .stream~new(self~statusfile) strm~open('write append') strm~lineout(msg) strm~close() Modified: websites/build/trunk/docroot/builds/scripts/virtrpmbuild.rex =================================================================== --- websites/build/trunk/docroot/builds/scripts/virtrpmbuild.rex 2010-08-12 22:39:31 UTC (rev 6102) +++ websites/build/trunk/docroot/builds/scripts/virtrpmbuild.rex 2010-08-13 00:12:23 UTC (rev 6103) @@ -53,10 +53,10 @@ build = .build~new() build~homedir = '/home/'userid() -- always do first! build~builddir = build~homedir'/buildorx' -build~targetdir = '/imports/builds/interpreter-main' +build~targetdir = '/pub/www/build/docroot/builds/interpreter-main' build~osname = osname build~builddate = date('S') -build~statusfile = '/imports/builds/status/' || build~builddate() || '-' || build~osname +build~statusfile = build~homedir() || '/' || build~builddate() || '-' || build~osname -- Set our home directory call directory build~homedir @@ -64,6 +64,10 @@ build~build_rpm() -- Cleanup +'scp' build~statusfile() , + 'da...@bu...:/home/dashley/website/trunk/docroot/builds/status/' ||, + build~builddate() || '-' || build~osname +call SysFileDelete build~statusfile return @@ -137,58 +141,58 @@ return end newdir = self~targetdir'/'svnver'/'self~osname -if sysisfiledirectory(newdir) = 0 then do +if self~targetexists('dashley', 'build.oorexx.org', newdir) = .false then do -- build the rpm self~log('Building SVN revision' svnver'.') './bootstrap 2>&1 | tee -a' buildrpt './configure 2>&1 | tee -a' buildrpt 'make rpm 2>&1 | tee -a' buildrpt -- copy the results to the host - 'mkdir -p' newdir + 'ssh da...@bu... "mkdir -p' newdir'"' if SysIsFileDirectory('./rpm/RPMS/i386') then do - 'cp ./rpm/RPMS/i386/ooRexx*.rpm' newdir + 'scp ./rpm/RPMS/i386/ooRexx*.rpm da...@bu...:'newdir if \self~checkbuild('i386', newdir) then do self~log('Build was bad, no output files produced.') end end else if SysIsFileDirectory('./rpm/RPMS/i486') then do - 'cp ./rpm/RPMS/i486/ooRexx*.rpm' newdir + 'scp ./rpm/RPMS/i486/ooRexx*.rpm da...@bu...:'newdir if \self~checkbuild('i486', newdir) then do self~log('Build was bad, no output files produced.') end end else if SysIsFileDirectory('./rpm/RPMS/i586') then do - 'cp ./rpm/RPMS/i586/ooRexx*.rpm' newdir + 'scp ./rpm/RPMS/i586/ooRexx*.rpm da...@bu...:'newdir if \self~checkbuild('i586', newdir) then do self~log('Build was bad, no output files produced.') end end else if SysIsFileDirectory('./rpm/RPMS/i686') then do - 'cp ./rpm/RPMS/i686/ooRexx*.rpm' newdir + 'scp ./rpm/RPMS/i686/ooRexx*.rpm da...@bu...:'newdir if \self~checkbuild('i686', newdir) then do self~log('Build was bad, no output files produced.') end end else if SysIsFileDirectory('./rpm/RPMS/x86_64') then do - 'cp ./rpm/RPMS/x86_64/ooRexx*.rpm' newdir + 'scp ./rpm/RPMS/x86_64/ooRexx*.rpm da...@bu...:'newdir if \self~checkbuild('x86_64', newdir) then do self~log('Build was bad, no output files produced.') end end else if SysIsFileDirectory('./rpm/RPMS/s390x') then do - 'cp ./rpm/RPMS/s390x/ooRexx*.rpm' newdir + 'scp ./rpm/RPMS/s390x/ooRexx*.rpm da...@bu...:'newdir if \self~checkbuild('s390x', newdir) then do self~log('Build was bad, no output files produced.') end end else if SysIsFileDirectory('./rpm/RPMS/s390') then do - 'cp ./rpm/RPMS/s390/ooRexx*.rpm' newdir + 'scp ./rpm/RPMS/s390/ooRexx*.rpm da...@bu...:'newdir if \self~checkbuild('s390', newdir) then do self~log('Build was bad, no output files produced.') end end else nop -- it must not be a supported rpm type - 'cp' buildrpt newdir + 'scp' buildrpt 'da...@bu...:'newdir end else do self~log('This was a duplicate build request for SVN revision' svnver'.') @@ -212,3 +216,20 @@ if files.0 = 0 then return .false -- bad build return .true -- good build + +/*----------------------------------------------------------------------------*/ +/* Method: targetexist */ +/*----------------------------------------------------------------------------*/ + +::method targetexists +use strict arg userid, host, target +tempf = '/tmp/orxbuild.tmp' +'ssh' userid'@'host '"ls -l' target'" >' tempf +strm = .stream~new(tempf) +strm~open('read') +arr = strm~arrayin() +strm~close() +if arr~items() = 0 then return .false +if arr[1]~pos('cannot access') > 0 then return .false +return .true + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |