[JIRA] (JENKINS-60236) git plugin does not apply remote setting changes to existing workspaces

31 views
Skip to first unread message

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

unread,
Nov 20, 2019, 6:53:03 PM11/20/19
to jenkinsc...@googlegroups.com
Mark Waite updated an issue
 
Jenkins / Bug JENKINS-60236
git plugin does not apply remote setting changes to existing workspaces
Change By: Mark Waite
Summary: git plugin remote url does not configurable apply remote setting changes to existing workspaces
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,
Nov 20, 2019, 6:54:03 PM11/20/19
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-60236
 
Re: git plugin does not apply remote setting changes to existing workspaces
I assume that you are using static agents and thus are reusing workspaces.  The git plugin is not sophisticated enough to apply the change of remote URL (or any other remote settings) to the existing workspace.  If that is the case, then you can temporarily modify the pipeline script to precede the {{checkout scm}} step with a {{deleteDir}} step.  That will erase the working repository in the workspace, it will then be cloned from the new URL and will write the new URL into the workspace.

Same problem exists when a job definition changes from using a shallow clone to not using a shallow clone, or from not using a reference repository to using a reference repository.  The git client plugin and the git plugin record state data about the repository in the workspace but do not force the repository in the workspace to match the current values of the plugin state data.

tbretz@power-werks.com (JIRA)

unread,
Nov 21, 2019, 9:45:03 AM11/21/19
to jenkinsc...@googlegroups.com

Mark Waite I can't reach the `deleteDir` step even though it is the first step, because I can't get passed the required parameters. I tried copying the pipeline into a new job and it was unable to read any configuration at all. 

No Git repository configured in SCM configuration or plugin is configured wrong

 

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

unread,
Nov 21, 2019, 9:57:02 AM11/21/19
to jenkinsc...@googlegroups.com

Tim Bretz that may indicate an issue in the git parameter plugin. Are you providing the repository URL as a parameter to the job? If so, then you might try redefining the job temporarily to not parameterize the repository URL, run it with the corrected URL, then add the repository URL parameter to the job again. There may be some internal storage of the repository URL in the git parameter plugin which is not being adjusted when you change the repository URL elsewhere.

tbretz@power-werks.com (JIRA)

unread,
Nov 21, 2019, 10:18:03 AM11/21/19
to jenkinsc...@googlegroups.com

Mark Waite The repository URL is only specified in the `scm` step and is not a paramter. Neither plugin has configurations available in the UI related to the remote URL. My only possible solution at this point is to change the IP of the new Bitbucket server, which amazes me that we can never change the IP because these plugins are not configurable on level beyond what is entered in the pipeline, and even then the configuration in the pipeline doesn't apply to the plugins.

tbretz@power-werks.com (JIRA)

unread,
Nov 21, 2019, 10:46:02 AM11/21/19
to jenkinsc...@googlegroups.com

deleting the workspace did not resolve this issue

Reply all
Reply to author
Forward
0 new messages