tags:

views:

32

answers:

1

I am using the hudson "Publish artifacts to FTP" task after a build to put an installer up to a web site.

I would like to automatically add that link to my email.

unfortunately hudson makes up a directory name based on time and date and places the tile there.

Is there a way to get that value and put it in the build success email or otherwise automatically create the full url?

+1  A: 

Hopefully you are using the "Hudson Email Extension" Plugin. This gives you many more customization options over the email support built into the core.

If you are, you might consider putting the token:
${ENV, var} - Displays an environment variable

...into the email. You could set an environment variable in your build script to the FTP link and then insert it into the email. I'm sorry I don't use the Publish Artifacts to FTP plugin myself, but you should be able to mimic the way that plugin sets the FTP destination, and then stick it into an environment variable, which the Email Extension Plugin can then use.

William Leara
I used the advanced email tool. However, I see no way to set that in the ftp artifact publishing plugin. This is pretty useless to me if I can't control the location or obtain the location programatically. I am left to write my own script as you point out - but I would have liked to have avoided that...
Tim
+1 for the suggestion even though I won't solve it that way.
Tim