Configuring the Pipeline project by using the sample script

You can configure a Pipeline project directly from the Jenkins UI by using the sample pipeline scripts to run test assets from Jenkins.

Before you begin

You must have completed the following tasks:

Procedure

  1. Open your Jenkins Pipeline project from the list.
  2. Click Configure, and then select the Pipeline tab.
  3. Select the Pipeline script option in the Definition field.
  4. Select the sample script from the drop-down list.

    For example, if you select Hello Word from the drop-down list, then the sample script is displayed as follows:

    pipeline_sample_script
  5. Specify the script that you created in place of echo ‘Hello Word’.
    pipeline_script_edited
    Note: You can provide a different name for the stage in the script.

Results

You have configured the Pipeline project by using the Pipeline script option.

What to do next

You can run test assets from the Jenkins server. See Running tests from Jenkins.