[JIRA] (JENKINS-53754) svn, git plugin have different interfaces, and not good pipeline documentation

4 views
Skip to first unread message

rupert.thurner@credit-suisse.com (JIRA)

unread,
Sep 24, 2018, 2:58:02 PM9/24/18
to jenkinsc...@googlegroups.com
rupert je thurner created an issue
 
Jenkins / Improvement JENKINS-53754
svn, git plugin have different interfaces, and not good pipeline documentation
Issue Type: Improvement Improvement
Assignee: Mark Waite
Components: git-plugin, subversion-plugin
Created: 2018-09-24 18:57
Priority: Minor Minor
Reporter: rupert je thurner

the subversion plugin supports multiple roots and sets variables like SVN_REVISION_1. the git-plugin does the same and sets GIT_COMMIT. the suversiom-plugin sets SVN_URL_1, the git plugin sets GIT_URL, or GIT_URL_1 for the first one, depending how many there are.  there is a request JENKINS-34271 to add GIT_COMMIT_n to the git plugin, which was closed with "use pipeline plugin", without referring to more details.

it would be great to make this consistent. and document it so it can be found easily.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

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

unread,
Sep 24, 2018, 2:59:01 PM9/24/18
to jenkinsc...@googlegroups.com

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

unread,
Sep 24, 2018, 3:05:02 PM9/24/18
to jenkinsc...@googlegroups.com
Mark Waite commented on Improvement JENKINS-53754
 
Re: svn, git plugin have different interfaces, and not good pipeline documentation

Refer to the following resources for additional information on the results of a checkout:

rupert.thurner@credit-suisse.com (JIRA)

unread,
Sep 24, 2018, 3:13:03 PM9/24/18
to jenkinsc...@googlegroups.com

rupert.thurner@credit-suisse.com (JIRA)

unread,
Sep 24, 2018, 3:14:02 PM9/24/18
to jenkinsc...@googlegroups.com
rupert je thurner commented on Improvement JENKINS-53754
 
Re: svn, git plugin have different interfaces, and not good pipeline documentation

thank you so much for the documentation. there is nothing on how to check out 2 git urls and use the variables?

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

unread,
Sep 24, 2018, 3:21:01 PM9/24/18
to jenkinsc...@googlegroups.com

There is nothing on how to checkout two git URLs and use the variables.

If two different Git URL's are being used from within a single Pipeline job then each checkout must be performed in a separate subdirectory with a separate checkout command performed for each repository. The git plugin does not support mixing checkouts from two unrelated repositories in the same working directory.

rupert.thurner@credit-suisse.com (JIRA)

unread,
Sep 24, 2018, 4:09:02 PM9/24/18
to jenkinsc...@googlegroups.com

ah, that is really interesting and seems powerful. i saw :

i saw that one has "scm", "currentBuild". how would you get the author, and commit-id ? how would you put an example of such a deploy snipped if you have another jenkinsfile which is loaded, containing e.g. deploy scripts?

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

unread,
Sep 24, 2018, 4:46:01 PM9/24/18
to jenkinsc...@googlegroups.com

The Jenkins Minute video shows how to use the GIT_COMMIT environment variable. Other environment variables are available with a similar technique.

Scripted Pipeline can use the return value of the checkout step as a map which contains the environment variables for that checkout.

Other variables are included in the JENKINS-45489 test case.

A simpler example is in the JENKINS-50401 test case.

A different example is in the JENKINS-51218 test case.

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

unread,
Sep 25, 2018, 6:51:10 AM9/25/18
to jenkinsc...@googlegroups.com

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

unread,
Nov 27, 2019, 6:22:01 PM11/27/19
to jenkinsc...@googlegroups.com
Mark Waite resolved as Won't Fix
 

Won't attempt to make the git plugin consistent with Subversion plugin because it risks breaking too many existing users.

Change By: Mark Waite
Status: Open Resolved
Resolution: Won't Fix
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

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

unread,
Nov 27, 2019, 6:23:02 PM11/27/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages