我只是从 Jenkins 开始,似乎无法使其正常工作。我在存储库的根目录中创建了一个名为“Jenkinsfile”的文本文件,但是当我尝试建立文件时,出现错误“找不到'Jenkinsfile'不符合条件”。这是完整的Jenkins输出:

Started by user Joshua Fishman [Thu Jul 20 11:44:10 EDT 2017]
Starting  branch indexing...
git.exe rev-parse --is-inside-work-tree # timeout=10 Setting origin to C:\Users\JoshuaF\git\<some_repo>
git.exe config remote.origin.url C:\Users\JoshuaF\git\<some_repo># timeout=10 Fetching origin...
Fetching upstream changes from origin
git.exe --version #timeout=10
git.exe fetch --tags --progress origin
+refs/heads/*:refs/remotes/origin/*
git.exe ls-remote --symref C:\Users\JoshuaF\git\<some_repo> # timeout=10
git.exe rev-parse --is-inside-work-tree # timeout=10 Setting origin to C:\Users\JoshuaF\git\<some_repo>
git.exe config remote.origin.url C:\Users\JoshuaF\git\<some_repo># timeout=10
Fetching & pruning origin...
Fetching upstream changes from origin
git.exe --version # timeout=10
git.exe fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* --prune
Getting remote branches...
Seen branch in repository origin/master
Seen 1 remote branch

Checking branch master
      'Jenkinsfile' not found
    Does not meet criteria
Processed 1 branches [Thu Jul 20 11:44:11 EDT 2017]
Finished branch indexing. Indexing took 0.68 sec
Finished: SUCCESS

这是我的存储库:git - 找不到Jenkinsfile-LMLPHP

对此完全陌生,因此,我感谢您的帮助。

最佳答案

可能是'.txt'扩展名的问题:Jenkins正在寻找没有扩展名的'Jenkinsfile'。 git mv Jenkinsfile.txt Jenkinsfile && git commit将重命名该文件。

关于git - 找不到Jenkinsfile,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/45219849/

10-14 06:03