問題描述
分佈式 Jenkins ‑ Linux 上的主控和 Windows 上的從屬 ‑ 如何配置節點特定設置 (Distributed Jenkins‑ Master on Linux and slave on windows‑ How to configure node specific setting)
This is background for my question.
I have setup distributed Jenkins where the master is running in RHEL linux box and slave is running on a windows box. I did not have any problem in registering the slave node to the master.
In master Jenkins, under manage Jenkins page, I have provided the maven path detail corresponds to master (/opt/maven3).
Now I have create maven2/3 job and assigned the job exclusively on slave node. But when slave is running the maven job on windows, it is taking the maven path installed the master (/opt/maven3), since this path is not valid in windows, throws up an error.
I tried to override the value with pre‑build steps, setting M2_HOME and PATH environment entries. but in vein.
So in simple term, How do I configure the node specific settings in Jenkins?
Mean I want to specify in Node 1‑ Maven path is XXX/maven3 and in node‑2 maven path is yyy/zzz/maven3.
‑‑‑‑‑
參考解法
方法 1:
Override the settings as follows: System Management ‑> Node Management ‑> your slave setting ‑> Node Properties ‑> check the Tools Locations ‑> Add , then set the slave maven option,alias select "maven",directory write with the slave maven directory. you can try it.
(by Chetan、FireCrab Lee)