[JIRA] (JENKINS-59829) GitSCM Unable to Pull Pipeline script from SCM from Google Cloud Source Repository

20 views
Skip to first unread message

kmjackson788@gmail.com (JIRA)

unread,
Oct 17, 2019, 2:20:03 PM10/17/19
to jenkinsc...@googlegroups.com
Kyle Jackson created an issue
 
Jenkins / Bug JENKINS-59829
GitSCM Unable to Pull Pipeline script from SCM from Google Cloud Source Repository
Issue Type: Bug Bug
Assignee: Mark Waite
Attachments: Screen Shot 2019-10-17 at 2.03.44 PM.png
Components: git-plugin
Created: 2019-10-17 18:19
Priority: Blocker Blocker
Reporter: Kyle Jackson

Ever since Monday night 10/14/19 i have not been able to successfully pull "Pipeline script from SCM" from Google's Cloud Source Repository.
I am able to pull it down with a normal clone (just not the pipeline script)
I have been debugging this for 4 days and finally arrived at this solution.
If i change the repo to a public GitHub repo it works.
Im wondering if this helps me or not.. i also opened up a case with google.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

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

unread,
Oct 17, 2019, 2:51:02 PM10/17/19
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-59829
 
Re: GitSCM Unable to Pull Pipeline script from SCM from Google Cloud Source Repository

Did you recently update your Jenkins git plugin version?

I just created a google cloud repository using my Google account and connected it to the GitHub repository of the Jenkins git client plugin. I can list the remote branches in the repository but when I try to clone the repository, it complains fails to clone because my Google ID in the repository URL is 'mark.ea...@gmail.com' and the Jenkins git client plugin seems to incorrectly URL escape the '@' sign in the URL.

Google cloud shows that the clone command I should use is:

git clone ssh://mark.ea...@gmail.com@source.developers.google.com:2022/p/jenkins-plugins-markewaite/r/github_markewaite_git-client-plugin

Notice how there are two embedded '@' characters in the clone command. One is from my e-mail address, while the other is used to separate the username from the hostname in the ssh URL.

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

unread,
Oct 17, 2019, 2:52:01 PM10/17/19
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-59829
Did you recently update your Jenkins git plugin version?

I just created a google cloud repository using my Google account and connected it to the GitHub repository of the Jenkins git client plugin.  I can list the remote branches in the repository but when I try to clone the repository, it complains and fails to clone because my Google ID in the repository URL is 'mark.ea...@gmail.com' and the Jenkins git client plugin seems to incorrectly URL escape the '@' sign in the URL.


Google cloud shows that the clone command I should use is:

{{git clone ssh://mark.ea...@gmail.com@source.developers.google.com:2022/p/jenkins-plugins-markewaite/r/github_markewaite_git-client-plugin}}

Notice how there are two embedded '@' characters in the clone command.  One is from my e-mail address, while the other is used to separate the username from the hostname in the ssh URL.

kmjackson788@gmail.com (JIRA)

unread,
Oct 17, 2019, 2:57:03 PM10/17/19
to jenkinsc...@googlegroups.com

kmjackson788@gmail.com (JIRA)

unread,
Oct 17, 2019, 2:59:03 PM10/17/19
to jenkinsc...@googlegroups.com
Kyle Jackson commented on Bug JENKINS-59829
 
Re: GitSCM Unable to Pull Pipeline script from SCM from Google Cloud Source Repository

Hey Mark,

I had this working with g...@3.9.3 and it broke. I upgraded to 3.12.1 with the same issue.

flow.xml

I believe this issue is using a service account to access the GSR. Using a personal account is not the issue though it would be good to validate that as well.

For the "pipeline  script from scm", how would you use a private json key with the method you describe?

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

unread,
Oct 17, 2019, 3:09:02 PM10/17/19
to jenkinsc...@googlegroups.com

Since there was no change in git plugin between the working and the non-working case, I assume you'll need to work with Google Cloud support to identify and resolve the issue.

My experiments with Google Cloud to host a git repository seem to indicate that the Jenkins git plugin will need some additional work to better support Google Cloud Source Repositories. There seem to be several surprises in the initial tests that I've performed.

kmjackson788@gmail.com (JIRA)

unread,
Oct 17, 2019, 3:17:03 PM10/17/19
to jenkinsc...@googlegroups.com

kmjackson788@gmail.com (JIRA)

unread,
Oct 18, 2019, 8:04:03 PM10/18/19
to jenkinsc...@googlegroups.com

From: Google

I've discovered that a recent Jenkins update to their LTS version deprecated an API that breaks the google-source-plugin [1]. The API that they deprecated breaks the plugin here [2] which can't call getInstance() anymore.

A workaround for the moment is to switch to GIT or some other compatible SCM for the time being until a fix can be rolled out that is compatible with the LTS release of Jenkins. Another workaround would be to rollback Jenkins to jenkins:2.182, the last known release where the API was functioning as expected.

Let me know if there is anything else I can help you with.

[1] https://github.com/jenkinsci/google-source-plugin/pull/9 [github.com]
[2] https://github.com/jenkinsci/google-source-plugin/pull/9/files#diff-ae66052e7782a54371071f2fbacbd1faR146 [github.com]

kmjackson788@gmail.com (JIRA)

unread,
Oct 18, 2019, 8:05:02 PM10/18/19
to jenkinsc...@googlegroups.com

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

unread,
Jan 8, 2020, 6:54:02 AM1/8/20
to jenkinsc...@googlegroups.com
Mark Waite updated an issue
Change By: Mark Waite
Component/s: google-source-plugin
Component/s: git-plugin

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

unread,
Jan 8, 2020, 6:55:04 AM1/8/20
to jenkinsc...@googlegroups.com
Mark Waite updated Bug JENKINS-59829
 

Pull requests referenced in previous comment were merged and released in google source plugin 0.4. Assumed that resolves this issue.

Change By: Mark Waite
Status: Fixed but Unreleased Closed
Reply all
Reply to author
Forward
0 new messages