-
Notifications
You must be signed in to change notification settings - Fork 208
/
Copy pathTask1-Pipeline
39 lines (38 loc) · 1.38 KB
/
Task1-Pipeline
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
pipeline {
agent any
tools {
maven 'Maven'
}
stages {
stage('SCM') {
steps {
echo 'Hello Clone stage'
git credentialsId: '3e81946e-ccc4-40f5-8a54-2357e6d4ba9d', url: 'https://github.com/polarapu/maven-project1.git'
}
}
stage('Build') {
steps {
echo 'Hello Build'
sh 'mvn clean install'
}
}
stage('Dev-Deploy') {
steps {
echo 'Hello Docker Deploy'
deploy adapters: [tomcat9(credentialsId: '18da8b3f-825b-461f-b9b6-1eceb76d7ceb', path: '', url: 'http://192.168.75.128:8082/')], contextPath: 'devops107.war', war: '**/*.war'
}
}
stage('NonPrd-Deploy') {
steps {
echo 'Hello Linux Deploy'
deploy adapters: [tomcat9(credentialsId: '18da8b3f-825b-461f-b9b6-1eceb76d7ceb', path: '', url: 'http://192.168.75.128:8081/')], contextPath: 'devops107.war', war: '**/*.war'
}
}
stage('Prod-Deploy') {
steps {
echo 'Hello AWS Deploy'
deploy adapters: [tomcat9(credentialsId: '18da8b3f-825b-461f-b9b6-1eceb76d7ceb', path: '', url: 'http://65.2.37.196:8080/')], contextPath: 'devops107.war', war: '**/*.war'
}
}
}
}