The example above shows a successful run of a basic Pipeline created in the Jenkins web UI, using two steps. // Script // node {  ① echo 'Hello World'  ② } // Declarative not yet implemented // ① node  allocates an executor and workspace in the Jenkins environment. ② echo  writes simple string in the Console Output. Defining a Pipeline in SCM Complex Pipelines are hard to write and maintain within the text area of the Pipeline configuration page. To make this easier, Pipeline can also be written in a text editor and checked into source control as a  Jenkinsfile  which Jenkins can load via the  Pipeline Script from SCM  option. To do this, select  Pipeline script from SCM  when defining the Pipeline. With the  Pipeline script from SCM  option selected, you do not enter any Groovy code in the Jenkins UI; you just indicate by specifying a path where in source code you want to retrieve the pipeline from. When you update the designated repository, a new build is triggered, as long as the Pipeline is configured with an SCM polling trigger. TIP The first line of a  Jenkinsfile  should be  #!/usr/bin/env groovy  [12: en.wikipedia.org/ wiki/Hashbang] [13: groovy-lang.org/syntax.html#_shebang_line] which text editors, IDEs, GitHub, etc will use to syntax highlight the  Jenkinsfile  properly as Groovy code. 25