Skip to content

Commit

Permalink
Merge pull request #18 from bboozzoo/bboozzoo/spread-with-hosted-repo
Browse files Browse the repository at this point in the history
spread: add suite for testing with hosted repository
  • Loading branch information
bboozzoo authored Jan 30, 2024
2 parents 8d7d727 + 9791b47 commit b66e196
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
28 changes: 28 additions & 0 deletions spread.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ environment:
PATH: $PATH:/home/spread/spread/tests/lib/bin
LANG: "C.UTF-8"
LANGUAGE: "en"
BASE_REPO_URL: https://bboozzoo.github.io/snapd-amazon-linux

backends:
google:
Expand Down Expand Up @@ -84,5 +85,32 @@ suites:
rm -f /etc/yum.repos.d/spread.repo
rm -rfv "$SPREAD_PATH/repo-unpacked"
spread/prebuilt-repo/:
summary: run tests with prebuilt packages in the repository
prepare: |
# set up a place to unpack the repo
case "$SPREAD_SYSTEM" in
amazon-linux-2-*)
repo_suffix=amzn2
;;
amazon-linux-2023-*)
repo_suffix=al2023
;;
*)
echo "unsupported $SPREAD_SYSTEM system"
exit 1
;;
esac
wget -O /etc/yum.repos.d/snapd.repo ${BASE_REPO_URL}/${repo_suffix}/snapd.repo
# install snapd
yum install -y snapd
systemctl start snapd.socket
# wait for snapd to become ready
snap wait system seed.loaded
restore: |
yum erase -y snapd snap-confine
rm -f /etc/yum.repos.d/snapd.repo
spread/build/:
summary: package build
1 change: 1 addition & 0 deletions spread/prebuilt-repo

0 comments on commit b66e196

Please sign in to comment.