Stop and delete docke containers before running
testing/ogcore-api/pipeline/head There was a failure building this commit
Details
testing/ogcore-api/pipeline/head There was a failure building this commit
Details
parent
38eb3775f1
commit
1e998c9a3a
|
@ -22,8 +22,17 @@ pipeline {
|
|||
}
|
||||
stage('Build Environment') {
|
||||
steps {
|
||||
sh """
|
||||
if [ -z "$(docker ps -q)" ]; then
|
||||
echo "Docker is not running"
|
||||
else
|
||||
echo "Docker is running"
|
||||
fi
|
||||
docker stop $(docker ps -a -q)
|
||||
docker rm $(docker ps -a -q)
|
||||
"""
|
||||
script {
|
||||
|
||||
|
||||
docker.build("${DOCKER_IDENTITY}", '-f docker/Dockerfile-jenkins-php .')
|
||||
docker.build("${DOCKER_IDENTITY_NGINX}", '-f docker/Dockerfile-nginx .')
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue