diff --git a/Jenkinsfile b/Jenkinsfile index 127164b168..e692b6f9a3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,16 +36,16 @@ node(label: 'ubuntu') { } stage('Run tests') { - environmentDockerImage.inside('-i --name brooklyn-${DOCKER_TAG} --mount type=bind,source="${HOME}/.m2/settings.xml",target=/var/maven/.m2/settings.xml,readonly -v ${WORKSPACE}:/usr/build -w /usr/build') { - sh 'mvn clean install -Prpm -Pdeb -Duser.home=/var/maven -Duser.name=jenkins' + environmentDockerImage.inside('-i --name brooklyn-${DOCKER_TAG} --mount type=bind,source="${HOME}/.m2/settings.xml",target=/var/maven/.m2/settings.xml,readonly -v /var/run/docker.sock:/var/run/docker.sock -v ${WORKSPACE}:/usr/build -w /usr/build') { + sh 'mvn clean install -Prpm -Pdeb -Pdocker -Duser.home=/var/maven -Duser.name=jenkins' } } // Conditional stage to deploy artifacts, when not building a PR if (env.CHANGE_ID == null) { stage('Deploy artifacts') { - environmentDockerImage.inside('-i --name brooklyn-${DOCKER_TAG} --mount type=bind,source="${HOME}/.m2/settings.xml",target=/var/maven/.m2/settings.xml,readonly -v ${WORKSPACE}:/usr/build -w /usr/build') { - sh 'mvn deploy -Prpm -Pdeb -DskipTests -Duser.home=/var/maven -Duser.name=jenkins' + environmentDockerImage.inside('-i --name brooklyn-${DOCKER_TAG} --mount type=bind,source="${HOME}/.m2/settings.xml",target=/var/maven/.m2/settings.xml,readonly -v /var/run/docker.sock:/var/run/docker.sock -v ${WORKSPACE}:/usr/build -w /usr/build') { + sh 'mvn deploy -Prpm -Pdeb -Pdocker -DskipTests -Duser.home=/var/maven -Duser.name=jenkins' } }