From: Holger Levsen Date: Fri, 26 Jul 2013 15:41:31 +0000 (+0200) Subject: obey no-test build trigger and add figlet output X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=e7f531adee62295268b11217a1a249df38f76a46;p=profitbricks%2Fjenkins-build-scripts.git obey no-test build trigger and add figlet output --- diff --git a/maven_post_build_debian_wrapper.sh b/maven_post_build_debian_wrapper.sh index abe185b..d071faa 100755 --- a/maven_post_build_debian_wrapper.sh +++ b/maven_post_build_debian_wrapper.sh @@ -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 diff --git a/maven_pre_build_debian_wrapper.sh b/maven_pre_build_debian_wrapper.sh index 436ffc5..38c4106 100755 --- a/maven_pre_build_debian_wrapper.sh +++ b/maven_pre_build_debian_wrapper.sh @@ -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