From 161daff8b6c13ea244745f99d899702e7bd77a9d Mon Sep 17 00:00:00 2001 From: Paul Cammish Date: Fri, 6 Aug 2021 12:57:32 +0000 Subject: [PATCH] Update CI testing --- .gitlab-ci.yml | 78 +++++++++++++++++------------------ autotest/install_then_upgrade | 36 ++-------------- 2 files changed, 43 insertions(+), 71 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5986c6a6..b45083fd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -120,42 +120,42 @@ Clean Install: - repo/* expire_in: 1 hour -#Upgrade Testing: -# tags: -# - vbox:bullseye -# stage: Upgrade -# script: -# - chmod -x $( which gitlab-runner ) -# - git describe --all -# - autotest/install_then_upgrade bullseye-testing -# - run-parts --verbose --exit-on-error autotest/test.d -# - hostname -# - dpkg -l 'sympl*' -# allow_failure: false -# variables: -# CI_DEBUG_TRACE: "false" -# artifacts: -# paths: -# - repo/* -# expire_in: 1 hour -# -#Upgrade Stable: -# tags: -# - vbox:bullseye -# stage: Upgrade -# script: -# - chmod -x $( which gitlab-runner ) -# - git describe --all -# - autotest/install_then_upgrade bullseye -# - run-parts --verbose --exit-on-error autotest/test.d -# - hostname -# - dpkg -l 'sympl*' -# allow_failure: false -# when: delayed -# start_in: 5 minutes -# variables: -# CI_DEBUG_TRACE: "false" -# artifacts: -# paths: -# - repo/* -# expire_in: 1 hour +Upgrade Testing: + tags: + - vbox:bullseye + stage: Upgrade + script: + - chmod -x $( which gitlab-runner ) + - git describe --all + - autotest/install_then_upgrade bullseye-testing + - run-parts --verbose --exit-on-error autotest/test.d + - hostname + - dpkg -l 'sympl*' + allow_failure: false + variables: + CI_DEBUG_TRACE: "false" + artifacts: + paths: + - repo/* + expire_in: 1 hour + +Upgrade Stable: + tags: + - vbox:bullseye + stage: Upgrade + script: + - chmod -x $( which gitlab-runner ) + - git describe --all + - autotest/install_then_upgrade bullseye + - run-parts --verbose --exit-on-error autotest/test.d + - hostname + - dpkg -l 'sympl*' + allow_failure: false + when: delayed + start_in: 5 minutes + variables: + CI_DEBUG_TRACE: "false" + artifacts: + paths: + - repo/* + expire_in: 1 hour diff --git a/autotest/install_then_upgrade b/autotest/install_then_upgrade index 2bba886c..4741a677 100755 --- a/autotest/install_then_upgrade +++ b/autotest/install_then_upgrade @@ -11,8 +11,8 @@ REPO=$1 head -n 1 ./*/debian/changelog | grep '^sympl' | sed -e 's|(||' -e 's|).*||' | sort > /tmp/local_versions -wget -q -O - "http://packages.mythic-beasts.com/mythic/dists/$REPO/main/source/Sources.gz" \ - | gunzip \ +wget -q -O - "http://packages.mythic-beasts.com/mythic/dists/$REPO/main/source/Sources.xz" \ + | unxz \ | grep -A 2 '^Package: sympl' \ | grep -v ^Binary \ | sed -e 's|^Package: ||' -e 's|^Version: ||' \ @@ -21,12 +21,6 @@ wget -q -O - "http://packages.mythic-beasts.com/mythic/dists/$REPO/main/source/S | sort -r \ > /tmp/packages -#echo local_versons -#cat /tmp/local_versions -#echo --- -#echo packages -#cat /tmp/packages - cp /tmp/local_versions /tmp/from_repo cat /tmp/local_versions | while read PACKAGE LOCAL_VER ; do @@ -50,7 +44,6 @@ done rm /tmp/check-package /tmp/packages -#diff /tmp/from_repo /tmp/local_versions echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections apt-get -qq update @@ -66,37 +59,16 @@ echo "deb [trusted=yes] file:/repo local main" > /etc/apt/sources.list.d/local.l apt-get -qq update -# Remove sympl-phpmyadmin from initial install -# TODO: Revert this once pushed to stable -grep -v sympl-phpmyadmin /tmp/from_repo > /tmp/from_repo_nosympl-phpmyadmin - echo ---------- Installing ----------- -cat /tmp/from_repo_nosympl-phpmyadmin | tr ' ' '\t' +cat /tmp/from_repo | tr ' ' '\t' echo --------------------------------- -apt-get -q -y install --allow-unauthenticated --install-recommends $( cat /tmp/from_repo_nosympl-phpmyadmin | tr ' ' '=' | tr '\n' ' ' ) +apt-get -q -y install --allow-unauthenticated --install-recommends $( cat /tmp/from_repo | tr ' ' '=' | tr '\n' ' ' ) rm /etc/apt/sources.list.d/sympl_mythic-beasts.list - -if [ "$(lsb_release -c -s)" == "buster" ]; then - if [ $( cat /etc/apt/sources.list /etc/apt/sources.list.d/*.list | sed 's|#.*||' | grep -c '^deb .* buster-backports' ) -lt 1 ]; then - echo -n 'Enabling Debian buster-backports repo for phpmyadmin...' - echo "deb http://deb.debian.org/debian buster-backports main" > /etc/apt/sources.list.d/enable_backports.list - echo ' ok' - fi - if [ ! -f /etc/apt/preferences.d/sympl-phpmyadmin ]; then - echo -n 'Enabling install of phpmyadmin from backports...' - echo -e "Package: phpmyadmin\nPin: release a=buster-backports\nPin-Priority: 900" > /etc/apt/preferences.d/sympl-phpmyadmin - echo -e "Package: php-twig\nPin: release a=buster-backports\nPin-Priority: 900" >> /etc/apt/preferences.d/sympl-phpmyadmin - echo ' ok' - fi -fi - apt-get -qq update -apt-get -q -y install phpmyadmin - echo ----------- Upgrading ----------- diff /tmp/from_repo /tmp/local_versions | grep '^> ' | sed -e 's|> ||' | tr ' ' '\t' echo --------------------------------- -- GitLab