-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
31 lines (27 loc) · 801 Bytes
/
Jenkinsfile
File metadata and controls
31 lines (27 loc) · 801 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
pipeline {
agent any
stages {
stage('Checkout') {
steps {
git branch: 'main',
git 'https://github.com/ziadanex99/DOV'
}
}
stage('Build') {
steps {
sh 'mvn clean package'
}
}
stage('Deploy to Tomcat') {
steps {
script {
def tomcatUrl = 'http://localhost:9090/manager/text'
def tomcatUser = 'tomcat'
def tomcatPass = 'password'
def warFile = 'target/MyWebApp.war'
sh "curl -u ${tomcatUser}:${tomcatPass} --upload-file ${warFile} ${tomcatUrl}/deploy?path=/MyWebApp&update=true"
}
}
}
}
}