Executing the pipeline for application deployment automation
The pipeline feature in Jenkins 2.0 also provides features to orchestrate end-to-end automation for application deployment.
To give you an overview, here's a script that achieves checkout, continuous integration, cloud provisioning, and configuration management:
node('Master') {
// Mark the code checkout 'stage'
stage 'Checkout'
// Get code for PetClinic Application from a GitHub repository
git url: 'https://github.com/mitesh51/spring-petclinic.git'
// Get the maven tool.
// This ' Maven3.3.1' maven tool must be configuredin the global configuration.
def mvnHome = tool 'Maven3.3.1'
// Mark the code Compile'stage'....
stage 'Compile'
// Run the maven build
sh "${mvnHome}/bin/mvn clean compile"
// Mark the code for Unit test execution and package 'stage'....
stage 'Test&Package...