-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
executable file
·41 lines (41 loc) · 1.3 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
pipeline {
agent any
environment {
COMPOSE_PROJECT_NAME="atm-emulator"
}
stages {
stage('Checkout') {
steps {
parallel (
"ATM Emulator Repository": {
checkout([
$class: 'GitSCM',
branches: [[name: '*/master']],
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'CleanBeforeCheckout']],
submoduleCfg: [],
userRemoteConfigs: [[url: 'https://github.com/mehdichitforoosh/atm-emulator.git']]
])
},
)
}
}
stage('Deploy') {
steps {
echo 'Deploying....'
sh 'docker-compose build'
sh 'docker-compose up -d --force-recreate --remove-orphans'
}
}
}
post {
always {
// Always cleanup after the build.
cleanWs()
deleteDir()
}
failure {
mail bcc: '', body: 'This is a failure.:-(', cc: '', from: '', replyTo: '', subject: 'Jenkins Deploy Pipeline Failure', to: '[email protected]'
}
}
}