Jenkins SYSTEM user removes custom workspace configuration

流过昼夜 提交于 2019-12-10 10:47:36

问题


I have a job NightlyTest-Winx64 configured to use the customWorkspace D:\builds\build-dir\Quick-Winx64-Trunk.

Quick-Winx64-Trunk is a job in Jenkins that will checkout the source repository, compile, archive some artifacts and then trigger the NightlyTest-Winx64 job. It triggers NightlyTest-Winx64 to run on the same node using the same workspace so that we're not checking out and compiling twice and only need to run test.

On the first run of the NightlyTest-Winx64 the customWorkspace exist and is used as expected. However during this first run the SYSTEM user removes the customWorkspace configuration from the job. As a result all subsequent builds of NightlyTest-Winx64 will run in the default workspace which is incorrect.

Has anyone encountered this behavior before and why is the SYSTEM user changing my job configuration?


回答1:


It was a conflict between two of the plugins I was using to trigger the Nightly using the workspace of the Quick.

Previous Configuration:

  • Trigger parameterized build from Quick with Node name as parameter (Parameterized Trigger Plugin) https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Trigger+Plugin
  • On Nightly expect one parameter node and set customWorkspace to that of the quick
  • Under Build Environment select Run on same node as.. and share same workspace (Node Stalker Plugin) https://wiki.jenkins-ci.org/display/JENKINS/Node+Stalker+Plugin

Node stalker was acting as the SYSTEM user and making the configuration changes. Using both of the above plugins was redundant and as a result caused the conflict.

New Configuation:

  • Trigger build from quick with no parameters (built into Jenkins)
  • Use the Node stalker plugin to grab the correct node and workspace for the Nightly


来源:https://stackoverflow.com/questions/34316773/jenkins-system-user-removes-custom-workspace-configuration

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