This is an automated email from the ASF dual-hosted git repository. tbouron pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/brooklyn.git
The following commit(s) were added to refs/heads/master by this push: new ae872cd Add jenkinsfile for multibranch job on Jenkins new 4a83d86 Merge pull request #33 from tbouron/master ae872cd is described below commit ae872cda08b0a5ed5662597162cd17032df9b075 Author: Thomas Bouron <thomas.bou...@cloudsoftcorp.com> AuthorDate: Tue Dec 3 11:33:28 2019 +0000 Add jenkinsfile for multibranch job on Jenkins --- Dockerfile | 11 ++++++++++- Jenkinsfile | 23 +++++++++++++++++++---- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index d681655..0f8f2b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,6 +30,8 @@ RUN apt-get update && apt-get install -y \ rpm \ dpkg \ libpng-dev \ + libjpeg-progs \ + pngquant \ make \ automake \ autoconf \ @@ -39,6 +41,13 @@ RUN apt-get update && apt-get install -y \ nasm \ gcc -# For mvn-build +# Make sure the /.config && /.npm (for UI module builds) is writable for all users +RUN mkdir -p /.config && chmod -R 777 /.config +RUN mkdir -p /.npm && chmod -R 777 /.npm + +# Make sure the /var/tmp (for RPM build) is writable for all users +RUN mkdir -p /var/tmp/ && chmod -R 777 /var/tmp/ + +# Make sure the /var/maven is writable for all users RUN mkdir -p /var/maven/.m2/ && chmod -R 777 /var/maven/ ENV MAVEN_CONFIG=/var/maven/.m2 diff --git a/Jenkinsfile b/Jenkinsfile index c41da46..4461e53 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,6 +18,21 @@ */ node(label: 'ubuntu') { + def triggers = [] + if (env.CHANGE_ID) { + triggers.push(issueCommentTrigger('.*test this please.*')) + } + if (env.BRANCH_NAME == 'master') { + triggers.push(upstream( + threshold: 'SUCCESS', + upstreamProjects: '../brooklyn-server/master, ../brooklyn-library/master, ../brooklyn-ui/master, ../brooklyn-client/master, ../brooklyn-dist/master' + )) + } + + properties([ + pipelineTriggers(triggers) + ]) + catchError { def environmentDockerImage @@ -38,16 +53,16 @@ node(label: 'ubuntu') { } stage('Run tests') { - environmentDockerImage.inside('-i --rm --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 -Duser.home=/var/maven -Duser.name=jenkins' + 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 ${WORKSPACE}:/usr/build -w /usr/build') { + sh 'mvn clean install -Prpm -Pdeb -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 --rm --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 -DskipTests -Duser.home=/var/maven -Duser.name=jenkins' + 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 ${WORKSPACE}:/usr/build -w /usr/build') { + sh 'mvn deploy -Prpm -Pdeb -DskipTests -Duser.home=/var/maven -Duser.name=jenkins' } } }