semaphore: try to use different keyservers
Recently the Semaphore CI started to fail pretty much constantly due to GPG key verification fails. After a quick search this is a pretty common issue with the Ubuntu keyserver in the last month. To make this, hopefully, a bit more stable, let's use a few different keyservers in case some of them fail.
This commit is contained in:
parent
fc9e3b8129
commit
493c965657
|
@ -16,11 +16,13 @@ PHASES=(${@:-SETUP RUN})
|
||||||
UBUNTU_RELEASE="$(lsb_release -cs)"
|
UBUNTU_RELEASE="$(lsb_release -cs)"
|
||||||
|
|
||||||
create_container() {
|
create_container() {
|
||||||
# create autopkgtest LXC image; this sometimes fails with "Unable to fetch
|
# Create autopkgtest LXC image; this sometimes fails with "Unable to fetch
|
||||||
# GPG key from keyserver", so retry a few times
|
# GPG key from keyserver", so retry a few times with different keyservers.
|
||||||
for retry in {1..5}; do
|
for keyserver in "" "keys.gnupg.net" "keys.openpgp.org" "keyserver.ubuntu.com"; do
|
||||||
sudo lxc-create -n $CONTAINER -t download -- -d $DISTRO -r $RELEASE -a $ARCH --keyserver hkp://keyserver.ubuntu.com:80 && break
|
for retry in {1..5}; do
|
||||||
sleep $((retry*retry))
|
sudo lxc-create -n $CONTAINER -t download -- -d $DISTRO -r $RELEASE -a $ARCH ${keyserver:+--keyserver "$keyserver"} && break 2
|
||||||
|
sleep $((retry*retry))
|
||||||
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
# unconfine the container, otherwise some tests fail
|
# unconfine the container, otherwise some tests fail
|
||||||
|
|
Loading…
Reference in New Issue