forked from sudheer76R/java-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjenkinsfile
More file actions
30 lines (30 loc) · 842 Bytes
/
jenkinsfile
File metadata and controls
30 lines (30 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
pipeline{
agent any
tools {
maven 'maven'
}
stages{
stage('Git Checkout Stage'){
steps{
git branch: 'main', url: 'https://github.com/chaithra0317/java-example.git'
}
}
stage('Build Stage'){
steps{
sh 'mvn clean install'
}
}
stage('SonarQube Analysis Stage') {
steps{
withSonarQubeEnv('sonar') {
sh "mvn clean verify sonar:sonar -Dsonar.projectKey=demo-sonar"
}
}
}
stage('deploy'){
steps{
deploy adapters: [tomcat9(credentialsId: 'tomcat-server', path: '', url: 'http://13.200.246.69:8080/')], contextPath: null, war: '**/*.war'
}
}
}
}