-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
45 lines (45 loc) · 1.07 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('Build front angular'){
steps {
echo 'Building front angular app'
dir ('front/'){
sh 'npm install'
sh 'npm run build'
}
}
}
stage('Docker up') {
steps {
echo 'Running on Docker'
dir ('./'){
sh 'docker network disconnect gestion-visitantes_default mysql'
sh 'docker-compose down --rmi all'
sh 'docker-compose up -d'
sh 'docker network ls'
sh 'docker network connect gestion-visitantes_default mysql'
}
}
}
}
post {
always {
deleteDir()
}
success {
echo 'I succeeeded!'
}
unstable {
sh 'docker-compose down'
echo 'I am unstable :/'
}
failure {
sh 'docker-compose down'
echo 'I failed :('
}
changed {
echo 'Things were different before...'
}
}
}