A declarative pipeline demonstration.
- Start jenkins in your machine.
- Select New Item from left side menu
- Enter project name (e.g., Declarative_Pipeline)
- Choose pipeline project
- Click on Ok
- Select Configure option from left side menu
- Select Advanced Project Options , it will scroll to down
- Select Pipeline -> Definition -> Pipeline script from SCM
- Select Your SCM (Source Controll Managment) (e.g., Git)
- Enter your Repositories info e.g., - URL : https://github.com/uds214125/jenkins_demo.git - Add creds : github username and github password
- Enter your script file name Script Path e.g., pipeline-stage
- Apply -> Save
- Select Build Now option from left side menu
- Follow above step from 1 to 7
- Select **Pipeline -> Definition -> Pipeline script **
- Write your scirpt or copy and paste code from scripted_pipeline file.
- Apply -> Save
- Select Build Now option from left side menu.