Bump build-timeout for lftools to 30 minutes
[releng/builder.git] / jjb / packaging / build-rpm-snap.sh
index ebecea802b8a61d68591de7e4f0112b7dc9dae7c..402bc882b89bc892938c8429999bf5e9a9de08ac 100644 (file)
@@ -14,21 +14,18 @@ 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
-  VERSION_MAJOR=6
-elif [ "$STREAM" == "nitrogen" ]; then
-  VERSION_MAJOR=7
-elif [ "$STREAM" == "oxygen" ]; then
-  VERSION_MAJOR=8
+if [ "$STREAM" == "sodium" ]; then
+  VERSION_MAJOR=11
+elif [ "$STREAM" == "magnesium" ]; then
+  VERSION_MAJOR=12
+elif [ "$STREAM" == "aluminium" ]; then
+  VERSION_MAJOR=13
+elif [ "$STREAM" == "silicon" ]; then
+  VERSION_MAJOR=14
 else
   echo "Unable to convert stream to major version"
+  echo "MAINTAINER: Update if/else switch above with recent stream/ver pairs"
   exit 1
 fi
 
@@ -38,9 +35,3 @@ fi
                                          --changelog_email "$CHANGELOG_EMAIL" \
                                          latest_snap \
                                          --major "$VERSION_MAJOR"
-
-# Copy the rpm to be upload
-UPLOAD_FILES_PATH="$WORKSPACE/upload_files"
-mkdir -p "$UPLOAD_FILES_PATH"
-mv "/home/$USER/rpmbuild/RPMS/noarch/"*.rpm "$_"
-mv "/home/$USER/rpmbuild/SRPMS/"*.rpm "$_"