diff --git a/Jenkinsfile b/Jenkinsfile index 70f84614eb..6adee3bcb2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -45,7 +45,9 @@ node(label: 'ubuntu') { stage('Run tests') { environmentDockerImage.inside('-i --name brooklyn-${DOCKER_TAG} -v ${WORKSPACE}/.m2:/var/maven/.m2 --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' + sh 'addgroup -gid 999 docker' + sh 'usermod -aG docker $(whoami)' + sh 'mvn clean install -Prpm -Pdeb -Pdocker -Duser.home=/var/maven -Duser.name=jenkins -rf :karaf-docker-image' } } }