You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by tb...@apache.org on 2019/12/05 11:06:35 UTC

[brooklyn-library] branch master updated: Reuse local maven cache + add PR comment trigger

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-library.git


The following commit(s) were added to refs/heads/master by this push:
     new 09b8f68  Reuse local maven cache + add PR comment trigger
     new 56d817d  Merge pull request #176 from tbouron/feature/jenkins
09b8f68 is described below

commit 09b8f68d170cef63fc8eab92f3063efe8dd97196
Author: Thomas Bouron <th...@cloudsoftcorp.com>
AuthorDate: Thu Dec 5 10:26:05 2019 +0000

    Reuse local maven cache + add PR comment trigger
---
 Jenkinsfile | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 05aca28..50bc00b 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -18,6 +18,12 @@
  */
 
 node(label: 'ubuntu') {
+    properties([
+        pipelineTriggers([
+            issueCommentTrigger('.*test this please.*')
+        ])
+    ])
+
     catchError {
         def environmentDockerImage
 
@@ -36,7 +42,7 @@ 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') {
+                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 -Duser.home=/var/maven -Duser.name=jenkins'
                 }
             }
@@ -44,12 +50,10 @@ node(label: 'ubuntu') {
             // 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') {
+                    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 -DskipTests -Duser.home=/var/maven -Duser.name=jenkins'
                     }
                 }
-
-                // TODO: Publish docker image to https://hub.docker.com/r/apache/brooklyn/ ?
             }
         }
     }