ask for files before build

15 views
Skip to first unread message

niraj nandane

unread,
Oct 15, 2014, 8:45:38 AM10/15/14
to jenkins...@googlegroups.com
My scenario is as follows..
I checkout the code in scm step. Then before going to build step i want a file opener popup which will read a file on my harddisk and copy into jobs workspace.This will allow me to check the build before checking in the changes in scm repository. I know there is plugin called "copy-to-slave" but we need to give abolute path instead i want a file opener which will show UI to choose a file.
Any help would be greatly appreciated

Mark Waite

unread,
Oct 15, 2014, 8:53:43 AM10/15/14
to jenkins...@googlegroups.com
There isn't a way to prompt for a file to be copied during the build, but maybe you could consider the File parameter from a parameterized build so that the person who starts the job can upload the file as part of starting the job.


Mark Waite

--
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-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks!
Mark Waite

niraj nandane

unread,
Oct 15, 2014, 9:03:47 AM10/15/14
to jenkins...@googlegroups.com
Thanks Mark, this can help me but if there could any plugin as my requirement would be great

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/p7wU_66T76M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Thanks and regards--
Niraj Nandane(Vit pune)

Matthew...@diamond.ac.uk

unread,
Oct 15, 2014, 9:11:53 AM10/15/14
to jenkins...@googlegroups.com

You can’t prompt for a file in a build step, since at that point there is no user to ask! The jobs is already running.

If you want to prompt a user, then the  only point it makes sense to do that is when the job is started – Mark’s suggestion tells you how to do that.

 

Perhaps you can explain more what you are trying to achieve here. Do you want to test changes before they are checked in? Or something else? What’s in the file you want the user to upload?

 

Matthew

From: niraj nandane [mailto:niraj....@gmail.com]
Sent: 15 October 2014 14:03
To: jenkins...@googlegroups.com
Subject: Re: ask for files before build

 

Thanks Mark, this can help me but if there could any plugin as my requirement would be great

 

On Wed, Oct 15, 2014 at 6:23 PM, Mark Waite <mark.ea...@gmail.com> wrote:

There isn't a way to prompt for a file to be copied during the build, but maybe you could consider the File parameter from a parameterized build so that the person who starts the job can upload the file as part of starting the job.

 

 

Mark Waite

 

On Wed, Oct 15, 2014 at 6:45 AM, niraj nandane <niraj....@gmail.com> wrote:

My scenario is as follows..
I checkout the code in scm step. Then before going to build step i want a file opener popup which will read a file on my harddisk and copy into jobs workspace.This will allow me to check the build before checking in the changes in scm repository. I know there is plugin called "copy-to-slave" but we need to give abolute path instead i want a file opener which will show UI to choose a file.
Any help would be greatly appreciated




 

-- 

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
 


corneil....@gmail.com

unread,
Oct 15, 2014, 10:15:09 AM10/15/14
to jenkins...@googlegroups.com
It looks to me like you want to verify build before checkin. Aren't you able to run the build locally?

Jenkins in conjunction with git can reject pull-requests if the build fails. https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin


Some other CI tools have support for a sandbox build that uses changes from your environment against a selected build and version on server. I am not sure that there is a Jenkins plugin that does this.



niraj nandane

unread,
Oct 15, 2014, 2:36:35 PM10/15/14
to jenkins...@googlegroups.com

Yes i want to check changes before checkin

Les Mikesell

unread,
Oct 15, 2014, 3:20:06 PM10/15/14
to jenkinsci-users
On Wed, Oct 15, 2014 at 1:36 PM, niraj nandane <niraj....@gmail.com> wrote:
> Yes i want to check changes before checkin
>

Can't you just do a build on your local machine where you are doing
the work? Why does jenkins need to be involved at this point? Or
alternatively, why not commit to a branch that won't affect others for
a jenkins build and only merge the work if the build succeeds?

--
Les Mikesell
lesmi...@gmail.com

Patricia Wright

unread,
Oct 15, 2014, 5:22:40 PM10/15/14
to jenkinsci-users
Here is how we accomplish this.

We have a master job that runs all tests.
That job gets called one of two ways:
We have done this, but it has repercussions for every job out there.
It's probably more complicated than you'd think.

A high level overview, is that we have a master job that calls all of the tests.

This master job is called one of two ways:
* the standard revision control polling compile job. (Normal continuous integration)

* a user form, where someone can specify the location of the uncommitted changes. we call these "sandbox builds"
the sandbox test job downloads the results of the users changes and injects them into the system with the additional parameters so that we can tell difference between normal tests and sandbox tests. (a user can also pick a smaller subset of these tests)

We've done extensive reporting modifications so that jobs with "SANDBOX=True" as a parameter are ignored as part of normal reporting, and i've set it such that developers do not get emails when 'sandbox job' tests fail - only the submitter of the original sandbox job does instead.

We typically use this for major changes to the code base rather than run-of-the mill features and fixes.

The other option is to make a second Jenkins environment, but then you have to sync the tests, and have more (virtual) hardware utilization.. Pick your poison.

________________________________________
From: jenkins...@googlegroups.com <jenkins...@googlegroups.com> on behalf of Les Mikesell <lesmi...@gmail.com>
Sent: Wednesday, October 15, 2014 3:19 PM
To: jenkinsci-users


Subject: Re: ask for files before build

On Wed, Oct 15, 2014 at 1:36 PM, niraj nandane <niraj....@gmail.com> wrote:

--
Les Mikesell
lesmi...@gmail.com

--


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-use...@googlegroups.com.
For more options, visit https://urldefense.proofpoint.com/v1/url?u=https://groups.google.com/d/optout&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=P%2FDbhm7GMaM%2FtPTZjlK%2F8lebpERVSZcf2B%2BqCod7tGs%3D%0A&m=HB4AAmkSIupknPm8QxNq4Q%2FCpcaIbYMUiPHi7aNpAE0%3D%0A&s=55a38c84d9a3218b0b75b727284f89856bc630ab8cc048fe1abb4ad644140b12.

niraj nandane

unread,
Oct 16, 2014, 1:45:32 AM10/16/14
to jenkins...@googlegroups.com
Hi  Patricia,
We are also looking the same solution.
Can you please let us know how you have achieved below task:
1. How you are making sandbox=true builds ,which plugins you are using to achieve this?
2."a user can also pick a smaller subset of these tests" how you have achieve this?
If possible can you share jenkins project snapshots and configuration details.

Thanks in advance.



--

You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/p7wU_66T76M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages