Tôi có một phiên bản jenkins có kèm theo máy nô lệ cửa sổ. Tôi cũng có một công việc chạy mà nằm trong github và tôi có kích hoạt - "Xây dựng khi một thay đổi được đẩy để GitHub" thiết lập.Vấn đề kích hoạt Github-Jenkins với nô lệ
khi tôi đẩy thay đổi vào github, không có bản dựng nào được kích hoạt trên jenkins. Tôi kiểm tra và thấy rằng tải trọng không được tranferred để Jenkins trong "log móc Github" nhưng tôi nhận được lỗi sau:
Started on Sep 18, 2014 3:57:06 PM
Using strategy: Default
[poll] Last Built Revision: Revision ce6a183e834a3e31afa0eb83a4418b0619c8642b (origin/master)
> "C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master # timeout=10
FATAL: hudson.plugins.git.GitException: Error performing command: "C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master
hudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: "C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:462)
at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:357)
at hudson.scm.SCM.poll(SCM.java:374)
at hudson.model.AbstractProject._poll(AbstractProject.java:1428)
at hudson.model.AbstractProject.poll(AbstractProject.java:1331)
at com.cloudbees.jenkins.GitHubPushTrigger$1.runPolling(GitHubPushTrigger.java:73)
at com.cloudbees.jenkins.GitHubPushTrigger$1.run(GitHubPushTrigger.java:98)
at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: hudson.plugins.git.GitException: Error performing command: "C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1444)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1225)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1138)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1129)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2059)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:495)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:460)
... 13 more
Caused by: java.io.IOException: Cannot run program ""C:\Program Files (x86)\Git\cmd\git.exe"": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:780)
at hudson.Launcher$ProcStarter.start(Launcher.java:360)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1433)
... 19 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
... 24 more
Về cơ bản phàn nàn về việc không thể chạy lệnh C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master
Nhưng khi Tôi tự đi vào máy nô lệ của tôi và chạy lệnh, nó hoạt động tốt.
Xin lưu ý rằng 1. Tôi đã thực hiện điều chỉnh nơi dịch vụ nô lệ jenkins đăng nhập với tư cách quản trị viên để có tất cả các quyền. 2. Máy chủ jenkins mặc định của tôi là một hộp linux và máy nô lệ là một hộp cửa sổ. Rõ ràng cả hai đều có đường dẫn thực thi git khác nhau. Vì vậy, tôi tự hỏi nếu jenkins chạy lệnh này trên hộp linux của tôi vì lý do nào.
tôi có các thiết lập dự án để chạy trên các cửa sổ nô lệ chỉ hộp và hoạt động tốt như nó xây dựng tốt (vì vậy nó có thể tìm ra git thực thi cho công việc)
Bất kỳ con trỏ? Ngoài ra có ai biết làm thế nào github plugin cho jenkins làm việc với máy nô lệ (hiện nó tìm kiếm git trong nô lệ hoặc nó đi đến nơi jenkins cư trú, vì đó có thể là nguồn, mặc dù không có ý tưởng những gì các giải pháp cho trường hợp kỳ lạ đó sẽ là gì?)