MD.*_*hin 4 git jenkins jenkins-groovy
我想在 jenkins 中使用内联 groovy 脚本克隆 repo。如何执行 git clone 并使用 groovy 构建应用程序。
如果您使用 Jenkins 管道,请参阅官方文档中的示例,例如:
node {
stage('Clone sources') {
git url: 'https://github.com/jfrogdev/project-examples.git'
}
}
Run Code Online (Sandbox Code Playgroud)
对于简单的 Groovy 脚本,您可以尝试以下操作:
["git", "clone", "https://github.com/jfrogdev/project-examples.git"].execute()
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9309 次 |
| 最近记录: |