Problem Statement
Last week, one of build servers start failing every jobs. The business impact is not to proceed the entire build and deployment processes of every release.
Every jenkins build jobs report the below exceptions without any clue.
[INFO] ------------------------------------------------------------------------
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] sh
Required context class hudson.FilePath is missing
Perhaps you forgot to surround the code with a step that provides this, such as: node
[Pipeline] End of Pipeline
org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing
......
Finished: FAILURE
Why
Jenkins Pipeline is a suite of plugins which supports implementing and integrating continuous delivery pipelines into Jenkins. It is an automated expression for getting right versioned software in the underlying build server.
There are two types of pipelines in Jenkins namely declarative and scripted. Declarative pipeline is a more recent feature of Jenkins pipeline that provides better syntactical features compared to scripted pipeline syntax.
How
On troubleshooting the build job failures, it has been found that some software configuration/setup got changed.
The resolution steps are applied in two steps processes
1. Upgraded the required pipeline plugins as in screenshot
2. Restarted the build server after plugins upgrades.
There are two ways of build server restart namely cold and warm. As we know, cold restart is the complete physical restart of the build server. In warm restart, click on "Restart from Stage" of classic UI panel once pipeline has completed.
Conclusion
Thus the repored build server error is resolved to meet the business expectation. Technology needs to enable the business.
No comments:
Post a Comment