diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2019-07-12 02:08:15 +0200 |
---|---|---|
committer | Evgeny Vereshchagin <evvers@ya.ru> | 2019-07-13 00:40:51 +0200 |
commit | 86788375638c8fcdac43f1319bc033367ec44e03 (patch) | |
tree | edcc8bc6786e7308719bc0b74b2743c9f39e00a1 /semaphoreci | |
parent | Merge pull request #13036 from poettering/more-doc-fixes (diff) | |
download | systemd-86788375638c8fcdac43f1319bc033367ec44e03.tar.xz systemd-86788375638c8fcdac43f1319bc033367ec44e03.zip |
semaphore: avoid running autopkgtest with --apt-upgrade
by getting rid of the cache and upgrading images once every
time they are built from scratch.
Diffstat (limited to 'semaphoreci')
-rwxr-xr-x | semaphoreci/semaphore-runner.sh | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/semaphoreci/semaphore-runner.sh b/semaphoreci/semaphore-runner.sh index 41454b474a..47a0ea029a 100755 --- a/semaphoreci/semaphore-runner.sh +++ b/semaphoreci/semaphore-runner.sh @@ -8,9 +8,7 @@ RELEASE=${RELEASE:-buster} BRANCH=${BRANCH:-experimental} ARCH=${ARCH:-amd64} CONTAINER=${RELEASE}-${ARCH} -MAX_CACHE_AGE=604800 # one week CACHE_DIR=${SEMAPHORE_CACHE_DIR:=/tmp} -CACHE="${CACHE_DIR}/${CONTAINER}.img.tar.gz" AUTOPKGTEST_DIR="${CACHE_DIR}/autopkgtest" # semaphore cannot expose these, but useful for interactive/local runs ARTIFACTS_DIR=/tmp/artifacts @@ -37,11 +35,9 @@ while [ -z "\$(ip route list 0/0)" ]; do sleep 1; done apt-get -q --allow-releaseinfo-change update apt-get -y dist-upgrade apt-get install -y eatmydata +apt-get purge --auto-remove -y unattended-upgrades EOF sudo lxc-stop -n $CONTAINER - - # cache it - sudo tar cpzf "$CACHE" /var/lib/lxc/$CONTAINER } for phase in "${PHASES[@]}"; do @@ -58,12 +54,7 @@ for phase in "${PHASES[@]}"; do [ -d $AUTOPKGTEST_DIR ] || git clone --quiet --depth=1 https://salsa.debian.org/ci-team/autopkgtest.git "$AUTOPKGTEST_DIR" - # use cached container image, unless older than a week - if [ -e "$CACHE" ] && [ $(( $(date +%s) - $(stat -c %Y "$CACHE") )) -le $MAX_CACHE_AGE ]; then - sudo tar -C / -xpzf "$CACHE" - else - create_container - fi + create_container ;; RUN) # add current debian/ packaging @@ -98,8 +89,7 @@ EOF # now build the package and run the tests rm -rf "$ARTIFACTS_DIR" # autopkgtest exits with 2 for "some tests skipped", accept that - $AUTOPKGTEST_DIR/runner/autopkgtest --apt-upgrade \ - --env DEB_BUILD_OPTIONS=noudeb \ + $AUTOPKGTEST_DIR/runner/autopkgtest --env DEB_BUILD_OPTIONS=noudeb \ --env TEST_UPSTREAM=1 ../systemd_*.dsc \ -o "$ARTIFACTS_DIR" \ -- lxc -s $CONTAINER \ |