Hi,
I am attaching a very-very rough draft for nightly
release. It works on a simple Helloworld! project.
Lots more to come. I need some feedback about -
1. Using openssl vs. ant:checksum?
2. How is the PGP signature being generated currently?
3. Using svn:mkdir and svn:copy instead of ssh and
scp? This would make release dirs version controlled
as a side effect.
4. Adding it to existing maven.xml vs. making it a
plugin?
Lots of suggestions welcome!
Thanks
Anita
--- David Blevins <[EMAIL PROTECTED]> wrote:
> On Tue, Mar 29, 2005 at 12:13:37PM -0700, Bruce
> Snyder wrote:
> > On Tue, 29 Mar 2005 11:03:30 -0800, Dain Sundstrom
> > <[EMAIL PROTECTED]> wrote:
> > > +10000000000000000000000000000000
> > >
> > > Anyone that has time, please help with this one.
> This would be a huge
> > > help to the whole community.
> > >
> > > -dain
> > >
> > > On Mar 29, 2005, at 10:39 AM, David Blevins
> wrote:
> > >
> > > > If there are some people with extra time,
> committer or not, we could
> > > > *really* use nightly releases. Strike that,
> developers build Geronimo
> > > > several times daily, it's the community that
> needs nightly releases.
> > > >
> > > > We need a bash, jelly, or even java program
> that can:
> > > >
> > > > NIGHTLY-RELEASE (run if build/test passed)
> > > > checkout current date (cvs) or current
> rev (svn)
> > > > (using 48765 as example svn rev for
> explanation)
> > > > update the geronimo_version in
> etc/project.properties to 1.0-48765
> > > > zip geronimo-1.0-48765 dir into
> geronimo-1.0-48765-src.zip
> > > > again for tar
> > > > build with no tests--testing should have
> already been done.
> > > > zip
> modules/assembly/target/geronimo-1.0-48765 dir into
> > > > geronimo-1.0-48765.zip
> > > > again for tar
> > > > create MD5 files for src/bin tars and
> zips with openssl
> > > > again but with SHA instead of MD5
> > > > create 1.0-48765 dir on nightly release
> server using ssh
> > > > copy tar.gz, zip, md5, and sha files into
> 1.0-48765 using scp
> > > > publish jars to remote maven repo
> > > > delete any previous nightly releases over
> a week old.
> > > >
> > > > As an added bonus, I actaully had something
> close once and here it is:
> > > >
> http://people.apache.org/~dblevins/svn-release.sh
> > > >
> > > > Ugly as heck. Someting in java or jelly would
> be the best option as
> > > > everyone could maintain it.
> > > >
> > > > Maybe we can formally thank the person who
> get's this done by putting
> > > > their name in a THANK_YOU file in every
> nightly release for a month or
> > > > on the website for a while.
> >
> > Is there no infrastructure at the ASF for
> performing nightly builds?
>
> I assume we can use the gump box for our builds as
> well.
>
> > If not, I'll just continue w/ David's script to
> get something going
> > somewhat quickly via cron from my user space.
> After this is working, I
> > can work to migrate it to Maven/Jelly.
>
> Great!
>
> I still want to strongly encourage anyone else who
> would like to give it a shot, especially in Java or
> Jelly. The sooner we get this integrated into our
> build system, the better.
>
> -David
>
> >
> > Bruce
> > --
> > perl -e 'print
>
unpack("u30","D0G)[EMAIL PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> > );'
> >
> > The Castor Project
> > http://www.castor.org/
> >
> > Apache Geronimo
> > http://geronimo.apache.org/
>
__________________________________
Yahoo! Messenger
Show us what our next emoticon should look like. Join the fun.
http://www.advision.webevents.yahoo.com/emoticontest<project default="default"
xmlns:ant="jelly:ant"
xmlns:j="jelly:core"
xmlns:u="jelly:util"
xmlns:i="jelly:interaction"
>
<!--
========================================================================================
-->
<!--
RUN THIS AFTER A FRESH-CHECKOUT AND A SUCCESSFUL BUILD WITHOUT ANY TEST FAILURES
-->
<!--
========================================================================================
-->
<!-- TO DO - gdist:prepare-bin-filesystem - Use geronimo build,
cretae zip, tar.gz, Release Notes.
gdist:prepare-src-filesystem to include README.txt, LICENSE*,
project.properties, maven.xml, src, ............
use this to create zip, tar.gz
-->
<!-- replace java:compile with geronimo build goals -->
<preGoal name="java:compile">
<!-- To do - use pom.repository.connection (like scm:parse-connection) to determine cvs/svn.
Add similar code for cvs -->
<j:set var="scmMethod" value="svn"/>
<!-- Extract the revision no from the local copy -->
<u:tokenize var="tokens" delim="-"> ${pom.currentVersion}</u:tokenize>
<j:set var="version" value="${tokens[0]}"/>
<i:ask question="What version are you releasing?" answer="version" default="${version}"/>
<i:ask question="What SVN revision are you releasing from?" answer="revision" default="SNAPSHOT"/>
<j:set var="distDir" value="target/${pom.groupId}-${version}-${revision}"/>
<!-- update project.properties to reflect the revision no. -->
<ant:replace
file="project.properties"
value="${version}-${revision}"
token="${geronimo_version}"/>
</preGoal>
<!--
========================================================================================
-->
<!--
sign the archive *.zip, *.tar.gz with MD5 and SHA
-->
<!--
========================================================================================
-->
<postGoal name="jar:jar">
<!-- to do - Add MD5, SHA to jar distribtution and move it to ???-->
<!-- B I N A R Y D I S T R I B U T I O N -->
<j:set var="finalName" value="${pom.groupId}-${version}-${revision}"/>
<j:set var="binArchiveDir" value="target/classes"/>
<j:set var="distDir" value="target/${finalName}/bin"/>
<mkdir dir="${distDir}"/>
<!-- Create a tar.gz file -->
<ant:tar longfile="gnu" tarfile="${distDir}/${finalName}.tar">
<ant:tarfileset dir="${binArchiveDir}"/>
</ant:tar>
<ant:gzip zipfile="${distDir}/${finalName}.tar.gz" src="${distDir}/${finalName}.tar"/>
<ant:delete file="${distDir}/${finalName}.tar"/>
<!-- Create a zip file -->
<ant:zip zipfile="${distDir}/${finalName}.zip">
<ant:zipfileset dir="${binArchiveDir}"/>
</ant:zip>
<!-- Create MD5, SHA -->
<fileScanner var="archives">
<fileset dir="${distDir}">
<include name="*.zip"/>
<include name="*.tar.gz"/>
</fileset>
</fileScanner>
<j:forEach var="archive" items="${archives.iterator()}">
<checksum file="${archive}"/>
<checksum file="${archive}" algorithm="SHA" />
</j:forEach>
<!-- S O U R C E D I S T R I B U T I O N -->
<!-- Create a tar.gz file -->
<j:set var="srcArchiveDir" value="src"/>
<j:set var="distDir" value="target/${finalName}/src"/>
<j:set var="finalName" value="${pom.groupId}-src-${version}-${revision}"/>
<mkdir dir="${distDir}"/>
<ant:tar longfile="gnu" tarfile="${distDir}/${finalName}.tar">
<ant:tarfileset dir="${srcArchiveDir}"/>
</ant:tar>
<ant:gzip zipfile="${distDir}/${finalName}.tar.gz" src="${distDir}/${finalName}.tar"/>
<ant:delete file="${distDir}/${finalName}.tar"/>
<!-- Create a zip file -->
<ant:zip zipfile="${distDir}/${finalName}.zip">
<ant:zipfileset dir="${srcArchiveDir}"/>
</ant:zip>
<!-- Create MD5, SHA -->
<fileScanner var="archives">
<fileset dir="${distDir}">
<include name="*.zip"/>
<include name="*.tar.gz"/>
</fileset>
</fileScanner>
<j:forEach var="archive" items="${archives.iterator()}">
<checksum file="${archive}"/>
<checksum file="${archive}" algorithm="SHA" />
</j:forEach>
<!--
========================================================================================
-->
<!--
D E P L O Y TO R E M O T E R E P O
-->
<!--
========================================================================================
-->
<!-- Run a command on a remote machine using key authentication/ password ? -->
<!-- <ant:sshexec host="nightlyReleaseServer"
username="anita"
keyfile="${user.home}/.ssh/id_dsa"
passphrase="yo its a secret"
command="mkdir ${finalName}"/> ????
Copy a files to a remote machine using key base authentication.
<ant:scp todir="[EMAIL PROTECTED]:/home/chuck"
keyfile="${user.home}/.ssh/id_dsa"
passphrase="my extremely secret passphrase" />
<fileset dir="${distDir}">
</ant:scp>
Delete nightly releases that are more than a week old
-->
</postGoal>
<goal name="default">
<attainGoal name="jar:jar"/>
</goal>
</project>