[JIRA] [git-plugin] (JENKINS-32998) add condition to the GIT clone/pull step

3 views
Skip to first unread message

gil@tikalk.com (JIRA)

unread,
Feb 17, 2016, 8:52:01 AM2/17/16
to jenkinsc...@googlegroups.com
Gil Shinar created an issue
 
Jenkins / New Feature JENKINS-32998
add condition to the GIT clone/pull step
Issue Type: New Feature New Feature
Assignee: Mark Waite
Components: git-plugin
Created: 17/Feb/16 1:51 PM
Priority: Minor Minor
Reporter: Gil Shinar

The thing is as follows:
I use building blocks, Jenkins jobs, that are usually being used by upstream jobs but I want them to be able to run on their own.
If I use the Git plugin step in the upstream project, it is no use to run this plugin's procedure again in the downstream job.
I would like to be able to pass a Boolean parameter from the upstream job to the downstream job that'll avoid the Git plugin's step, if the parameter evaluates to false. (It can, off course, be a string evaluation or any other comparison parameter or expression).

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

gil@tikalk.com (JIRA)

unread,
Feb 17, 2016, 9:17:01 AM2/17/16
to jenkinsc...@googlegroups.com
Gil Shinar updated an issue
Change By: Gil Shinar
The thing is as follows:
I use building blocks, Jenkins jobs, that are usually being used by upstream jobs but I want them to be able to run on their own  as well .

If I use the Git plugin step in the upstream project, it is no use to run this plugin's procedure again in the downstream job. 
I would like to be able to pass a Boolean parameter from the upstream job to the downstream job that'll avoid the Git plugin's step, if the parameter evaluates to false. (It can, off course, be a string evaluation or any other comparison parameter or expression). 

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 17, 2016, 10:15:02 AM2/17/16
to jenkinsc...@googlegroups.com
Mark Waite assigned an issue to Unassigned
Change By: Mark Waite
Assignee: Mark Waite

robertosena86@gmail.com (JIRA)

unread,
Feb 19, 2016, 2:14:01 PM2/19/16
to jenkinsc...@googlegroups.com
Roberto Sena commented on New Feature JENKINS-32998
 
Re: add condition to the GIT clone/pull step

I too would like to see a condition on the Git checkout. I currently have jobs that don't need to do a checkout every time. I would love to be able to handle that with a passed in parameter that I can check against rather than have separate jobs that check out, build, and deploy. and one job that wraps those to know which to do.

michael_giroux@choicehotels.com (JIRA)

unread,
Feb 24, 2016, 5:38:03 PM2/24/16
to jenkinsc...@googlegroups.com

Perhaps the Git plugin is overkill for this type of job. Have you considered setting SCM to none and using a simple build step to execute a shell script that tests the parameter, and does the checkout as appropriate?

[ "$

{parameter}

" = "checkout" ] && git checkout ...

gil@tikalk.com (JIRA)

unread,
Mar 6, 2016, 4:52:05 AM3/6/16
to jenkinsc...@googlegroups.com

Problem is Git plugin does many things that "protect" you from whatever exists in the workspace at the moment the clone/pull occurs and I want that "protection"

sebastien.bonami@gmail.com (JIRA)

unread,
Apr 20, 2018, 9:50:04 AM4/20/18
to jenkinsc...@googlegroups.com

Any news on this? I would also like this.

This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

andersbergsten@yahoo.se (JIRA)

unread,
Jun 8, 2019, 8:02:03 AM6/8/19
to jenkinsc...@googlegroups.com

I'm very interested in such a feature. I have a Jenkins project that starts twelve downstream projects where each clones the same Git repo. That adds time to the build process and wastes disk space. It would be awesome if all twelve downstream projects could make use of the Git repo already cloned by the parent project. The catch here is that it must be possible to build each downstream project separately where it first deletes the workspace and clones the Git repo. I am keeping my fingers crossed this ticket is prioritized.

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
Reply all
Reply to author
Forward
0 new messages