Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Hetzner mirror in CI #114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .orchestra/ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM ubuntu:22.04

COPY sources.list /etc/apt/sources.list
COPY sources.list.hetzner /etc/apt/sources.list.hetzner

COPY install-dependencies.sh \
install-system-dependencies.sh \
install-node-dependencies.sh \
/

RUN /install-dependencies.sh \
Expand Down
8 changes: 8 additions & 0 deletions .orchestra/ci/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ echo -e "$BOLD"
echo "################################################################################"
echo -e "$RESET"

if ping -c 1 -W 1 mirror.hetzner.com >/dev/null 2>&1; then
log "Selecting Hetzner APT mirror"
mv /etc/apt/sources.list.hetzner /etc/apt/sources.list
else
log "Not running on Hetzner, using preconfigured APT mirror"
fi

log "Updating system dependencies..."

# Install missing dependencies
.orchestra/ci/install-dependencies.sh
Expand Down
1 change: 1 addition & 0 deletions .orchestra/ci/install-system-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ PACKAGES+=(python3)
PACKAGES+=(python3-pip)
PACKAGES+=(python3-setuptools)
PACKAGES+=(gawk)
PACKAGES+=(inetutils-ping)
PACKAGES+=(jq)
PACKAGES+=(rsync)
PACKAGES+=(sed)
Expand Down
11 changes: 11 additions & 0 deletions .orchestra/ci/sources.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
deb https://mirror.23m.com/ubuntu/ jammy main restricted
deb https://mirror.23m.com/ubuntu/ jammy-updates main restricted
deb https://mirror.23m.com/ubuntu/ jammy universe
deb https://mirror.23m.com/ubuntu/ jammy-updates universe
deb https://mirror.23m.com/ubuntu/ jammy multiverse
deb https://mirror.23m.com/ubuntu/ jammy-updates multiverse
deb https://mirror.23m.com/ubuntu/ jammy-backports main restricted universe multiverse
deb https://mirror.23m.com/ubuntu/ jammy-security main restricted
deb https://mirror.23m.com/ubuntu/ jammy-security universe
deb https://mirror.23m.com/ubuntu/ jammy-security multiverse

11 changes: 11 additions & 0 deletions .orchestra/ci/sources.list.hetzner
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
deb https://mirror.hetzner.com/ubuntu/packages jammy main restricted
deb https://mirror.hetzner.com/ubuntu/packages jammy-updates main restricted
deb https://mirror.hetzner.com/ubuntu/packages jammy universe
deb https://mirror.hetzner.com/ubuntu/packages jammy-updates universe
deb https://mirror.hetzner.com/ubuntu/packages jammy multiverse
deb https://mirror.hetzner.com/ubuntu/packages jammy-updates multiverse
deb https://mirror.hetzner.com/ubuntu/packages jammy-backports main restricted universe multiverse
deb https://mirror.hetzner.com/ubuntu/security jammy-security main restricted
deb https://mirror.hetzner.com/ubuntu/security jammy-security universe
deb https://mirror.hetzner.com/ubuntu/security jammy-security multiverse