This documentation is for a release that is no longer maintained
See documentation for the latest supported version.4.2. 修改 Jenkins 管道以使用内置库
流程
- 导航到 Jenkins CI 源存储库,例如 https://github.com/redhat-appstudio/tssc-sample-templates/blob/main/skeleton/ci/source-repo/jenkins。
-
在编辑模式中选择
Jenkinsfile。 将动态库加载替换为
@Library注释。Expand 替换它 使用这个 库标识符: 'RHTAP_Jenkins@main', retriever: modernSCM ([$class: 'GitSCMSource', remote: 'https://github.com/redhat-appstudio/tssc-sample-jenkins.git'])
@Library('RHTAP_Jenkins@v1.4') _
- 保存并提交更新的 Jenkinsfile。