在系统重新启动Jenkins存储之后,其中一个作业一直在失败,它正在尝试使用数字1创建bulid,但已经有1400个过去的版本。有没有办法改变它,所以构建将以正确的增量创建,所以在这种情况下1401.
jenkins的完整策略:
java.lang.IllegalStateException: [Directory]\builds\1 already existed; will
not overwite with [Build.Name] #1
at hudson.model.RunMap.put(RunMap.java:189)
at jenkins.model.lazy.LazyBuildMixIn.newBuild(LazyBuildMixIn.java:178)
at hudson.model.AbstractProject.newBuild(AbstractProject.java:1011)
at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1210)
at hudson.model.AbstractProject.createExecutable(AbstractProject.java:144)
at hudson.model.Executor$1.call(Executor.java:328)
at hudson.model.Executor$1.call(Executor.java:310)
at hudson.model.Queue._withLock(Queue.java:1251)
at hudson.model.Queue.withLock(Queue.java:1189)
at hudson.model.Executor.run(Executor.java:310)
答案 0 :(得分:1)
看起来您可以使用" Next Build Number"插件来完成此任务:https://stackoverflow.com/a/13294569/257924
答案 1 :(得分:0)
您可以在jenkins_url / script中使用groovy脚本,如下所示:
item = Jenkins.instance.getItemByFullName(“jobName”) item.updateNextBuildNumber(1401)