无法为某些詹金斯工作设置环境变量

时间:2021-07-05 09:55:12

标签: jenkins environment-variables

我尝试以不同的方式设置环境变量,但对我没有任何作用:

  1. 使用环境注入器插件:

enter image description here

  1. 使用 Shell Executor

enter image description here

  1. testng.xml 文件中:
https://api.mycompany-bitbucket.org/2.0/repositories/
  1. 使用 build.gradle 任务:
    <test name="Dashboard Resolution Test Chrome">
        <parameter name="SOME_ENV" value="DEV"/>
        <classes>
            <class name="tests.DashboardResolutionTest"/>
        </classes>
    </test>

在所有情况下,结果都是 task dashboard(type: Test) { System.setProperty("SOME_ENV", "deV") useTestNG() { suites './src/test/resources/testng/testng.xml' } }

null

我真的很困惑和困惑 - 为什么我不能设置环境变量?我错过了什么?

0 个答案:

没有答案