Artifacts on successful build only ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Artifacts on successful build only ?

javadude2
Hi !

I use the artifacts to save sourcecode and warfile for each build.
That helps me a lot when doing investigation on specific builds later.

First trigger a shell script (after the build/ANT step):

rm BACKUP*GZ
tar -cvf BACKUP_SRC_$BUILD_NUMBER.tar --exclude 'build/*' --exclude
'dist/*' --exclude '.svn' {projectname}
gzip *tar

then use option 'keep artifacts":
{projectname}/dist/*.war , *.gz

the 'keep artifacts' option is always triggered, even when the build fails.
Would be a nice feature to have a sub-option that would allow to choose
if a successful build is condition.

cheers
Sven




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Artifacts on successful build only ?

Sami Tikka
You do not need to save the sourcecode as a build artifact. Hudson
saves the Subversion revision number(s) of the source code that went
into each build. If you need that source code later, it is easy to
check out that particular revision from Subversion.

The same is true for all the other version control systems too :)

-- Sami

2010/7/27 Sven Hafner <[hidden email]>:

> Hi !
>
> I use the artifacts to save sourcecode and warfile for each build.
> That helps me a lot when doing investigation on specific builds later.
>
> First trigger a shell script (after the build/ANT step):
>
> rm BACKUP*GZ
> tar -cvf BACKUP_SRC_$BUILD_NUMBER.tar --exclude 'build/*' --exclude
> 'dist/*' --exclude '.svn' {projectname}
> gzip *tar
>
> then use option 'keep artifacts":
> {projectname}/dist/*.war , *.gz
>
> the 'keep artifacts' option is always triggered, even when the build fails.
> Would be a nice feature to have a sub-option that would allow to choose
> if a successful build is condition.
>
> cheers
> Sven
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Artifacts on successful build only ?

javadude2
Thats right !
(Guess it just depend what you want to to)

But the basic question is still the same, the artifacts get archived un-conditioned.

Sven