How to add button on post build page to copy artifacts on shared drive?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How to add button on post build page to copy artifacts on shared drive?

Mathias Awox

I'd like to add a button on build pages that will extract and copy the build's artifacts on a shared drive.


We want to control when the artifacts are exported, so we don't want to add this export as a new build step, but rather trigger the export using a new button on the post build page.


What is the best way for doing that please ?


Is there a existing plugin for that ?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1b4deedb-a085-48b1-98a0-732c169af808%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to add button on post build page to copy artifacts on shared drive?

Victor Martinez
What about using the promote builds plugin


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5ca795ce-3093-41a4-a58f-f8d72c309dd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to add button on post build page to copy artifacts on shared drive?

Mathias Awox
Thanks for the link

How would I specify  the destination directory in which the artifacts should be copied please ?

Le jeudi 7 décembre 2017 18:07:43 UTC+1, Victor Martinez a écrit :
What about using the <a href="https://wiki.jenkins.io/display/JENKINS/Promoted+Builds+Plugin" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FPromoted%2BBuilds%2BPlugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF9wU__cxLPVBjNPi-q3Tt5FTlXag&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FPromoted%2BBuilds%2BPlugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF9wU__cxLPVBjNPi-q3Tt5FTlXag&#39;;return true;">promote builds plugin? 


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a03c6075-660a-41fd-8e5f-556914cf9a2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to add button on post build page to copy artifacts on shared drive?

Victor Martinez
If you meant about using the promote build plugin, you can add some input parameters in the job and then use those parameters within the promotion stage, since they are populated. For instance:




Then when you promote it  yo uwill see something like 


Started by user anonymous
Building in workspace /var/jenkins_home/workspace/promote
Promoting promote #3
[promote] $ /bin/sh -xe /tmp/jenkins389158040050727821.sh
+ echo bar
bar
build hudson.tasks.Shell@23588bc7 SUCCESS
Finished: SUCCESS



Cheers


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/61d21cdd-f90d-40f9-b6fd-82b4bb164c00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to add button on post build page to copy artifacts on shared drive?

Mathias Awox

Thanks Victor

May I ask you for further help regarding the script needed to copy artifact files into the desired location ?

Le mercredi 13 décembre 2017 15:55:09 UTC+1, Victor Martinez a écrit :
If you meant about using the promote build plugin, you can add some input parameters in the job and then use those parameters within the promotion stage, since they are populated. For instance:

<a href="https://lh3.googleusercontent.com/-WWNQlSNxsQA/WjE-rsoAGYI/AAAAAAAAK54/0GG79bK01MAKZjlHcD1_SWWRaZ3IlsHXACLcBGAs/s1600/Screen%2BShot%2B2017-12-13%2Bat%2B14.52.12.png" style="margin-left:1em;margin-right:1em" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-WWNQlSNxsQA/WjE-rsoAGYI/AAAAAAAAK54/0GG79bK01MAKZjlHcD1_SWWRaZ3IlsHXACLcBGAs/s1600/Screen%2BShot%2B2017-12-13%2Bat%2B14.52.12.png&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-WWNQlSNxsQA/WjE-rsoAGYI/AAAAAAAAK54/0GG79bK01MAKZjlHcD1_SWWRaZ3IlsHXACLcBGAs/s1600/Screen%2BShot%2B2017-12-13%2Bat%2B14.52.12.png&#39;;return true;">

<a href="https://lh3.googleusercontent.com/-TPlS7odZGrQ/WjE_A2Bd0wI/AAAAAAAAK6A/HU7SwBShISwwACWL_PUMtEtrNbch9OEvACLcBGAs/s1600/Screen%2BShot%2B2017-12-13%2Bat%2B14.52.57.png" style="margin-left:1em;margin-right:1em" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-TPlS7odZGrQ/WjE_A2Bd0wI/AAAAAAAAK6A/HU7SwBShISwwACWL_PUMtEtrNbch9OEvACLcBGAs/s1600/Screen%2BShot%2B2017-12-13%2Bat%2B14.52.57.png&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-TPlS7odZGrQ/WjE_A2Bd0wI/AAAAAAAAK6A/HU7SwBShISwwACWL_PUMtEtrNbch9OEvACLcBGAs/s1600/Screen%2BShot%2B2017-12-13%2Bat%2B14.52.57.png&#39;;return true;">



<a href="https://lh3.googleusercontent.com/-divi4Au9Gco/WjE--UHuW2I/AAAAAAAAK58/L81Org4x6IwMQeWyarcJv7UY7BKd7ThEQCLcBGAs/s1600/Screen%2BShot%2B2017-12-13%2Bat%2B14.53.07.png" style="margin-left:1em;margin-right:1em" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-divi4Au9Gco/WjE--UHuW2I/AAAAAAAAK58/L81Org4x6IwMQeWyarcJv7UY7BKd7ThEQCLcBGAs/s1600/Screen%2BShot%2B2017-12-13%2Bat%2B14.53.07.png&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-divi4Au9Gco/WjE--UHuW2I/AAAAAAAAK58/L81Org4x6IwMQeWyarcJv7UY7BKd7ThEQCLcBGAs/s1600/Screen%2BShot%2B2017-12-13%2Bat%2B14.53.07.png&#39;;return true;">


Then when you promote it  yo uwill see something like 


Started by user anonymous
Building in workspace /var/jenkins_home/workspace/promote
Promoting <a href="http://localhost:8080/job/promote/3/" style="word-wrap:break-word;color:rgb(92,53,102)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Flocalhost%3A8080%2Fjob%2Fpromote%2F3%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGg2YeHkzlTIjZH8zuTEa2hcbYMRw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Flocalhost%3A8080%2Fjob%2Fpromote%2F3%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGg2YeHkzlTIjZH8zuTEa2hcbYMRw&#39;;return true;">promote #3
[promote] $ /bin/sh -xe /tmp/jenkins389158040050727821.sh
+ echo bar
bar
build hudson.tasks.Shell@23588bc7 SUCCESS
Finished: SUCCESS



Cheers


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3af5b2d1-2922-4b48-9da1-a459e651556d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to add button on post build page to copy artifacts on shared drive?

Victor Martinez
I guess, that's more specific about your use case, but if that's something about how to do it within Jenkins, please go ahead, likely others can provide you some feedback too :)

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f07487dc-00a8-486a-86c5-b2c6a1213de1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.