On 26 May 2015 at 14:00, John Mellor <john.mel...@esentire.com> wrote:

>  Yeah, that is not a scalable solution.  That very effectively limits the
> build and promotion to only run on one host, completely defeating the
> purpose of having a cluster of slave build machines.  Maybe it works ok for
> sites that do not have enough peak workload to need slave machines.
>
>
>
> It would be much better if the promotion plugin just discovered the host
> that the build used, and then ran on that same host.
>

Won't work with cloud provided slaves. The host that the build used may
very well no longer exist.

The correct way is to archive off the artifacts and then used the copy
artifacts plugin to put them back in place.


>
>
> We do have the PROMOTED_URL available, but it generally contains the
> correct host to at least copy the artifacts from using scp or wget.  It’s a
> messy hack, but it works better than the existing operation of the plugin.
>
>
>
>
>
> *From:* jenkinsci-users@googlegroups.com [mailto:
> jenkinsci-users@googlegroups.com] *On Behalf Of *
> corneil.duples...@gmail.com
> *Sent:* May-26-15 06:33
> *To:* jenkinsci-users@googlegroups.com
> *Subject:* Re: How can I get a promotion to run on the same host?
>
>
>
> If the label you use to restrict the parent build the promotion build will
> use the same label.
>
> The best practice for promotion is to save artifacts during build so that
> the artifacts can be retrieved during promotion. This will allow you to
> perform promotions on historical builds as well and you are not limited to
> where the promotion build can execute.
>
>
>
> The alternative is to label your slave with a unique label that will
> ensure job and promotion execute on the same slave.
>
>
>
>
>  *Corneil du Plessis*
>
> about.me/corneil
>
>
>
>
>
> On 26 May 2015 at 11:53, <matthew.web...@diamond.ac.uk> wrote:
>
> It sounds like you want the promotion job to be reading files from the
> workspace of the parent build that is being promoted.
>
> If so, that’s the wrong way to do it. From
> https://wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin:
>
>
>
> Do not rely on files in the workspace
>
> The promotion action uses the workspace of the job as the current
> directory (and as such the execution of the promotion action is mutually
> exclusive from any on-going builds of the job.) But by the time promotion
> runs, this workspace can contain files from builds that are totally
> unrelated from the build being promoted.
>
> To access the artifacts, use the Copy Artifact Plugin and choose the
> permalink.
>
>
>
>
>
> *From:* jenkinsci-users@googlegroups.com [mailto:
> jenkinsci-users@googlegroups.com] *On Behalf Of *John Mellor
> *Sent:* 22 May 2015 17:15
> *To:* jenkinsci-users@googlegroups.com
> *Subject:* How can I get a promotion to run on the same host?
>
>
>
> I have a problem where a build runs on one Jenkins machine, and then I do
> a manual promotion.  The manual promotion runs on a different machine than
> the build that I am promoting, so of course the directories and files
> constructed by the build do not exist on the second machine.  The promotion
> fails immediately as a result.
>
>
>
> How can I get the promotion to respect the host to run on?
>
>
>
> If I set the “Restrict where this promotion process can be run” checkbox,
> then the comment states that “If not set, the label of the promoted build
> will be used”, which is extremely poor wording that I interpret as it
> should stay on the same host as the build that I’m promoting.
> Unfortunately, it will not stick unless I enter a hostname, so it too is
> useless.  If I enter the matching hostname to the box that the build was
> run on, then it works, but realistically prevents me from using any slave
> machines.
>
>
>
> Is this multipole bugs in the Jenkins 1.612 promotion mechanism, or am I
> missing something?
>
> --
>
>
>
> --
>
> This e-mail and any attachments may contain confidential, copyright and or
> privileged material, and are for the use of the intended addressee only. If
> you are not the intended addressee or an authorised recipient of the
> addressee please notify us of receipt by returning the e-mail and do not
> use, copy, retain, distribute or disclose the information in or attached to
> the e-mail.
> Any opinions expressed within this e-mail are those of the individual and
> not necessarily of Diamond Light Source Ltd.
> Diamond Light Source Ltd. cannot guarantee that this e-mail or any
> attachments are free from viruses and we cannot accept liability for any
> damage which you may sustain as a result of software viruses which may be
> transmitted in or with the message.
> Diamond Light Source Limited (company no. 4375679). Registered in England
> and Wales with its registered office at Diamond House, Harwell Science and
> Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
>
>
> --
> 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 jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/6836E1DC2DDC174C9D64B7860E5AF5FC9EE11621%40EXCHMBX01.fed.cclrc.ac.uk
> <https://groups.google.com/d/msgid/jenkinsci-users/6836E1DC2DDC174C9D64B7860E5AF5FC9EE11621%40EXCHMBX01.fed.cclrc.ac.uk?utm_medium=email&utm_source=footer>
> .
>
>
> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> 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 jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CACPng9Z7B1aPuoxJZEK%3DRYsxVZLiND0FNFshRRLQHXoV3tSZgg%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CACPng9Z7B1aPuoxJZEK%3DRYsxVZLiND0FNFshRRLQHXoV3tSZgg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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 jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/03c2de1defc248a5b09ddeae7ce72dc2%40mbx01colo01p.esentire.local
> <https://groups.google.com/d/msgid/jenkinsci-users/03c2de1defc248a5b09ddeae7ce72dc2%40mbx01colo01p.esentire.local?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CA%2BnPnMw-%3DdaS27EZV7XaHd_6T82v_MM2mK9q%3Dd%2BPFrciRzZcVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to