Merge "Revert "Install odl-mdsal-trace in netvirt oxygen csit""
[releng/builder.git] / jjb / packaging / build-rpm-snap.sh
index b981c707b5ce9d5175b5723b8cdc0b79d4d2c92c..64c8ff1f08db2eaead6dd80e5e7c7b4f068d244b 100644 (file)
@@ -14,14 +14,8 @@ PYTHON="rpm_build/bin/python"
 $PYTHON -m pip install --upgrade pip
 $PYTHON -m pip install -r "$WORKSPACE/packaging/packages/requirements.txt"
 
-# Extract stream from job name (format: foo-job-name-<stream>)
-# shellcheck disable=SC1083
-STREAM=${{JOB_NAME##*-}}
-
 # Convert stream to numeric ODL major version
-if [ "$STREAM" == "boron" ]; then
-  VERSION_MAJOR=5
-elif [ "$STREAM" == "carbon" ]; then
+if [ "$STREAM" == "carbon" ]; then
   VERSION_MAJOR=6
 elif [ "$STREAM" == "nitrogen" ]; then
   VERSION_MAJOR=7
@@ -47,8 +41,8 @@ elif  [ "$SILO" == "releng" ]; 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"
-  mv "/home/$USER/rpmbuild/RPMS/noarch/"*.rpm "$_"
-  mv "/home/$USER/rpmbuild/SRPMS/"*.rpm "$_"
+  cp "/home/$USER/rpmbuild/RPMS/noarch/"*.rpm "$_"
+  cp "/home/$USER/rpmbuild/SRPMS/"*.rpm "$_"
 else
   echo "Unknown Jenkins silo: $SILO"
   exit 1