gpt4 book ai didi

gradle - 从Jenkinsfile中的其他git repo运行任务

转载 作者:行者123 更新时间:2023-12-03 05:41:09 24 4
gpt4 key购买 nike

在我的项目Jenkinsfile中,我需要克隆另一个github存储库,并运行特定任务。这是我正在尝试的:

stage ('mystage') {
dir('foo') {
git url: 'https://github.com/something.git'
}
sh('cd foo')
sh('gradle taskname')
}

git repo克隆工作正常。但是我无法执行任何任务。我得到一个错误
11:23:16 > Failed to apply plugin [id 'org.gradle.java']
11:23:16 > No version strategies were selected. Run build with --info for more detail.

我该如何克服?

最佳答案

我可以使用管道中的build选项解决此问题:https://jenkins.io/doc/pipeline/steps/pipeline-build-step/

关于gradle - 从Jenkinsfile中的其他git repo运行任务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52923247/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com