Skip to content

Commit

Permalink
Cirrus: Update to F31 + Use cache images
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Evich <[email protected]>
  • Loading branch information
cevich committed Jan 2, 2020
1 parent 32c9595 commit 87a0795
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 89 deletions.
11 changes: 6 additions & 5 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ env:
####
# GCE project where images live
IMAGE_PROJECT: "libpod-218412"
# TODO: Setting up from base-images is very inefficient, use libpod's cache-images instead?
FEDORA_CACHE_IMAGE_NAME: "fedora-cloud-base-30-1-2-1565360543"
PRIOR_FEDORA_CACHE_IMAGE_NAME: "fedora-cloud-base-29-1-2-1565360543"
UBUNTU_CACHE_IMAGE_NAME: "ubuntu-1904-disco-v20190724"
PRIOR_UBUNTU_CACHE_IMAGE_NAME: "ubuntu-1804-bionic-v20190722a"
_BUILT_IMAGE_SUFFIX: "libpod-6228273469587456"
FEDORA_CACHE_IMAGE_NAME: "fedora-31-${_BUILT_IMAGE_SUFFIX}"
PRIOR_FEDORA_CACHE_IMAGE_NAME: "fedora-30-${_BUILT_IMAGE_SUFFIX}"
UBUNTU_CACHE_IMAGE_NAME: "ubuntu-19-${_BUILT_IMAGE_SUFFIX}"
PRIOR_UBUNTU_CACHE_IMAGE_NAME: "ubuntu-18-${_BUILT_IMAGE_SUFFIX}"


####
#### Command variables to help avoid duplication
Expand Down
83 changes: 0 additions & 83 deletions contrib/cirrus/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,108 +2,25 @@

set -e

# N/B: Most development-related packages are pulled in automaticly by
# 'build-essential' (on ubuntu), for Feodra the groups
# '@C Development Tools and Libraries' and '@Development Tools'
# are similar.

UBUNTU_PACKAGES="
aufs-tools
bats
bzip2
coreutils
curl
git
go-md2man
golang
libdevmapper-dev
libglib2.0-dev
libgpgme11-dev
libseccomp-dev
libselinux-dev
openssl
podman
netcat
rsync
scons
vim
wget
yum-utils
zlib1g-dev
xz-utils
"

FEDORA_PACKAGES="
bats
btrfs-progs-devel
bzip2
containers-common
device-mapper-devel
findutils
git
glib2-devel
glibc-static
gnupg
go-md2man
golang
gpgme-devel
libassuan-devel
libseccomp-devel
make
nmap-ncat
ostree-devel
podman
rsync
runc
skopeo-containers
wget
xz
"

source $(dirname $0)/lib.sh

install_ooe

echo "Setting up $OS_RELEASE_ID $OS_RELEASE_VER" # STUB: Add VM setup instructions here
cd $GOSRC
case "$OS_REL_VER" in
fedora-*)
# Filling up cache is very slow and failures can last quite a while :(
$LONG_DNFY install \
'@C Development Tools and Libraries' '@Development Tools' \
$FEDORA_PACKAGES
# Executing tests in a container requires SELinux boolean set on the host
if [[ "$IN_PODMAN" == "true" ]]
then
setsebool -P container_manage_cgroup true
fi
;;
ubuntu-*)
$SHORT_APTGET update
$LONG_APTGET upgrade
$SHORT_APTGET install software-properties-common
ppas=(ppa:projectatomic/ppa)
if [[ "$OS_RELEASE_VER" == "18" ]]
then
ppas+=(ppa:longsleep/golang-backports) # newer golang
fi
for ppa in ${ppas[@]}; do
timeout_attempt_delay_command 30 2 30 \
add-apt-repository --yes $ppa
done
$SHORT_APTGET update
$LONG_APTGET install \
build-essential \
$UBUNTU_PACKAGES
;;
*)
bad_os_id_ver
;;
esac

# Previously, golang was not installed
source $(dirname $0)/lib.sh

show_env_vars

if [[ -z "$CROSS_TARGET" ]]
Expand Down
3 changes: 2 additions & 1 deletion hack/get_ci_vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ delvm() {
}

image_hints() {
_BIS=$(egrep -m 1 '_BUILT_IMAGE_SUFFIX:[[:space:]+"[[:print:]]+"' "$BUILDAHROOT/.cirrus.yml" | cut -d: -f 2 | tr -d '"[:blank:]')
egrep '[[:space:]]+[[:alnum:]].+_CACHE_IMAGE_NAME:[[:space:]+"[[:print:]]+"' \
"$BUILDAHROOT/.cirrus.yml" | cut -d: -f 2 | tr -d '"[:blank:]' | \
grep -v 'notready' | sort -u
sed -r -e "s/\\\$[{]_BUILT_IMAGE_SUFFIX[}]/$_BIS/" | sort -u
}

show_usage() {
Expand Down

0 comments on commit 87a0795

Please sign in to comment.