-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
25 lines (25 loc) · 737 Bytes
/
Jenkinsfile
File metadata and controls
25 lines (25 loc) · 737 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
pipeline {
agent {
node {
label 'docker-cloud-agent'
}
}
stages {
stage('Build') {
steps {
echo "Building.."
sh '''
docker build -f dockerfiles/prod.dockerfile . -t strength-application:${BUILD_ID}
'''
}
}
stage('Deploy') {
steps {
echo 'Deploy....'
sh '''
(docker stop strength-application || true) && (docker container wait strength-application || true) && docker run -p 3333:80 -d --name "strength-application" --restart always --rm strength-application:${BUILD_ID}
'''
}
}
}
}