Disable changelog in Jenkins pipeline checkout

橙三吉。 提交于 2020-12-09 23:07:15

问题


I have a Jenkins pipeline that checks out specific commits from several different repos. I would like to disable the calculation of the changeSet (changelog) since the /api/json call to the job takes a long time to compute (and the changelog is not important for that job in any case).

In the pipeline I'm checking out the code with:

checkout([$class: 'GitSCM',
branches: [[name: commitHash]],
doGenerateSubmoduleConfigurations: false,
submoduleCfg: [],
changelog: false,
poll: false,
userRemoteConfigs: [[url: gitUrl]]])

I thought that setting changelog to false would prevent that, but when I call the /api/json page for the job I can still see the changeSet populated.

What am I missing?

UPDATE

Just to be clear, the change logs I see for that job are related to all the jobs I'm checking out with the code above within the pipeline. I don't mind to have the changelog of the git repository where the Jenkinsfile is checked out from, but I don't want to include the changelogs of all the projects checked out as part of the pipeline stages.

Does the lightweight checkout mode in the pipeline configuration has anything to do with it?

来源:https://stackoverflow.com/questions/56731950/disable-changelog-in-jenkins-pipeline-checkout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!