-
Notifications
You must be signed in to change notification settings - Fork 222
/
Copy pathjenkinsfile2
44 lines (40 loc) · 1.05 KB
/
jenkinsfile2
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
40
41
42
43
44
pipeline {
agent any
tools{
jdk 'jdk-8'
}
stages {
stage('git') {
steps {
echo 'scm'
git branch: 'main', url: 'https://github.com/devopstraininghub/mindcircuit13.git'
}
}
stage('sonar') {
steps {
echo 'scanning project'
sh '''mvn sonar:sonar \\
-Dsonar.host.url=http://3.83.18.215:9000 \\
-Dsonar.login=ae71c2e5c7b3c5932dea385c16eb074bd9ad764d'''
}
}
stage('build') {
steps {
echo 'generating artifact using maven build tool'
sh 'mvn clean install'
}
}
stage('nexus artifactory') {
steps {
echo 'publish to nexus'
sh 'mvn deploy'
}
}
stage('deploy to tomcat') {
steps {
echo 'tomcat deploy'
deploy adapters: [tomcat9(credentialsId: 'tomcat', path: '', url: 'http://100.25.144.30:8091/')], contextPath: 'mc-app-batch13', war: '**/*.war'
}
}
}
}