gradle - 从 Jenkinsfile 中的不同 git repo 运行任务
问题描述
在我的项目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/
推荐阅读
- php - 使用 Lumen / Laravel 进行 PUT、DELETE 重定向
- android - 通过 android 媒体播放器在本机原生模块中播放媒体时只有音频听不见视频
- python - 操作 .dat 文件,pickle mod
- numpy - num_days=int((end_dt-start_dt)/np.timetable64(1,'D')) 是什么意思?为什么函数 np.timetable 的末尾有 64?
- javascript - 来自哪个版本的 ECMA 存在事件 ONINPUT?
- python - 如何构建符合 PEP384 的 Python 扩展模块并使用正确的 ABI3 标签打包它?
- python - 从 html 中的 python (bokeh) 中删除列标题
- c++ - Arduino Pin 4 connected to keypad alsways HIGH resulting in not working keypad
- sql - 具有不同架构的 Oracle Text ctx_ddl.sync_index
- python - 计数器不更新值