update
This commit is contained in:
parent
a0bf0ee30b
commit
bba9bd8297
1 changed files with 12 additions and 8 deletions
20
Jenkinsfile
vendored
20
Jenkinsfile
vendored
|
|
@ -54,18 +54,22 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Run Container') {
|
|
||||||
steps {
|
|
||||||
echo 'Running container...'
|
|
||||||
// --rm cleans up; this will print "Hello, World!" to the console
|
|
||||||
sh 'docker run --rm --name my-python-app-${BUILD_NUMBER} my-python-app:${BUILD_NUMBER}'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Push Image') {
|
stage('Push Image') {
|
||||||
steps {
|
steps {
|
||||||
sh 'docker push "${AWS_REGISTRY}:${IMAGE_TAG}"'
|
sh 'docker push "${AWS_REGISTRY}:${IMAGE_TAG}"'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage('Pull Image') {
|
||||||
|
steps {
|
||||||
|
sh 'docker pull "${AWS_REGISTRY}:${IMAGE_TAG}"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Run Container') {
|
||||||
|
steps {
|
||||||
|
echo 'Running container...'
|
||||||
|
sh 'docker run --rm --name ${IMAGE_NAME} ${AWS_REGISTRY}:${IMAGE_TAG}'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue