X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fpackaging%2Fbuild-rpm.sh;h=da0fdcf6d275e0d36530d47bd238551e74d55b99;hb=10a7971e7547543096f4d540270d1211fe5d2104;hp=3911cc15ac45880cbfafe51527b68b91fa63e565;hpb=f0a041288926db430da904b18a2f8a627248c569;p=releng%2Fbuilder.git diff --git a/jjb/packaging/build-rpm.sh b/jjb/packaging/build-rpm.sh index 3911cc15a..da0fdcf6d 100644 --- a/jjb/packaging/build-rpm.sh +++ b/jjb/packaging/build-rpm.sh @@ -46,18 +46,28 @@ fi --changelog_name "$CHANGELOG_NAME" \ --changelog_email "$CHANGELOG_EMAIL" \ direct \ - --download_url "$DOWNLOAD_URL" + --download_url "$DOWNLOAD_URL" \ + --pkg_version "$PKG_VERSION_OVERRIDE" -# Publish RPMs to Nexus if in production Jenkins, else host on sandbox Jenkins -if [ "$SILO" == "sandbox" ]; then - echo "Not uploading RPMs to Nexus because running in sandbox" -elif [ "$SILO" == "releng" ]; then +# Always allow push to scratch repos, only push to CD repos in RelEng Jenkins +if [ "$DEPLOY_TO_REPO" == "opendaylight-epel-7-x86_64-devel" ]; then # Move RPMs (SRPM and noarch) to dir of files that will be uploaded to Nexus UPLOAD_FILES_PATH="$WORKSPACE/upload_files" mkdir -p "$UPLOAD_FILES_PATH" cp "$HOME/rpmbuild/RPMS/noarch/"*.rpm "$_" cp "$HOME/rpmbuild/SRPMS/"*.rpm "$_" else - echo "Unknown Jenkins silo: $SILO" - exit 1 + # Publish RPMs to CD repos if in production Jenkins, not in sandbox Jenkins + if [ "$SILO" == "sandbox" ]; then + echo "Not uploading RPMs to Nexus because running in sandbox" + elif [ "$SILO" == "releng" ]; then + # Move RPMs (SRPM+noarch) to dir of files that will be uploaded to Nexus + UPLOAD_FILES_PATH="$WORKSPACE/upload_files" + mkdir -p "$UPLOAD_FILES_PATH" + cp "$HOME/rpmbuild/RPMS/noarch/"*.rpm "$_" + cp "$HOME/rpmbuild/SRPMS/"*.rpm "$_" + else + echo "Unknown Jenkins silo: $SILO" + exit 1 + fi fi