0% found this document useful (0 votes)
30 views1 page

Jenkinsfile Demo

The document defines a Jenkins pipeline with stages to fetch code from a GitHub repository, build a WAR file, run unit and integration tests, and perform code analysis on the project.

Uploaded by

ankush
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views1 page

Jenkinsfile Demo

The document defines a Jenkins pipeline with stages to fetch code from a GitHub repository, build a WAR file, run unit and integration tests, and perform code analysis on the project.

Uploaded by

ankush
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

pipeline {

agent any

stages {
stage('Fetch Code') {
steps {
git branch: 'vp-rem', url:
'https://github.com/devopshydclub/vprofile-repo.git'
}
}
stage('BUILD') {
steps {
sh 'mvn clean install -DskipTests'
}
post {
success {
echo 'Now Archiving...'
archiveArtifacts artifacts: '**/target/*.war'
}
}
}

stage('UNIT TEST') {
steps{
sh 'mvn test'
}
}

stage('INTEGRATION TEST'){
steps {
sh 'mvn verify -DskipUnitTests'
}
}

stage('CODE ANALYSIS'){
steps {
sh 'mvn checkstyle:checkstyle'
}
post {
success {
echo 'Generate Analysis Result'
}
}
}
}
}

You might also like