Update release process TASKS
[arvados-dev.git] / jenkins / upload_packages_testing_to_stable.sh
index 5b3dd384e4d787b95aec291ffa760992db9db67e..4cf3737f79a4c2409a4910543ed867c6c46d0a62 100755 (executable)
@@ -22,8 +22,8 @@ if [ -z "${PACKAGES_TO_PUBLISH}" ]; then
 fi
 if [ -z "${LSB_DISTRIB_CODENAMES}" ]; then
   echo "You must provide a space-separated list of LSB distribution codenames to which you want to publish to, ie."
-  echo "* Debian: jessie, xenial, stretch, etc."
-  echo "* Centos: centos7 (the only one currently supported.)"
+  echo "* Debian/Ubuntu: buster, bullseye, focal"
+  echo "* Redhat: centos7 rocky8"
   exit 255
 fi
 
@@ -46,17 +46,26 @@ PACKAGES_LIST=$(echo ${PACKAGES_TO_PUBLISH} | sed 's/versions://g; s/\([a-z-]*\)
 
 DISTROS=$(echo "${LSB_DISTRIB_CODENAMES}"|sed s/[[:space:]]/,/g |tr '[:upper:]' '[:lower:]')
 
-if ( echo ${LSB_DISTRIB_CODENAMES} |grep -q centos ); then
+if ( echo ${LSB_DISTRIB_CODENAMES} |grep -q -E '(centos|rocky)' ); then
   REPO_SERVER=${RPM_REPO_SERVER}
 else
   REPO_SERVER=${APT_REPO_SERVER}
 fi
 
-REMOTE_CMD="/usr/local/bin/testing_to_stable_publish_packages.sh --distros ${DISTROS} --packages ${PACKAGES_LIST}"
+# Make sure jenkins scripts are up to date
+ssh -t \
+    -l jenkinsapt \
+    -p $SSH_PORT \
+    -o "StrictHostKeyChecking no" \
+    -o "ConnectTimeout 5" \
+    ${REPO_SERVER} \
+    "cd ~/arvados-dev && git fetch -a && git reset --hard origin/main"
 
 # Now we execute it remotely
 TMP_FILE=`mktemp`
 
+REMOTE_CMD="~/arvados-dev/jenkins/testing_to_stable_publish_packages.sh --distros ${DISTROS} --packages ${PACKAGES_LIST}"
+
 ssh -t \
     -l jenkinsapt \
     -p $SSH_PORT \