-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
40 lines (34 loc) · 950 Bytes
/
Jenkinsfile
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
40
pipeline{
agent any
stages {
stage('Clone repository') {
steps{
checkout scm
}
}
stage('Application_Config'){
steps{
sh '''sudo cp ${APPLICATION} ${APPLICATION_CONFIG}'''
}
}
stage('Build BackEnd') {
steps{
sh '''sudo ./gradlew clean build --exclude-task test'''
}
}
stage('reset'){
steps{
sh'''docker stop ${DOTORI_APP}_1 || true'''
sh'''docker rm ${DOTORI_APP}_1 || true'''
sh'''docker rmi ${DOTORI_APP}:latest || true'''
sh'''docker stop ${DOTORI_REDIS}_1 || true'''
sh'''docker rm ${DOTORI_REDIS}_1 || true'''
}
}
stage('docker-compose'){
steps {
sh'''docker-compose up -d'''
}
}
}
}