In this section you can find the solution of the most common errors using the templates.

Template startup failed

Sometimes, when you execute any template you will see this an error like:

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: /home/pl/jobs/devon4j-mts_PL_Template/builds/8/libs/ProductionLineTemplateLib/src/com/capgemini/productionline/configuration/JenkinsConfiguration.groovy: 38: unable to resolve class @ line 38, column 1. import

In most of our templates we use the Production Line Shared Lib. In order to work, the Shared Lib needs some plugins installed in your Jenkins, so to solve this error you need to install those plugins manually using the Manage Plugins.

In this specific case the problem is the Allure plugin is not installed. Just install it, restart Jenkins and execute again the template.

Build Now instead Build with Parameters

Sometimes, when you go to execute a template, mostly the first time, the Build Now button is available instead Build with Parameters button. The root cause of this problem is the parameters are defined in the Jenkinsfile and, as you never execute it before, Jenkins do not have those Jenkinsfile yet. For this reason it does not knows the parameters required.

To solve this problem, you only need to press the Build Now button. Then, the execution will start and fail. It’s not a problem as you do not enter any parameter. Now you only need to reload the page and the Build with Parameters button will be available.

Error at Install plugins stage

In some templates you can see the Install plugins stage. In this stage some plugins required for the template will be installed. In order to properly load the plugins, Jekins needs to be restarted, for that reason the pipeline fails on that stage. It is not a bug or problem, so do not worry about that. You only need to wait until Jenkins is restarted and execute the template again.

Last updated 2021-10-21 17:17:16 UTC