Skip to content

Commit d64d243

Browse files
committed
Merge branch 'upload-to-cdn-servers'
2 parents 3345569 + 737907f commit d64d243

3 files changed

+11
-8
lines changed

ci/buildserver-config.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ export SUPPORTED_DEB_CODENAMES
1818

1919
export SUPPORTED_RPM_ARCHITECTURES=("x86_64" "aarch64")
2020

21-
# Servers to upload Linux deb/rpm repositories to
22-
export DEV_LINUX_REPOSITORY_SERVERS=("se-got-cdn-001.devmole.eu" "se-got-cdn-002.devmole.eu")
23-
export STAGING_LINUX_REPOSITORY_SERVERS=("se-got-cdn-001.stagemole.eu" "se-got-cdn-002.stagemole.eu")
24-
export PRODUCTION_LINUX_REPOSITORY_SERVERS=("se-got-cdn-111.mullvad.net" "se-mma-cdn-101.mullvad.net")
21+
# Servers to upload Linux deb/rpm repositories and all other build artifacts to.
22+
export DEV_UPLOAD_SERVERS=("cdn.devmole.eu")
23+
export STAGING_UPLOAD_SERVERS=("cdn.stagemole.eu")
24+
export PRODUCTION_UPLOAD_SERVERS=("cdn.mullvad.net")
2525

2626
export DEV_LINUX_REPOSITORY_PUBLIC_URL="https://repository.devmole.eu"
2727
export STAGING_LINUX_REPOSITORY_PUBLIC_URL="https://repository.stagemole.eu"

ci/buildserver-upload.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ cd "$UPLOAD_DIR"
1414
function rsync_upload {
1515
local file=$1
1616
local upload_dir=$2
17-
rsync -av --mkpath --rsh='ssh -p 1122' "$file" "upload-server-1:$upload_dir/"
17+
for server in "${PRODUCTION_UPLOAD_SERVERS[@]}"; do
18+
echo "Uploading $file to $server:$upload_dir"
19+
rsync -av --mkpath --rsh='ssh -p 1122' "$file" "$server:$upload_dir/"
20+
done
1821
}
1922

2023
while true; do

ci/publish-linux-repositories.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ source "$SCRIPT_DIR/buildserver-config.sh"
1414
while [ "$#" -gt 0 ]; do
1515
case "$1" in
1616
"--production")
17-
repository_servers=("${PRODUCTION_LINUX_REPOSITORY_SERVERS[@]}")
17+
repository_servers=("${PRODUCTION_UPLOAD_SERVERS[@]}")
1818
repository_server_url="$PRODUCTION_LINUX_REPOSITORY_PUBLIC_URL"
1919
;;
2020
"--staging")
21-
repository_servers=("${STAGING_LINUX_REPOSITORY_SERVERS[@]}")
21+
repository_servers=("${STAGING_UPLOAD_SERVERS[@]}")
2222
repository_server_url="$STAGING_LINUX_REPOSITORY_PUBLIC_URL"
2323
;;
2424
"--dev")
25-
repository_servers=("${DEV_LINUX_REPOSITORY_SERVERS[@]}")
25+
repository_servers=("${DEV_UPLOAD_SERVERS[@]}")
2626
repository_server_url="$DEV_LINUX_REPOSITORY_PUBLIC_URL"
2727
;;
2828
"--deb")

0 commit comments

Comments
 (0)