]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
obey no-test build trigger and add figlet output
authorHolger Levsen <holger@layer-acht.org>
Fri, 26 Jul 2013 15:41:31 +0000 (17:41 +0200)
committerHolger Levsen <holger@layer-acht.org>
Fri, 26 Jul 2013 15:41:31 +0000 (17:41 +0200)
maven_post_build_debian_wrapper.sh
maven_pre_build_debian_wrapper.sh

index abe185b722ddb48b5668d0227ba9c140939abaf7..d071faa9ee626c9134e8227c61348b94ba897b8c 100755 (executable)
@@ -99,6 +99,7 @@ if [ "$D" != "$DISTRIBUTION" ] ; then
        dpkg-parsechangelog
        exit 1
 fi
+figlet "$DISTRIBUTION"
 
 # build debian package (just binary, no source package)
 dpkg-buildpackage -us -uc -b
@@ -109,6 +110,7 @@ cd $WORKSPACE/..
 # upload
 dcmd scp $CHANGES_FILE reprepro@alexandria.pb.local:/srv/$REPO/incoming/profitbricks/
 ssh reprepro@alexandria.pb.local /srv/$REPO/bin/pb_processincoming
+figlet "Uploaded."
 # cleanp
 dcmd rm $CHANGES_FILE
 cd $WORKSPACE
@@ -122,6 +124,7 @@ if [ "$GIT_BRANCH_NAME" = "master" ] || [ "${GIT_BRANCH_NAME:0:7}" = "hotfix/" ]
        git tag $TAG
        git push origin $GIT_BRANCH_NAME
        git push origin $TAG
+       figlet "Tagged."
 fi
 
 # show the changelog
@@ -134,6 +137,7 @@ cleanup
 if [ ${GIT_BRANCH_NAME:0:8} = "feature/" ] || [ ${GIT_BRANCH_NAME:0:7} = "bugfix/" ]; then
         if [[ "$BUILD_TRIGGERS" == *"merge"* ]]; then
                git push origin integration
+               figlet "Pushed to integration."
                git checkout origin/$GIT_BRANCH_NAME -b $GIT_BRANCH_NAME
        fi
 fi
index 436ffc54f94ad57695b14395560067947ca7d763..38c410627fbc1704e5a6991dc2a38346013d8c4b 100755 (executable)
@@ -17,6 +17,13 @@ cd $WORKSPACE
 [ -d .repository ] && rm .repository -rf && echo "$WORKSPACE/.repository (used by Maven) removed"
 # clean up git
 git reset --hard
+# respect build-triggers (triggered from a git commit message containing the string [no-test])
+if [[ "$BUILD_TRIGGERS" == *"no-test"* ]]; then
+       export NO_TEST="true"
+fi
+
+echo "About to build branch:"
+figlet "$GIT_BRANCH_NAME"
 
 if [ ${GIT_BRANCH_NAME:0:8} = "feature/" ] || [ ${GIT_BRANCH_NAME:0:7} = "bugfix/" ] ; then
        if [[ "$BUILD_TRIGGERS" == *"merge"* ]]; then
@@ -29,6 +36,7 @@ if [ ${GIT_BRANCH_NAME:0:8} = "feature/" ] || [ ${GIT_BRANCH_NAME:0:7} = "bugfix
                git pull origin integration
                echo "Trying to fast-forward merge $GIT_BRANCH_NAME..."
                git fetch origin -fp
+               figlet "integration merge"
                git merge --no-ff origin/$GIT_BRANCH_NAME
        fi
 elif [ "$GIT_BRANCH_NAME" = "master" ] || [ "${GIT_BRANCH_NAME:0:7}" = "hotfix/" ] ; then