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,6 +22,15 @@ pipeline {
|
||||||
}
|
}
|
||||||
stage('Build Environment') {
|
stage('Build Environment') {
|
||||||
steps {
|
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 {
|
script {
|
||||||
|
|
||||||
docker.build("${DOCKER_IDENTITY}", '-f docker/Dockerfile-jenkins-php .')
|
docker.build("${DOCKER_IDENTITY}", '-f docker/Dockerfile-jenkins-php .')
|
||||||
|
|
Loading…
Reference in New Issue