- I see the following error when using the CJE CLI to perform operations such as
[worker-1] Initializing Docker cleanup job [worker-1] "-":1: bad minute [worker-1] errors in crontab file, can't install.
- CloudBees Jenkins Enterprise (CJE) > 1.11.11 AWS/Anywhere
- CPLT2-5322: Docker GC init script failing on CLI operations
This is caused by a bug introduced in version 1.11.11. The version provides the ability to set the docker cleanup frequency on
worker-add operations by introducing a new attribute
docker_image_clean_frequency. However this attribute is not properly initialized for existing workers - workers that were added prior to version 1.11.11.
The solution is to upgrade to CloudBees Jenkins Enterprise 1.11.13.
The workaround is to add the
docker_image_clean_frequency = 60 attribute to the project configuration -
60 being the default value of 60 minutes.
.dna/project.config, add the attribute under the [worker] section, like for example:
[worker] ... docker_image_clean_frequency = 60 ...
cje upgrade --config-only --force to apply that configuration to the project.