Pipeline Changes Page

18 views
Skip to first unread message

Quang Truong

unread,
Jun 19, 2019, 8:06:16 PM6/19/19
to Jenkins Users
Hi,

I have a problem on the multibranch pipeline when I change the Git repository server in the configuration and Jenkinsfile script, everything is fine except the Changes page points to the old repository server for all the links.

I have updated all configurations in job and system configuration to the new repository server but seems there is a hidden place that point to the old one.

I can't find many documents about this Changes page and how to have the data generated. Got a comment:

"Jenkins keeps local workspace for each job. After the first checkout, that workspace will be at certain SCM revision. Next time the job runs, it will compare local workspace revision to latest revision on server, and get a changelog that way"

But I can't figure out where the local workspace is located, because we use the build slave and cleanup the workspace on new build so this must be on the master

I found in the build.xml (in jobs/<jobname>/branches/<branchname>/builds/<buildnumber>

<org.jenkinsci.plugins.workflow.job.WorkflowRun_-SCMCheckout>
<scm class="hudson.plugins.git.GitSCM" plugin="g...@3.10.0">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>git@<new-repo-server>:<src-repo>.git</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>*/master</name>
</hudson.plugins.git.BranchSpec>
</branches>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<browser class="hudson.plugins.git.browser.GitLab">
<url>http://<old-repo-server>/<src-repo></url>
<version>8.6</version>
</browser>


Please help to give a hint.

PS: I found another note in Git plugin about the Repository Browser which set the links in Changes page but I don't see it in any of my job configuration. I'm using Jenkins 2.164.3 LTS and Git plugin 3.10.0

Thanks,
Quang



Quang Truong

unread,
Jun 19, 2019, 8:37:24 PM6/19/19
to Jenkins Users
I think I found the issue, don't know how to delete this thread so I update the root cause for anyone might encounter the same issue.

We use the checkout step in a shared lib with a hardcode of repository browser object to the old repo server

checkout(changelog: true, poll: true,
scm: [$class: 'GitSCM', branches: [[name: '*/' + branchName]],
browser: [$class: 'GitLab',
repoUrl: "<hardcode-repo>/$repoDirName",
version: '8.6'],
doGenerateSubmoduleConfigurations: false,
extensions: extensions,
submoduleCfg: [],
userRemoteConfigs: [[url: repoName]]
])

Hope this can help!




Reply all
Reply to author
Forward
0 new messages