gpt4 book ai didi

git - 创建管道时定义jenkinsfile脚本路径

转载 作者:行者123 更新时间:2023-12-02 20:23:17 27 4
gpt4 key购买 nike

我想从 github checkout 我的存储库。我创建了一个管道并选择这是我遵循的步骤

  1. 点击 jenkins 主页上的新项目
  2. 输入名称并选择管道表单列表
  3. 管道下,我选择定义为来自 SCM 的管道脚本
  4. 选择SCM作为GIT
  5. 存储库下输入带有凭据的存储库网址
  6. 要构建的分支下,按分支输入*/my_branch_here enter image description here

现在jenkis文件不属于根目录。有没有办法使用jenkins UI导航到该目录

最佳答案

来自 Jenkins 网站,

In the Script Path field, specify the location (and name) of your Jenkinsfile. This location is the one that Jenkins checks out/clones the repository containing your Jenkinsfile, which should match that of the repository’s file structure. The default value of this field assumes that your Jenkinsfile is named "Jenkinsfile" and is located at the root of the repository.

Jenkinsfile 应提交给 SCM,并将 Jenkinsfile 的相对路径放在 SCM 存储库根目录中。请注意名称(Jenkinsfile 或 JenkinsFile)!

关于git - 创建管道时定义jenkinsfile脚本路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50719842/

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