August 2017
Intermediate to advanced
332 pages
9h 16m
English
We start by creating a new Git project, in which we put the shared library code. Each Jenkins step is expressed as a Groovy file located in the vars directory.
Let's create a sayHello step that takes the name parameter and echoes a simple message. This should be stored in the vars/sayHello.groovy file:
/*** Hello world step.*/def call(String name) { echo "Hello $name!"}
When the library code is done, we need to push it to the repository, for example, as a new GitHub project.
Read now
Unlock full access