Как сказать Дженкинсу отказаться от создания определенного SHA?

Я использую Jenkins с Git SCM для сборки проекта на GitHub. Я сказал ему создать ветку, которая была принудительно вытеснена, и теперь моя сборка терпит неудачу, потому что каждый раз, когда она запускается, она пытается собрать фиксацию, которой больше нет на пульте дистанционного управления:

19:30:31 Started by user admin
19:30:31 Building in workspace /Users/Shared/Jenkins/Home/workspace/myproject
19:30:31 [WS-CLEANUP] Deleting project workspace...
19:30:31 [WS-CLEANUP] Done
19:30:31 [ssh-agent] Looking for ssh-agent implementation...
19:30:31 [ssh-agent]   Java/JNR ssh-agent
19:30:31 [ssh-agent] Skipped registering BouncyCastle, not running on a remote agent
19:30:31 [ssh-agent] Started.
19:30:31 [ssh-agent] Using credentials git (id_rsa)
19:30:31 Cloning the remote Git repository
19:30:31 Using shallow clone
19:30:31 Avoid fetching tags
19:30:31 Cloning repository https://github.com/myorg/myproject.git
19:30:31  > git init /Users/Shared/Jenkins/Home/workspace/myproject # timeout=10
19:30:31 Fetching upstream changes from https://github.com/myorg/myproject.git
19:30:31  > git --version # timeout=10
19:30:31 using GIT_ASKPASS to set credentials Jenkins GitHub login
19:30:31  > git fetch --no-tags --progress https://github.com/myorg/myproject.git +refs/heads/*:refs/remotes/origin/* --depth=1
19:30:43  > git config remote.origin.url https://github.com/myorg/myproject.git # timeout=10
19:30:43  > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
19:30:43  > git config remote.origin.url https://github.com/myorg/myproject.git # timeout=10
19:30:43 Fetching upstream changes from https://github.com/myorg/myproject.git
19:30:43 using GIT_ASKPASS to set credentials Jenkins GitHub login
19:30:43  > git fetch --no-tags --progress https://github.com/myorg/myproject.git +refs/heads/*:refs/remotes/origin/* --depth=1
19:30:44 Seen branch in repository origin/master
19:30:44 Seen branch in repository origin/stable
19:30:44 Seen 2 remote branches
19:30:44 FATAL: Walk failure.
19:30:44 org.eclipse.jgit.errors.MissingObjectException: Missing commit 7253e881f2e53b7338b371cf979eccae7e9f68a7
19:30:44    at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:159)
19:30:44    at org.eclipse.jgit.revwalk.RevWalk.getCachedBytes(RevWalk.java:903)
19:30:44    at org.eclipse.jgit.revwalk.RevCommit.parseHeaders(RevCommit.java:155)
19:30:44    at org.eclipse.jgit.revwalk.PendingGenerator.next(PendingGenerator.java:147)
19:30:44    at org.eclipse.jgit.revwalk.StartGenerator.next(StartGenerator.java:184)
19:30:44    at org.eclipse.jgit.revwalk.RevWalk.next(RevWalk.java:435)
19:30:44    at org.eclipse.jgit.revwalk.RevWalk.iterator(RevWalk.java:1322)
19:30:44 Caused: org.eclipse.jgit.errors.RevWalkException: Walk failure.
19:30:44    at org.eclipse.jgit.revwalk.RevWalk.iterator(RevWalk.java:1324)
19:30:44    at hudson.plugins.git.util.GitUtils$1.invoke(GitUtils.java:182)
19:30:44    at hudson.plugins.git.util.GitUtils$1.invoke(GitUtils.java:146)
19:30:44    at org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.withRepository(AbstractGitAPIImpl.java:29)
19:30:44    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.withRepository(CliGitAPIImpl.java:64)
19:30:44    at hudson.plugins.git.util.GitUtils.filterTipBranches(GitUtils.java:146)
19:30:44    at hudson.plugins.git.util.DefaultBuildChooser.getAdvancedCandidateRevisions(DefaultBuildChooser.java:250)
19:30:44    at hudson.plugins.git.util.DefaultBuildChooser.getCandidateRevisions(DefaultBuildChooser.java:54)
19:30:44    at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:995)
19:30:44    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1098)
19:30:44    at hudson.scm.SCM.checkout(SCM.java:496)
19:30:44    at hudson.model.AbstractProject.checkout(AbstractProject.java:1278)
19:30:44    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
19:30:44    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
19:30:44    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
19:30:44    at hudson.model.Run.execute(Run.java:1728)
19:30:44    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
19:30:44    at hudson.model.ResourceController.execute(ResourceController.java:98)
19:30:44    at hudson.model.Executor.run(Executor.java:405)
19:30:44 Archiving artifacts
19:30:44 Finished: FAILURE

Как я могу сказать Дженкинсу просто забыть об этом конкретном SHA и перейти к другим?

1
задан 23 February 2017 в 04:36
1 ответ

Привет, вы можете добавить ветку, которую будет извлекать Дженкинс, в Jenkins GIT-> Branch to be build-> спецификатор ветки

Это решит вашу проблему

-1
ответ дан 4 December 2019 в 10:52

Теги

Похожие вопросы