Getting started with Pipeline -2

Category : Devops | Sub Category : Jenkins | By Prasad Bonam Last updated: 2021-03-20 04:46:36 Viewed : 843


Getting started with Pipeline -2

  1. Click the Pipeline tab at the top of the page to scroll down to the Pipeline section.
    Note: If instead you are defining your Jenkinsfile in source control, follow the instructions in In SCM below.

  2. In the Pipeline section, ensure that the Definition field indicates the Pipeline script option.

  3. Enter your Pipeline code into the Script text area.
    For instance, copy the following Declarative example Pipeline code (below the Jenkinsfile ( …​ ) heading) or its Scripted version equivalent and paste this into the Script text area. (The Declarative example below is used throughout the remainder of this procedure.)

    Jenkinsfile (Declarative Pipeline)
    pipeline {
        agent any 
        stages {
            stage(`Stage 1`) {
                steps {
                    echo `Hello world!` 
                }
            }
        }
    }

Search
Sub-Categories
Related Articles

Leave a Comment: