我在詹金斯有两份工作。一个是常规项目,民意调查git完美,每次提交,开始工作,一切都很顺利。我正在接受这个项目并将其转换为Pipeline项目,并且在提交git时它不会触发。查看常规项目的GIT POLLING LOG,给出一些缩写的编辑:
Started on Dec 8, 2017 2:04:35 PM
Polling SCM changes on HOST_158
Using strategy: Default
[poll] Last Built Revision: Revision 8cc....3d3 (refs/remotes/origin/master)
> git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repositories
> git.exe config remote.origin.url https://example.com/buildbot/a_tests # timeout=10
Fetching upstream changes from https://example.com/buildbot/a_tests
> git.exe --version # timeout=10
using GIT_ASKPASS to set credentials TokenVBA
Setting http proxy: proxy.example.com:81
> git.exe fetch --tags --progress
.......
Done. Took 2.1 sec
Changes found
与管道项目相同的规范产生GIT POLLING LOG,如下所示:
Started on Dec 8, 2017 2:03:35 PM
Using strategy: Default
[poll] Last Built Revision: Revision 8cc....3d3 (refs/remotes/origin/master)
using GIT_ASKPASS to set credentials TokenVBA
Setting http proxy: proxy.example.com:81
> git.exe ls-remote -h https://example.com/buildbot/a_tests.git # timeout=10
ERROR: polling failed in c:/temp/jenkins/workspace/Test Component Installer V1 on HOST_158
java.io.IOException: hudson.plugins.git.GitException: Command "git.exe ls-remote -h https://example.com/buildbot/swqa_tests" returned status code 128:
stdout:
stderr: fatal: unable to access 'https://example.com/buildbot/swqa_tests/': schannel: next InitializeSecurityContext failed: SEC_E_UNTRUSTED_ROOT (0x80090325) - The certificate chain was issued by an authority that is not trusted.
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:596)
at org.jenkinsci.plugins.workflow.job.WorkflowJob.poll(WorkflowJob.java:629)
at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:594)
at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:640)
at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: hudson.plugins.git.GitException: Command "git.exe ls-remote -h https://example.com/buildbot/swqa_tests" returned status code 128:
stdout:
stderr: fatal: unable to access 'https://example.com/buildbot/swqa_tests/': schannel: next InitializeSecurityContext failed: SEC_E_UNTRUSTED_ROOT (0x80090325) - The certificate chain was issued by an authority that is not trusted.
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1970)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1689)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1600)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1591)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2732)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:635)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:594)
... 9 more
Done. Took 1 min 15 sec
No changes
在groovy脚本里面,我有这个
node ("HOST_158") { git poll: true, credentialsId: 'id-id-id-id-id', url: 'https://example.com/buildbot/a_tests.git' sleep 1