[ARVADOS-DEV] updated: 865a75b0ccb7deb88349740315362f506917b2fe
Git user
git at public.arvados.org
Wed Nov 18 19:38:11 UTC 2020
Summary of changes:
jenkins/upload_packages_testing_to_stable.sh | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
via 865a75b0ccb7deb88349740315362f506917b2fe (commit)
from e0b13b8f200c8744b5a6b7d6c63136c72dd3c9c8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 865a75b0ccb7deb88349740315362f506917b2fe
Author: Ward Vandewege <ward at curii.com>
Date: Wed Nov 18 14:37:48 2020 -0500
Add extra validation to upload_packages_testing_to_stable.sh: only
numbered releases should be allowed.
No issue #
Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>
diff --git a/jenkins/upload_packages_testing_to_stable.sh b/jenkins/upload_packages_testing_to_stable.sh
index 3d2bae9..16c44f4 100755
--- a/jenkins/upload_packages_testing_to_stable.sh
+++ b/jenkins/upload_packages_testing_to_stable.sh
@@ -7,8 +7,6 @@
# Parameters: list of packages, space separated, to move from *-testing to *
# under /var/lib/freight/apt/ in host public.curoverse.com
-set -x
-
APT_REPO_SERVER="apt.arvados.org"
RPM_REPO_SERVER="rpm.arvados.org"
@@ -29,6 +27,18 @@ if [ -z "${LSB_DISTRIB_CODENAMES}" ]; then
exit 255
fi
+# Only numbered package versions are supposed to go into the stable repositories
+TMP=$(echo "$PACKAGES_TO_PUBLISH" | sed 's/versions://g;')
+VALIDATED_PACKAGES_TO_PUBLISH=`echo "$TMP" | sed -nE '/^.*: [0-9].[0-9].[0-9]-[0-9]$/p'`
+
+if [[ "$TMP" != "$VALIDATED_PACKAGES_TO_PUBLISH" ]]; then
+ echo "The list of packages has invalid syntax. each line must be of the format:"
+ echo
+ echo "packagename: [0-9].[0-9].[0-9]-[0-9]"
+ echo
+ exit 253
+fi
+
# Sanitize the vars in a way suitable to be used by the remote 'publish_packages.sh' script
# Just to make copying a single line, and not having to loop over it
PACKAGES_LIST=$(echo ${PACKAGES_TO_PUBLISH} | sed 's/versions://g; s/\([a-z-]*\):[[:blank:]]*\([0-9.-]*\)/\1*\2*,/g; s/[[:blank:]]//g; s/,$//g;')
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list