This commit is contained in:
Ramón Vásquez 2025-10-29 16:09:16 -03:00
parent a0bf0ee30b
commit bba9bd8297

20
Jenkinsfile vendored
View file

@ -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}'
}
}
} }
} }