-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile.bak
35 lines (33 loc) · 942 Bytes
/
Jenkinsfile.bak
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
pipeline {
agent any
stages {
stage('Stop Curr Container') {
steps {
catchError {
sh 'docker container stop landingpage'
}
echo currentBuild.result
sh 'docker container prune -f'
sh 'docker image prune -f'
sh 'docker volume prune -f'
}
}
stage('Git') {
steps {
git 'https://github.com/connerkward/landingpage'
sh 'ls'
}
}
stage('Build Dockerfile') {
steps {
sh 'docker build -t landingpage .'
sh 'ls'
}
}
stage('Start Container') {
steps {
sh 'docker run --expose 80 --name landingpage --net web --restart unless-stopped -d landingpage'
}
}
}
}