Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Publishing latest Build in Jenkins

Tags:

jenkins

I have been playing with Jenkins and got it all working. Version 1.447

However I would like to "publish" the latest stable build to an area outside the Jenkins workspace/job area. This would be where users could pick up the latest stable build for testing and would save me having to point them to the .

Can someone recommend how I should go about approaching this? Jenkins seems to have the ability to publish artefacts but only within the Jenkins workspace/area. Is there a good plugin that can do what I want. I'll also want to completely delete the existing build first.

like image 916
Mike Q Avatar asked Jan 11 '12 17:01

Mike Q


People also ask

What is publisher in Jenkins?

The HTML Publisher plugin is useful to publish HTML reports that your build generates to the job and build pages. It is designed to work with both Freestyle projects as well as being used in a Jenkins Pipeline.


2 Answers

There are a bunch of plugins available for this, depending on how you want to transfer your artifact...

  • Publish over SSH
  • FTP-Publisher
  • Publish over CIFS (Windows Share)

If you go here, look for a section called Artifact uploaders, and it lists a bunch of others that you can use depending on your needs...

like image 116
Sagar Avatar answered Oct 04 '22 18:10

Sagar


To accomplish this I add a post-build action to trigger a second job (build other projects -> projects to build, tick 'trigger only if build succeeds'). All this second job does is run a command (using the 'execute shell' field) which deploys the stable build for testing.

If you don't want to keep the existing build from the first job around, you can choose not to keep the builds after they have been run via the project config.

like image 24
Craig Avatar answered Oct 04 '22 16:10

Craig