richard pushed to branch maint-13.0 at The Tor Project / Applications / tor-browser-build
Commits: 10fe31fe by Richard Pospesel at 2023-12-19T12:00:13+00:00 Bug 41043: Create script to push build requests to Mullvad build servers - - - - - 4 changed files: - Makefile - projects/release/config - + projects/release/kick_devmole_build - rbm.local.conf.example Changes: ===================================== Makefile ===================================== @@ -679,6 +679,10 @@ torbrowser-signtag-release: submodule-update torbrowser-signtag-alpha: submodule-update $(rbm) build release --step signtag --target alpha --target torbrowser +# requires var/devmole_auth_token to be set in rbm.local.conf +torbrowser-kick-devmole-build: submodule-update + $(rbm) build release --step kick_devmole_build --target torbrowser + # requires tpo_user variable be set in rbm.local.conf mullvadbrowser-upload-sha256sums-release: submodule-update $(rbm) build release --step upload_sha256sums --target release --target mullvadbrowser @@ -693,6 +697,10 @@ mullvadbrowser-signtag-release: submodule-update mullvadbrowser-signtag-alpha: submodule-update $(rbm) build release --step signtag --target alpha --target mullvadbrowser +# requires var/devmole_auth_token to be set in rbm.local.conf +mullvadbrowser-kick-devmole-build: submodule-update + $(rbm) build release --step kick_devmole_build --target mullvadbrowser + fetch: submodule-update $(rbm) fetch ===================================== projects/release/config ===================================== @@ -279,3 +279,8 @@ steps: name: mar-tools pkg_type: fetch_martools compare_mar_signed_unsigned: '[% INCLUDE compare_mar_signed_unsigned %]' + kick_devmole_build: + build_log: '-' + debug: 0 + input_files: [] + kick_devmole_build: '[% INCLUDE kick_devmole_build %]' ===================================== projects/release/kick_devmole_build ===================================== @@ -0,0 +1,42 @@ +#!/usr/bin/bash + +# This script triggers a build of Tor or Mullvad Browser on Mullvad Infrastructure +# Hashes are saved here: https://cdn.stagemole.eu/hashes/ +# A Mullvad build server auth token (var/devmole_auth_token) is required to build +# For now you have to be connecting from Sweden (ie via Malmö or Gothenburg exits using MullvadVPN) for your request to succeed + +set -e + +# get our build tag +TAG=[% c("var/git_tag_prefix") %]-[% c("var/torbrowser_version") %]-[% c("var/torbrowser_build") %] + +# check for tag existence +if ! git rev-parse ${TAG} > /dev/null 2>&1; then + echo "Error: build tag '${TAG}' does not exist" + exit 1 +fi + +# determine whether alpha or release based on the build tag +RELEASE= +if [[ "${TAG}" =~ ^(mb|tbb)-[1-9][0-9]\.[05]a[1-9][0-9]*-build[1-9]$ ]]; then + RELEASE="alpha" +elif [[ "${TAG}" =~ ^(mb|tbb)-[1-9][0-9]\.[05](\.[1-9][0-9]*)?-build[1-9]$ ]]; then + RELEASE="release" +else + echo "Error: malformed build tag '${TAG}'" + exit 1 +fi + +# get auth token for submission to devmole build server +AUTH_TOKEN=[% c("buildconf/devmole_auth_token") %] +if [[ "${AUTH_TOKEN}" = "" ]]; then + echo "AUTH_TOKEN: ${AUTH_TOKEN}" + echo "Error: buildconf/devmole_auth_token missing from rbm.local.conf" + exit 1 +fi + +# make request +curl -X POST "https://drone-server.devmole.eu/api/repos/mullvad/browser-build/builds?branch=main&tag=${TAG}&release=${RELEASE}" -H "Authorization: Bearer ${AUTH_TOKEN}" -H "Accept: application/json" + +echo +echo Hashes will appear here: https://cdn.stagemole.eu/hashes/[% c("var/projectname") %]/[% c("var/torbrowser_version") %]-[% c("var/torbrowser_build") %] ===================================== rbm.local.conf.example ===================================== @@ -42,6 +42,11 @@ buildconf: ### signing the tag. #git_signtag_opt: '-u keyid' + ### The buildconf/devmole_auth_token option is used for starting remote builds on + ### Mullvad's devmole server using the kick_devmole_build step in the release + ### project. Such a token can be acquired from the Mullvad sysadmins. + #devmole_auth_token: abcdefghijklmnopqrstuvwxyz012345 + var: local_conf: 1 View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/10fe31feb7efd4dd7a68364d4cb43cf54e9444a8 -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/10fe31feb7efd4dd7a68364d4cb43cf54e9444a8 You're receiving this email because of your account on gitlab.torproject.org.
_______________________________________________ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits