Jenkins管道失败但没有错误?

Jenkins管道失败但没有错误?,jenkins,github,continuous-integration,jenkins-pipeline,jenkins-plugins,Jenkins,Github,Continuous Integration,Jenkins Pipeline,Jenkins Plugins,我有下面的管道脚本,它似乎在某个时候失败了。CredentialId是正确的,github URL是正确的,dotnet的路径是正确的,我99%确信语法是正确的,因为输出(下面)正确读取了我的脚本。所以,我只是想知道我是不是做错了什么 我以前从未使用过Jenkins或任何CI/CD工具,所以这对我来说都是全新的 我满怀希望的目标是能够让Jenkins在每次与master合并时构建并运行.NET应用程序,但我只是想让它每小时成功构建一次,或者只是在Jenkins中单击build Now时让它成功构

我有下面的管道脚本,它似乎在某个时候失败了。CredentialId是正确的,github URL是正确的,dotnet的路径是正确的,我99%确信语法是正确的,因为输出(下面)正确读取了我的脚本。所以,我只是想知道我是不是做错了什么

我以前从未使用过Jenkins或任何CI/CD工具,所以这对我来说都是全新的

我满怀希望的目标是能够让Jenkins在每次与master合并时构建并运行.NET应用程序,但我只是想让它每小时成功构建一次,或者只是在Jenkins中单击build Now时让它成功构建

(另外,如果有一种简单的方法可以修改我的脚本,使其与每个主合并一起运行,而不是每小时运行,那将非常有用!)

这给了我以下输出:

Running in Durability level: MAX_SURVIVABILITY
[Pipeline] Start of Pipeline
[Pipeline] node
Running on Jenkins in C:\WINDOWS\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\JenkinsPipeline
[Pipeline] {
[Pipeline] withEnv
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Checkout)
[Pipeline] git
The recommended git tool is: NONE
using credential 0b02e39b-17f0-4628-ba3d-24146ec7a469
 > git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git.exe config remote.origin.url https://github.com/bellingboe/OktaKenkinsCI.git # timeout=10
Fetching upstream changes from https://github.com/bellingboe/OktaKenkinsCI.git
 > git.exe --version # timeout=10
 > git --version # 'git version 2.29.2.windows.3'
using GIT_ASKPASS to set credentials 
 > git.exe fetch --tags --force --progress -- https://github.com/bellingboe/OktaKenkinsCI.git +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10
 > git.exe rev-parse "origin/master^{commit}" # timeout=10
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Restore packages)
Stage "Restore packages" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Clean)
Stage "Clean" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Build)
Stage "Build" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Finished: FAILURE

我的剧本有什么地方不对吗?我真的不知道什么会失败,因为我根本看不到任何错误。

我找到了答案。我的主分支在github中被命名为“main”


我有一个打字错误

我看到底部有个错误<代码>错误:找不到任何要生成的修订。验证此作业的存储库和分支配置。Oh。呵呵。我甚至不知道这意味着什么,或者如何修复它,因为回购协议就在那里——Jenkins打字错误(Kenkins)等等。关于触发器,我相信它可以在Jenkins中配置,以便在提交时运行。但我记不起细节,现在也不用詹金斯了。也许是在配置一个多分支项目时,比如:)我很高兴你能弄明白这一点,但不幸的是,基于拼写错误的答案属于堆栈溢出关闭的类别。正是我的情况。谢谢Brenden Ellingboe
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] Start of Pipeline
[Pipeline] node
Running on Jenkins in C:\WINDOWS\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\JenkinsPipeline
[Pipeline] {
[Pipeline] withEnv
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Checkout)
[Pipeline] git
The recommended git tool is: NONE
using credential 0b02e39b-17f0-4628-ba3d-24146ec7a469
 > git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git.exe config remote.origin.url https://github.com/bellingboe/OktaKenkinsCI.git # timeout=10
Fetching upstream changes from https://github.com/bellingboe/OktaKenkinsCI.git
 > git.exe --version # timeout=10
 > git --version # 'git version 2.29.2.windows.3'
using GIT_ASKPASS to set credentials 
 > git.exe fetch --tags --force --progress -- https://github.com/bellingboe/OktaKenkinsCI.git +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10
 > git.exe rev-parse "origin/master^{commit}" # timeout=10
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Restore packages)
Stage "Restore packages" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Clean)
Stage "Clean" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Build)
Stage "Build" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Finished: FAILURE