如何在jenkins中传递testng.xml文件作为参数并运行该特定的testng.xml文件。

问题描述 投票:0回答:1

我想把testing.xml文件作为参数传给jenkins,然后运行那个特定的testing.xml文件。

jenkins jenkins-pipeline testng
1个回答
0
投票

为了处理存储在仓库外的属性文件,你有一个名为"配置文件提供者插件".

它能够替换json和xml中的tokens或整个文件。

stage('Add Config files') {
        steps {
            configFileProvider([configFile(fileId: 'ID-of-file0in-jenkins', targetLocation: 'path/destinationfile')]) {
            // some block
            }
        }
}
© www.soinside.com 2019 - 2024. All rights reserved.