-
Notifications
You must be signed in to change notification settings - Fork 227
Expand file tree
/
Copy pathjenkinsfile-dev-b94
More file actions
36 lines (32 loc) · 1.05 KB
/
jenkinsfile-dev-b94
File metadata and controls
36 lines (32 loc) · 1.05 KB
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
pipeline {
agent any
tools {
// Install the Maven version configured as "M3" and add it to the path.
maven "maven"
}
triggers {
githubPush()
}
stages {
stage('fetch the code') {
steps {
git branch: 'develop1', credentialsId: 'github-cred', url: 'https://github.com/devopscloudsre/java-db-Login.git'
}
}
stage('build the code') {
steps {
sh 'mvn clean package'
}
post {
// If Maven was able to run the tests, even if some of the test
// failed, record the test results and archive the jar file.
success {
deploy adapters: [tomcat9(credentialsId: 'tomcat-admin-user', path: '', url: 'http://172.31.29.76:8080')], contextPath: '/dev-login', onFailure: false, war: '**/*.war'
}
failure {
echo "OMG ! The build failed"
}
}
}
}
}