• LOGIN
  • No products in the cart.

DevOps on AWS – Jenkins Pipeline Groovy Script

stage ‘build’
node (‘LinuxNode’){
     git ‘git@github.com:venkat09docs/pipeline.git’
     withEnv([“PATH+MAVEN=${tool ‘Maven3.3’}/bin”]) {
          sh “mvn -B clean package”
     }
     stash excludes: ‘target/’, includes: ‘**’, name: ‘source’
}
stage ‘test’
parallel ‘integration’: {
     node (‘LinuxNode’) {
          unstash ‘source’
          withEnv([“PATH+MAVEN=${tool ‘Maven3.3’}/bin”]) {
               sh “mvn clean verify”
          }
     }
}, ‘quality’: {
     node (‘LinuxNode’) {
          unstash ‘source’
          withEnv([“PATH+MAVEN=${tool ‘Maven3.3’}/bin”]) {
               sh “mvn clean verify” //sonar:sonar
          }
     }
}
stage ‘approve’
timeout(time: 7, unit: ‘DAYS’) {
     input message: ‘Do you want to deploy?’, submitter: ‘admin’
}
stage name:’deploy’, concurrency: 1
node (‘LinuxNode’) {
     unstash ‘source’
     withEnv([“PATH+MAVEN=${tool ‘Maven3.3’}/bin”]) {
          sh “mvn clean deploy”
     }
}
February 22, 2021

0 responses on "DevOps on AWS - Jenkins Pipeline Groovy Script"

    All rights reserved.
    error: Alert: Content is protected !!
    X