summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOskar <oskar@mullvad.net>2025-10-28 12:52:39 +0100
committerOskar <oskar@mullvad.net>2025-10-28 12:52:39 +0100
commit721496daaab896dd29980fd4b7a234fc7dfd5607 (patch)
treedcd44d462554fd78ee2854f3db0b7679405b8db3
parent7b9330fa0d76701e9bc6e58f21b9b1b58233cc6a (diff)
parentfdc837275d0d20222b847b6965ed1333794ee6c3 (diff)
downloadmullvadvpn-721496daaab896dd29980fd4b7a234fc7dfd5607.tar.xz
mullvadvpn-721496daaab896dd29980fd4b7a234fc7dfd5607.zip
Merge branch 'add-script-for-publishing-to-linux-repositories-over-ssh'
-rw-r--r--desktop/scripts/release/6-publish-linux-repositories44
-rwxr-xr-xdesktop/scripts/release/7-modify-rollout (renamed from desktop/scripts/release/6-modify-rollout)0
-rwxr-xr-xdesktop/scripts/release/publish-metadata-to-api6
-rw-r--r--desktop/scripts/release/release-config.sh3
4 files changed, 51 insertions, 2 deletions
diff --git a/desktop/scripts/release/6-publish-linux-repositories b/desktop/scripts/release/6-publish-linux-repositories
new file mode 100644
index 0000000000..970e41ba00
--- /dev/null
+++ b/desktop/scripts/release/6-publish-linux-repositories
@@ -0,0 +1,44 @@
+#!/usr/bin/env bash
+
+set -eu
+
+SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+cd "$SCRIPT_DIR"
+
+REPO_ROOT=../../../
+PRODUCT_VERSION_PATH=$REPO_ROOT/dist-assets/desktop-product-version.txt
+PRODUCT_VERSION=$(cat $PRODUCT_VERSION_PATH)
+
+$REPO_ROOT/scripts/utils/commit-verification
+"$SCRIPT_DIR/verify-version-is-release"
+
+if [ $# -ne 1 ]; then
+ echo "Please provide the following arguments:"
+ echo " $(basename "$0") \\"
+ echo " <build server SSH destination>"
+ exit 1
+fi
+
+# shellcheck source=desktop/scripts/release/release-config.sh
+source "$SCRIPT_DIR/release-config.sh"
+
+# The hostname (can be the alias in your ~/.ssh/config) of the build server
+BUILD_SERVER_HOST=$1
+
+source $REPO_ROOT/scripts/utils/log
+
+function run_on_build_server {
+ # This should be expanded client side
+ # shellcheck disable=SC2029
+ ssh "$BUILD_SERVER_HOST" "$@"
+}
+
+function run_on_build_server_as_build_user {
+ run_on_build_server sudo -i -u "$BUILDSERVER_BUILDUSER" "$@"
+}
+
+run_on_build_server_as_build_user \
+ "autobuild-linux/publish-app-to-repositories.sh" \
+ --production \
+ "autobuild-linux/artifacts/$PRODUCT_VERSION" \
+ "$PRODUCT_VERSION"
diff --git a/desktop/scripts/release/6-modify-rollout b/desktop/scripts/release/7-modify-rollout
index 8278dabe16..8278dabe16 100755
--- a/desktop/scripts/release/6-modify-rollout
+++ b/desktop/scripts/release/7-modify-rollout
diff --git a/desktop/scripts/release/publish-metadata-to-api b/desktop/scripts/release/publish-metadata-to-api
index 02649e67d0..9a56f68ee8 100755
--- a/desktop/scripts/release/publish-metadata-to-api
+++ b/desktop/scripts/release/publish-metadata-to-api
@@ -13,6 +13,9 @@ if [ $# -lt 3 ]; then
exit 1
fi
+# shellcheck source=desktop/scripts/release/release-config.sh
+source "$SCRIPT_DIR/release-config.sh"
+
LOCAL_METADATA_DIR=$1
BUILD_SERVER_HOST=$2
METADATA_SERVER_HOST=$3
@@ -21,12 +24,11 @@ BUILDSERVER_TMP_DIR="/tmp/desktop-upload-release"
BUILDSERVER_METADATA_DIR="$BUILDSERVER_TMP_DIR/metadata"
METADATA_SERVER_METADATA_DIR="desktop/metadata"
-BUILDSERVER_BUILDUSER="build"
-
RSYNC_OPTIONS=(-av --mkpath)
METADATA_SERVER_RSYNC_OPTIONS=("${RSYNC_OPTIONS[@]}" '--rsh="ssh -p 1122"')
function run_on_build_server {
+ # This should be expanded client side
# shellcheck disable=SC2029
ssh "$BUILD_SERVER_HOST" "$@"
}
diff --git a/desktop/scripts/release/release-config.sh b/desktop/scripts/release/release-config.sh
index 3b412f35f7..45279a8b62 100644
--- a/desktop/scripts/release/release-config.sh
+++ b/desktop/scripts/release/release-config.sh
@@ -13,3 +13,6 @@ export ARTIFACT_DIR="$DATA_DIR/artifacts"
# Mullvad code signing key and fingerprint
export MULLVAD_CODE_SIGNING_KEY_PATH="../../../ci/keys/1.mullvad_signing.pub"
export MULLVAD_CODE_SIGNING_KEY_FINGERPRINT="A1198702FC3E0A09A9AE5B75D5A1D4F266DE8DDF"
+
+# The user on the buildserver that builds and uploads artifacts to the cdn servers
+export BUILDSERVER_BUILDUSER="build"