Skip to content

Commit 294663b

Browse files
authored
Update Jenkinsfile
1 parent f79aba8 commit 294663b

1 file changed

Lines changed: 21 additions & 24 deletions

File tree

Jenkinsfile

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
1-
pipeline {
2-
agent any
3-
stages {
4-
stage('Checkout') {
5-
steps {
6-
echo 'Checkout completed'
7-
}
8-
}
9-
stage('Static-test') {
10-
steps {
11-
echo 'Running static tests on code'
12-
}
13-
}
14-
stage('Build') {
15-
steps {
16-
sh 'echo "Building the code"'
17-
}
18-
}
19-
stage('Deploy') {
20-
steps {
21-
echo 'Deploying into environment'
22-
}
23-
}
24-
}
1+
pipeline{
2+
agent any
3+
stages{
4+
stage('Git Checkout Stage'){
5+
steps{
6+
git branch: 'main', url: 'https://github.com/sudheer76R/java-example.git'
7+
}
8+
}
9+
stage('Build Stage'){
10+
steps{
11+
sh 'mvn clean install'
12+
}
13+
}
14+
stage('SonarQube Analysis Stage') {
15+
steps{
16+
withSonarQubeEnv('sonar') {
17+
sh "mvn clean verify sonar:sonar -Dsonar.projectKey=demo_sp"
18+
}
19+
}
20+
}
21+
}
2522
}

0 commit comments

Comments
 (0)