-
Notifications
You must be signed in to change notification settings - Fork 94
Expand file tree
/
Copy pathJenkinsfile.declarative
More file actions
33 lines (32 loc) · 893 Bytes
/
Jenkinsfile.declarative
File metadata and controls
33 lines (32 loc) · 893 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
pipeline {
agent any
stages {
stage('SCM_Chekout')
agent {label 'master'}
{
steps {
checkout([$class: 'GitSCM',
branches: [[name: '*/master']],
doGenerateSubmoduleConfigurations: false,
extensions: [],
submoduleCfg: [],
userRemoteConfigs: [[url: 'https://github.com/ganeshhp/helloworldweb.git']]])
}
}
stage('Build')
agent { label 'master' }
{
steps {
sh 'mvn -f pom.xml clean package'
}
}
stage('Deploy')
agent {label 'appserver'}
{
steps {
sh 'cp target/*.war /opt/tomcat/webapps/'
sh '/opt/tomcat/bin/catalina.sh run'
}
}
}
}