Я пытаюсь создать простой конвейер, хранящийся в отдельном репозитории, чтобы проверить каждый коммит, отправленный в репозиторий Gitlab, поэтому я использовал что-то вроде
#!/usr/bin/env groovy
node {
stage('Checkout') {
git branch: 'dev', url: 'git@xxxxxxxxxxxxxxxx:telsol/reporting-api.git'
}
}
Хук Gitlab установлен с Событиями Push и проверка SSL выключена
Репозиторий конвейера - telsol / pipelines , а проект - telsol / reports-api .
itНекоторое время работал нормально, но в последнее время запуск конвейерного задания работает вручную, но push-даже / test webhook не работает и вылетает с этой ошибкой:
Started by GitLab push by Tarik AMINE
Checking out git git@XXXXXXXXXXXXXXXXXXX:telsol/pipelines.git into /var/lib/jenkins/workspace/reporting-api@script to read deploy_reporting_api.jenkinsfile
Cloning the remote Git repository
Cloning repository git@XXXXXXXXXXXXXXXXXXX:telsol/pipelines.git
> git init /var/lib/jenkins/workspace/reporting-api@script # timeout=10
Fetching upstream changes from git@XXXXXXXXXXXXXXXXXXX:telsol/pipelines.git
> git --version # timeout=10
> git fetch --tags --progress git@XXXXXXXXXXXXXXXXXXX:telsol/pipelines.git +refs/heads/*:refs/remotes/telsol_pipeline/*
> git config remote.telsol_pipeline.url git@XXXXXXXXXXXXXXXXXXX:telsol/pipelines.git # timeout=10
> git config --add remote.telsol_pipeline.fetch +refs/heads/*:refs/remotes/telsol_pipeline/* # timeout=10
> git config remote.telsol_pipeline.url git@XXXXXXXXXXXXXXXXXXX:telsol/pipelines.git # timeout=10
Fetching upstream changes from git@XXXXXXXXXXXXXXXXXXX:telsol/pipelines.git
> git fetch --tags --progress git@XXXXXXXXXXXXXXXXXXX:telsol/pipelines.git +refs/heads/*:refs/remotes/telsol_pipeline/*
skipping resolution of commit remotes/telsol_pipeline/master, since it originates from another repository
> git rev-parse refs/remotes/telsol_pipeline/master^{commit} # timeout=10
> git rev-parse refs/remotes/telsol_pipeline/telsol_pipeline/master^{commit} # timeout=10
Checking out Revision 9b0c3eeeea12ded7292fa89739fce33044c3f974 (refs/remotes/telsol_pipeline/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 9b0c3eeeea12ded7292fa89739fce33044c3f974
Commit message: "test"
> git rev-list --no-walk 9b0c3eeeea12ded7292fa89739fce33044c3f974 # timeout=10
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] node
Running on Jenkins in /var/lib/jenkins/workspace/reporting-api
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Checkout)
[Pipeline] git
Cloning the remote Git repository
Cloning repository git@XXXXXXXXXXXXXXXXXXX:telsol/reporting-api.git
> git init /var/lib/jenkins/workspace/reporting-api # timeout=10
Fetching upstream changes from git@XXXXXXXXXXXXXXXXXXX:telsol/reporting-api.git
> git --version # timeout=10
> git fetch --tags --progress git@XXXXXXXXXXXXXXXXXXX:telsol/reporting-api.git +refs/heads/*:refs/remotes/origin/*
> git config remote.origin.url git@XXXXXXXXXXXXXXXXXXX:telsol/reporting-api.git # timeout=10
> git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
> git config remote.origin.url git@XXXXXXXXXXXXXXXXXXX:telsol/reporting-api.git # timeout=10
Fetching upstream changes from git@XXXXXXXXXXXXXXXXXXX:telsol/reporting-api.git
> git fetch --tags --progress git@XXXXXXXXXXXXXXXXXXX:telsol/reporting-api.git +refs/heads/*:refs/remotes/origin/*
> git rev-parse remotes/telsol_pipeline/master^{commit} # timeout=10
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
hudson.plugins.git.GitException: Command "git rev-parse remotes/telsol_pipeline/master^{commit}" returned status code 128:
stdout: remotes/telsol_pipeline/master^{commit}
stderr: fatal: argument 'remotes/telsol_pipeline/master^{commit}' ambigu : révision inconnue ou chemin inexistant.
Utilisez '--' pour séparer les chemins des révisions, comme ceci :
'git <commande> [<révision>...] -- [<chemin>...]'
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2016)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1984)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1980)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1612)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1624)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:809)
at hudson.plugins.git.GitAPI.revParse(GitAPI.java:316)
at hudson.plugins.git.RevisionParameterAction.toRevision(RevisionParameterAction.java:98)
at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1070)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1187)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:120)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:90)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:77)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)
at hudson.security.ACL.impersonate(ACL.java:290)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Finished: FAILURE
Что я заметил, так это второй анализ версии для проектанаходится на конвейере, который является единственным лидерством, которое у меня есть.
stderr: fatal: аргумент 'remotes / telsol_pipeline / master ^ {commit}' ambigu: просмотр не может быть продолжен.