I have a Jenkins (which I'm new to) system that has a few constraints imposed on it:
The goal is to have the output of the build and the log of the build archived to:
//server/share/archive/%BUILD_TAG%/
I'm using the post-build step Send build artifacts to a windows share
to push the binaries to the archiving server, but I've yet to find a way to arrange for the build log to end up there too. I have discovered that the console output is available at http://jenkins/job/$jobTitle/$buildNumber/consoleText, but I'm not sure how useful that is going to be - I can't cause anything to run on the archive server to run. I'd like to maintain the separation that the master Jenkins knows about the slave and the archive, but the slave and archive are unaware of each other (that's assuming the Send build artifacts...
step is running on the master rather than being pushed down to the slave to action).
Another approach I explored was to have Jenkins store the artifacts locally (via Archive the artifacts
), but then I don't see a way to promtply push the result + log to the external server.
It seems that Jenkins is very flexible and that this scenario is likely already catered for, but I've yet to find out how.
Using the Post Build Task plugin, you can get the console output with a wget command:
wget -O console-output.log ${BUILD_URL}consoleText
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With