字符串中有多少个子字符串?
Why does string x [1:n] have O(n^2) subtrings in the lecture 21 Dynamic Programming III of
6.006 from MIT?
Why is not O(2^n)?
Run Code Online (Sandbox Code Playgroud)
这是两个 Jenkins 节点的故事。
在两个节点之一上checkout scm进行初始签出和节点选择后,我在 Jenkins 阶段看到一个奇怪的错误。Jenkinsfile
对于一个特定节点,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) …Run Code Online (Sandbox Code Playgroud)