forked from lvthillo/python-flask-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
37 lines (36 loc) · 936 Bytes
/
Copy pathJenkinsfile
File metadata and controls
37 lines (36 loc) · 936 Bytes
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
pipeline {
agent any
stages {
stage('Lint HTML using tidy'){
steps {
sh 'tidy -q -e *.html'
}
}
stage('Lint python & Dockerfile'){
steps {
sh 'make all'
}
}
stage('Build Docker Image '){
steps {
sh 'sudo docker build --tag=cdend-uda-avish-capstn:latest .'
}
}
stage('Run Docker Image '){
steps {
sh 'sudo docker run -d --name TestApp -p 80:80 cdend-uda-avish-capstn '
}
}
stage('Verify app is up'){
steps {
sh 'curl -fsS http://localhost:80 > /dev/null'
}
}
stage('Kill/Remove TestApp container'){
steps {
sh 'sudo docker kill TestApp'
sh 'sudo docker rm TestApp'
}
}
}
}