Jenkins Slave Environment Variable Refresh

前端 未结 4 1573
感情败类
感情败类 2021-01-17 12:51

I have a Jenkins Slave (A Windows PC) which has the JAVA_HOME environment variable. I updated the Java version on the Slave so I also updated the Environment Va

4条回答
  •  庸人自扰
    2021-01-17 13:05

    You can update your Jenkins version, it will solve it. Otherwise this worked for me (Jenkins 1.6, build/test node: MacOSX Mojave):

    First install java 8 in your build/test node using the commands:

    brew update
    brew cask install caskroom/versions/java8
    

    Then in Jenkins web panel click on your build/test node, then click on Configure and then click in the Advanced... button, this will show you multiple text fields. Then in the JavaPath field add the path to your java 8.

    For me this path is like:

    /Library/Java/JavaVirtualMachines/jdk1.8.X_XXX.jdk/Contents/Home/bin/java

    Note: remember replace X_XXX with your java 8 version before.

    Then Save.

    After that disconnect the build/test node and connect it again. This should solve the problem.

    Source

提交回复
热议问题