-
Bug
-
Resolution: Unresolved
-
Major
-
Jenkins version 2.346.2
Our team has a lot of GitHub projects, that should have PullRequest, Release and Nightly jobs and groovy shared library to manage build process. We have tried to manage CRON trigger from shared library like this:
org.jenkinsci.plugins.workflow.job.WorkflowJob job = currentBuild.getRawBuild().getParent() String spec = "H H(0-4) * * *" hudson.triggers.TimerTrigger newCron = new hudson.triggers.TimerTrigger(spec) newCron.start(job, true) job.addTrigger(newCron)
For some time (month or more), this solution has worked good, but sometimes our jobs start to fail with such error:
java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 10 // (Full stack trace can be found in attachments)
When this error happened, we have tried to manage CRON trigger configuration from Jenkins UI and we have got similar error while applying new CRON trigger configuration (Log from Jenkins container can be found in attachments).
Only Jenkins reboot helped to solve this issue, but after one month it happened again.
How we can permanently this error? What can be the root cause? Is it our mistake, or a Pipeline Trigger bug?