Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CICD-pipeline-complete
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
new commit for poll scm-- commit on the repo for webhook
New commit for poll scm-- commit on the repo for webhook
Complete CICD pipeline
go to vim /etc/sudoers

Expand Down
75 changes: 30 additions & 45 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,50 +1,35 @@

pipeline{
pipeline {
tools{

maven 'mymaven'
}
agent any
stages{
stage('Checkout the code'){

steps{
echo 'cloning the repo'
git 'https://github.com/Sonal0409/DevOpsClassCodes.git'
}
}
stage('Compile'){

steps{
echo 'complie the code again..'
sh 'mvn compile'
}
}
stage('CodeReview'){

steps{

echo 'codeReview'
sh 'mvn pmd:pmd'
}
}
stage('UnitTest'){

steps{

sh 'mvn test'
}

}
agent any
stages {
stage('Clone a repository'){
steps {
git 'https://github.com/srinivas0902/DevOpsCodeDemo.git'
}
}
stage('Compile'){
steps {
sh 'mvn compile'
}
}

stage('Package'){

steps{

sh 'mvn package'
}
}


}
stage('Code Review'){
steps {
sh 'mvn pmd:pmd'
}
}
stage ('Unit Test'){
steps {
sh 'mvn test'
}
}
stage ('Build code'){
steps {
sh 'mvn package'
}
}
}
}