- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这是两个 Jenkins 节点的故事。
在我的两个节点之一上初始 Jenkinsfile
checkout 和节点选择之后,我在 Jenkins checkout scm
阶段看到一个奇怪的错误。
对于一个特定的节点,Jenkins 省略了“git init”中的“git”命令,这预计会导致构建失败。
我在故障节点上看到的是这样的:
> init/home/hudson/build/workspace/androidplatform_pipeline # timeout=10
在我的工作节点上,运行完全相同的管道脚本,我看到了这个:
> git init/home/hudson/build/workspace/androidplatform_pipeline # timeout=10
我的两个节点都是 Amazon EC2 实例,所以我尝试删除失败的节点并将其替换为工作节点的克隆,但“git”命令仍然被省略。
以下是相关规范:
控制台输出(带编辑):
[Pipeline] checkout
Cloning the remote Git repository
Cloning repository https://stash.*******/androidplatform.git
> init /home/hudson/build/workspace/androidplatform_pipeline # timeout=10
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Could not init /home/hudson/build/workspace/androidplatform_pipeline
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:696)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:497)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:336)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
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)
at ......remote call to andy-11-dc-big-replace(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
at hudson.remoting.Channel.call(Channel.java:830)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
at sun.reflect.GeneratedMethodAccessor479.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
at com.sun.proxy.$Proxy94.execute(Unknown Source)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1067)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1107)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:83)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:73)
at
org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
at hudson.security.ACL.impersonate(ACL.java:260)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
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)
Caused by: hudson.plugins.git.GitException: Error performing command: init /home/hudson/build/workspace/androidplatform_pipeline
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1910)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1871)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1867)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1512)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:694)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:497)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:336)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
... 4 more
Caused by: java.io.IOException: Cannot run program "" (in directory "/home/hudson/build/workspace/androidplatform_pipeline"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at hudson.Proc$LocalProc.<init>(Proc.java:245)
at hudson.Proc$LocalProc.<init>(Proc.java:214)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:846)
at hudson.Launcher$ProcStarter.start(Launcher.java:384)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1899)
... 15 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:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 20 more
[Pipeline] }
[Pipeline] // wrap
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
groovy.lang.MissingPropertyException: No such property: utils for class: WorkflowScript
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:458)
at org.kohsuke.groovy.sandbox.impl.Checker$4.call(Checker.java:243)
at org.kohsuke.groovy.sandbox.GroovyInterceptor.onGetProperty(GroovyInterceptor.java:52)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:308)
at org.kohsuke.groovy.sandbox.impl.Checker$4.call(Checker.java:241)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:238)
at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.getProperty(SandboxInvoker.java:28)
at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
at WorkflowScript.notifyStash(WorkflowScript:139)
at WorkflowScript.handleBuildFailure(WorkflowScript:143)
at WorkflowScript.run(WorkflowScript:11)
at ___cps.transform___(Native Method)
at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:74)
at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:66)
at sun.reflect.GeneratedMethodAccessor466.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
at com.cloudbees.groovy.cps.Next.step(Next.java:83)
at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:173)
at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:162)
at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:122)
at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:261)
at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:162)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:19)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:35)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:32)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:32)
at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:174)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:330)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:82)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:242)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:230)
at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
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
我很迷茫。此外,我在为这个问题构建有用的搜索查询时遇到了问题。
感谢大家的帮助。
最佳答案
您可以尝试在结帐前清洁您的工作区。
在结帐阶段之前添加此阶段
stage('Clean workspace') {
deleteDir()
sh 'ls -lah'
}
deleteDir() 清除工作区文件夹,还有 .git 文件。sh 'ls -lah' 记录工作区文件夹的内容以查看是否一切都消失了,您可以跳过它。当然只适用于 Linux
关于Jenkins 管道 'checkout scm' 在特定节点上失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44509417/
当我这样做时 git checkout origin/bugfix/NTP-183-datefns git 显示 Note: checking out 'origin/bugfix/NTP-183-d
我刚收到一封来自 Google 的电子邮件,通知我他们将关闭 Google Checkout,我应该改用 Google 电子钱包。这让我感到困惑,因为我在 6 个月前开始使用 Google 数字商品购
SVN 仓库看起来像这样: 最佳/ 最佳 顶部/两个 前/三 ...等等 您不想结帐整个 顶部 文件夹,但您不知道 SVN's sparse checkout feature . 所以你 checko
在稀疏 checkout 场景中,命令 git checkout . 恢复应该忽略的目录。这是设计使然,还是 Git 中的潜在问题?我正在使用 git checkout . 放弃我对我的工作副本所做的
新手问题,我想确保我理解这一点。 当我 git checkout ,这会将整个项目返回到当时的状态,还是仅重新创建在该特定修订版中更改的文件? 例如:如果我的文件夹除了 .git 存储库之外完全是空
我正在使用 Stripe 支付与我的系统集成。但是我不明白这两个库之间的区别。 似乎使用 javascript 生成表单并将 token 传递到我们的服务器端。 这是与 .net 核心一起使用
我正在使用 GitHub Actions 和安装在 Windows 2019 服务器上的自托管代理设置 CI/CD 管道。 我面临的问题是操作 actions/checkout@v2 无法 check
有时是 git checkout命令给出进度反馈: $ git checkout develop Checking out files: 100% (10779/10779), done. Switc
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be
我有一个我喜欢的 checkout 后 Hook - 大多数时候 - 但有时我知道运行它会浪费时间,或者,因为它会删除并重建我的开发数据库,所以我不'希望它做它的事情。 是否有跳过钩子(Hook)
这个问题在这里已经有了答案: Why do we use double dash in "git checkout -- ."? [duplicate] (1 个回答) 关闭 5 年前。 我总是使用
我尝试 checkin 有关我的开发的 excel 文档。但是我的构建失败了,因为它的文件被我锁定了。但问题是;当我选择解锁文档时,出现以下错误。 > The item $/../../Device
通过 XML API,如何将 Google Checkout 回调序列号与原始订单相关联? 在同一行 - XML API doc 的“选项 B - 提交服务器到服务器结帐 API 请求”部分中的序列号
我想确保没有其他人正在检查源代码,以便我可以制作发布的安装程序。所以,我想看看 1) #1正在 check out 特定文件的用户列表和 2) #2所有 checkout 文件的列表;但我不知道该怎么
我正在使用 Google Checkout 制作购物车。我已经像下面这样集成了 Paypal: " /
tl;dr JGit 的 checkout 抛出异常,而命令行 git checkout 工作正常 我目前正在尝试使用 JGit 从在线 Git 存储库中检查某些修订版,使用 Java(用于工作)。我
在使用“git checkout”时,我对这两个选项感到有点困惑 我总是使用 git checkout -- . 来清除我的工作目录。 但今天当我错误地输入 git checkout - . 时。我没
最近我使用了 Google Checkout a.k.a Google Wallet。我的任务是让它作为付款方式步骤中的选项单页结账。 我的 Mangento 版本是 CE 1.6.2.0 默认情况下
最近我使用了 Google Checkout a.k.a Google Wallet。我的任务是让它作为付款方式步骤中的选项单页结账。 我的 Mangento 版本是 CE 1.6.2.0 默认情况下
git checkout - check out 先前 check out 的提交引用。这些信息存储在哪里,是否有类似的方法来访问任何第 n 个以前 checkout 的提交? 我希望能够查看我已 c
我是一名优秀的程序员,十分优秀!