1

I would like to persist the status page of a Jenkins build job's build (the one which contains commits as well as why the build was triggered).

This should happen in order to get a changelog file.

How am I able to do this?

For being a bit more precise, I would like to persist the content which is shown from

<jenkins-build-server-address>/job/<job-identifier>/<build-number>/api/json?pretty=true 

as a file. A separate buildstep inside the buildjob which takes care of this, would be perfect!

Martin Komischke
  • 1,440
  • 1
  • 13
  • 24
  • Not sure what you are asking. As long as you don't delete a particular build it is available later. Even after you run another build. – Peter Schuetze Dec 10 '13 at 14:44

1 Answers1

0

If I'm understanding your question correctly, this earlier StackOverflow question "Jenkins: how to save changelog for build" may have the answer.

Community
  • 1
  • 1
Mike Christianson
  • 1,927
  • 1
  • 12
  • 7
  • 1
    I also found this. But unfortunately it does not mention how I can persist the content from within a build job (e.g. as a separate buildstep). – Martin Komischke Dec 11 '13 at 09:03
  • @makomweb: The build is available in the api as soon as it starts, so you can access it from within the job. Have you tried it? – Anders Lindahl Dec 11 '13 at 09:09
  • @AndersLindahl It would be great if you can explain this a bit more in detail. – Martin Komischke Dec 11 '13 at 10:53
  • @makomweb You could probably do that with the [PostBuildScript Plugin](https://wiki.jenkins-ci.org/display/JENKINS/PostBuildScript+Plugin) and a custom script. That's the best I can come up with. Good luck. – Mike Christianson Dec 11 '13 at 18:04