Everything in the entire IT world starts with the Hello World example, to show that the basics work fine. Let's follow this rule and use it to create the first Jenkins pipeline:
- Click on
New Item
:
- Enter
hello world
as the item name, choosePipeline
, and click onOK
:
- There are a lot of options. We will skip them for now and go directly to the
Pipeline
section:
- Then, in the
Script
text-box, we can enter the pipeline script:
pipeline { agent any stages { stage("Hello") { steps { echo 'Hello World' } } } }
- Click on
Save
. - Click on
Build Now
:
We should see #1
under the Build History
. If we click on it, and then on Console Output
, we will see the log from the pipeline build:
You have just seen the first example, and its successful output means that Jenkins is installed correctly. Now, let's see the possible Jenkins architecture.
Note
We will describe more on the pipeline syntax in Chapter 4, Continuous...