forked from EnesBiricik/TravelMapGuideWebApi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
45 lines (40 loc) · 1.01 KB
/
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
41
42
43
44
45
pipeline {
agent any
stages {
stage('Docker Compose Down') {
steps {
script {
sh 'docker compose -f ./docker-compose.yml down || true'
}
}
}
stage('Build Docker Image') {
steps {
script {
sh 'timeout 500 docker compose -f ./docker-compose.yml build '
sh '''
if [ $? -eq 124 ]; then
echo "Build işlemi zaman aşımına uğradı!"
exit 1
fi
'''
}
}
}
stage('Docker Compose Up') {
steps {
script {
sh 'docker compose -f ./docker-compose.yml up -d'
}
}
}
}
post {
always {
echo 'Pipeline tamamlandı.'
}
failure {
echo 'Pipeline başarısız oldu.'
}
}
}