jenkins - Jenkinsfile 声明式管道:在阶段步骤中签出另一个 repo
问题描述
我的 Jenkinsfile 位于存储库“A”中,我要在存储库“B”中签出一个存储库。这样做的正确方法是什么?
这就是我目前的做法,但它不起作用:
stage("Checkout my repo repo ") {
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']],
extensions: [[$class: 'RelativeTargetDirectory',
relativeTargetDir: 'copy-repo-here']],
userRemoteConfigs: [[credentialsId: 'my-creds',
url: 'git@github.com:my-git-repo.git']]])
}
}
任何帮助表示赞赏!
解决方案
推荐阅读
- node.js - 为什么 ts-node index.ts 不起作用,但 ts-node 通过 npm run 起作用?
- python - 数据框嵌套字典到多索引数据框
- javascript - 如何使用 JavaScript 替换 span 标签内的属性?
- python - 而将sql查询转换为json得到错误的输出
- python - Scrapy/Selenium - driver.get_cookies() 返回错误的 cookie(对于与 start_urls 不同的 url)
- flutter - 为什么缺少 awsconfiguration.json 文件?
- python - 如何运行具有特定持续时间的函数?
- javascript - 同一页面中两个元素之间的链接不起作用
- python - 连接到 Python websockets 时出现 Ktor MalformedInputException
- python - 从 Google 云存储桶运行 Eleuther AI GPT 模型