-
Notifications
You must be signed in to change notification settings - Fork 426
Expand file tree
/
Copy pathJenkinsfile-sonar-nexus
More file actions
39 lines (32 loc) · 880 Bytes
/
Jenkinsfile-sonar-nexus
File metadata and controls
39 lines (32 loc) · 880 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
31
32
33
34
35
36
37
38
39
pipeline {
agent any
tools {
jdk 'JAVA1.8'
}
stages {
stage('CLONE SCM') {
steps {
echo 'cloning code from Github'
git branch: 'main', url: 'https://github.com/devopstraininghub/webapp1.git'
}
}
stage('SONARQUBE ANALYSIS') {
steps {
echo 'SONARQUBE ANALYSIS'
sh 'mvn clean sonar:sonar'
}
}
stage('Build Artifact AND PUSHING TO NEXUS') {
steps {
echo 'Build Artifact with maven build tool'
sh 'mvn clean deploy'
}
}
stage('Deploy') {
steps {
echo 'Deploy to tomcat ap/n server '
deploy adapters: [tomcat9(credentialsId: 'tomcat', path: '', url: 'http://3.83.227.87:8081/')], contextPath: 'facebook', war: '**/*.war'
}
}
}
}