X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Fmultipatch-distribution.sh;h=16cc153ad0589db1ac826459b980b5dc6e191edc;hb=d7c3880fe4578a70a16e2237bb8be8a1742c0291;hp=f5711aedd1090be38e1b8c63f3cef553ad9e8c58;hpb=2e838d8f80489e6c8804f2e0184c7630c13f32df;p=releng%2Fbuilder.git diff --git a/jjb/integration/multipatch-distribution.sh b/jjb/integration/multipatch-distribution.sh index f5711aedd..16cc153ad 100644 --- a/jjb/integration/multipatch-distribution.sh +++ b/jjb/integration/multipatch-distribution.sh @@ -8,22 +8,18 @@ # create a fresh empty place to build this custom distribution BUILD_DIR=${WORKSPACE}/patch_tester -POM_FILE=${WORKSPACE}/patch_tester/pom.xml DISTRIBUTION_BRANCH_TO_BUILD=$DISTROBRANCH #renaming variable for clarity +MAVEN_OPTIONS="$(echo --show-version \ + --batch-mode \ + -Djenkins \ + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ + -Dmaven.repo.local=/tmp/r \ + -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r)" rm -rf $BUILD_DIR mkdir -p $BUILD_DIR cd $BUILD_DIR || exit 1 -# create a root pom that will contain a module for each project we have a patch for -echo "" >> $POM_FILE -echo "org.opendaylight.test" >> $POM_FILE -echo "test" >> $POM_FILE -echo "0.1" >> $POM_FILE -echo "4.0.0" >> $POM_FILE -echo "pom" >> $POM_FILE -echo "" >> $POM_FILE - # Set up git committer name and email, needed for commit creation when cherry-picking. export EMAIL="sandbox@jenkins.opendaylight.org" # TODO: Is there a more appropriate e-mail? @@ -69,7 +65,6 @@ do PROJECT_SHORTNAME="${PROJECT##*/}" # http://stackoverflow.com/a/3162500 echo "cloning project ${PROJECT}" git clone "https://git.opendaylight.org/gerrit/p/${PROJECT}" - echo "${PROJECT_SHORTNAME}" >> ${POM_FILE} cd ${PROJECT_SHORTNAME} || exit 1 if [ "$(echo -n ${proto_patch} | tail -c 1)" == 'r' ]; then pure_patch="$(echo -n $proto_patch | head -c -1)" @@ -100,6 +95,14 @@ do # Here 'r' means release. Useful for testing Nitrogen Odlparent changes. find . -name "*.xml" -print0 | xargs -0 sed -i 's/-SNAPSHOT//g' fi + # Build project + "$MVN" clean install \ + -e -Pq \ + -Dstream=oxygen \ + -DskipTests=true \ + --global-settings "$GLOBAL_SETTINGS_FILE" \ + --settings "$SETTINGS_FILE" \ + $MAVEN_OPTIONS cd "${BUILD_DIR}" || exit 1 done @@ -109,10 +112,14 @@ if [ "${distribution_status}" == "not_included" ]; then git clone "https://git.opendaylight.org/gerrit/p/integration/distribution" cd distribution || exit 1 git checkout "${DISTRIBUTION_BRANCH_TO_BUILD}" + # Build project + "$MVN" clean install \ + -e -Pq \ + -Dstream="$DISTROSTREAM" \ + -DskipTests=true \ + --global-settings "$GLOBAL_SETTINGS_FILE" \ + --settings "$SETTINGS_FILE" \ + $MAVEN_OPTIONS cd "${BUILD_DIR}" || exit 1 - echo "distribution" >> ${POM_FILE} fi -# finish pom file -echo "" >> "${POM_FILE}" -echo "" >> "${POM_FILE}"