forked from LandmakTechnology/maven-web-application
-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathJenkinsfile_boi
28 lines (27 loc) · 1021 Bytes
/
Jenkinsfile_boi
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
node{
def mavenHome = tool name: 'maven3.9.0'
stage('1Clone'){
git branch: 'master', credentialsId: 'GITHUB-CREDENTIALS', url: 'https://github.com/starlightng/maven-web-application.git'
}
stage('2MavenBuild'){
sh "${mavenHome}/bin/mvn clean package"
// bat 'mvn package'
}
stage('5.Deploy2dev'){
sshagent(['Tomcat-Key']) {
sh "scp -o StrictHostKeyChecking=no target/*.war [email protected]:/opt/tomcat9/webapps/aut-app.war"
}
stage('7.approval'){
timeout(time:8, unit:'HOURS'){
input message: 'Please approve deployment to Production'
}
stage('8.Deploy2prod'){
deploy adapters: [tomcat9(credentialsId: 'Tomcat-Credentials', path: '', url: 'http://54.84.20.7:8080/')], contextPath: null, war: 'target/*.war'
}
stage('9.EmailAlerts'){
emailext body: '''Kindly confirm subject matter and initiate necessary correspondence.
Best Regards.''', subject: 'Boi-Deployment Status', to: '[email protected], [email protected]'
}
}
}
}