richard pushed to branch maint-13.0 at The Tor Project / Applications / tor-browser-build

Commits:

4 changed files:

Changes:

  • Makefile
    ... ... @@ -679,6 +679,10 @@ torbrowser-signtag-release: submodule-update
    679 679
     torbrowser-signtag-alpha: submodule-update
    
    680 680
     	$(rbm) build release --step signtag --target alpha --target torbrowser
    
    681 681
     
    
    682
    +# requires var/devmole_auth_token to be set in rbm.local.conf
    
    683
    +torbrowser-kick-devmole-build: submodule-update
    
    684
    +	$(rbm) build release --step kick_devmole_build --target torbrowser
    
    685
    +
    
    682 686
     # requires tpo_user variable be set in rbm.local.conf
    
    683 687
     mullvadbrowser-upload-sha256sums-release: submodule-update
    
    684 688
     	$(rbm) build release --step upload_sha256sums --target release --target mullvadbrowser
    
    ... ... @@ -693,6 +697,10 @@ mullvadbrowser-signtag-release: submodule-update
    693 697
     mullvadbrowser-signtag-alpha: submodule-update
    
    694 698
     	$(rbm) build release --step signtag --target alpha --target mullvadbrowser
    
    695 699
     
    
    700
    +# requires var/devmole_auth_token to be set in rbm.local.conf
    
    701
    +mullvadbrowser-kick-devmole-build: submodule-update
    
    702
    +	$(rbm) build release --step kick_devmole_build --target mullvadbrowser
    
    703
    +
    
    696 704
     fetch: submodule-update
    
    697 705
     	$(rbm) fetch
    
    698 706
     
    

  • projects/release/config
    ... ... @@ -279,3 +279,8 @@ steps:
    279 279
             name: mar-tools
    
    280 280
             pkg_type: fetch_martools
    
    281 281
         compare_mar_signed_unsigned: '[% INCLUDE compare_mar_signed_unsigned %]'
    
    282
    +  kick_devmole_build:
    
    283
    +    build_log: '-'
    
    284
    +    debug: 0
    
    285
    +    input_files: []
    
    286
    +    kick_devmole_build: '[% INCLUDE kick_devmole_build %]'

  • projects/release/kick_devmole_build
    1
    +#!/usr/bin/bash
    
    2
    +
    
    3
    +# This script triggers a build of Tor or Mullvad Browser on Mullvad Infrastructure
    
    4
    +# Hashes are saved here: https://cdn.stagemole.eu/hashes/
    
    5
    +# A Mullvad build server auth token (var/devmole_auth_token) is required to build
    
    6
    +# For now you have to be connecting from Sweden (ie via Malmö or Gothenburg exits using MullvadVPN) for your request to succeed
    
    7
    +
    
    8
    +set -e
    
    9
    +
    
    10
    +# get our build tag
    
    11
    +TAG=[% c("var/git_tag_prefix") %]-[% c("var/torbrowser_version") %]-[% c("var/torbrowser_build") %]
    
    12
    +
    
    13
    +# check for tag existence
    
    14
    +if ! git rev-parse ${TAG} > /dev/null 2>&1; then
    
    15
    +    echo "Error: build tag '${TAG}' does not exist"
    
    16
    +    exit 1
    
    17
    +fi
    
    18
    +
    
    19
    +# determine whether alpha or release based on the build tag
    
    20
    +RELEASE=
    
    21
    +if [[ "${TAG}" =~ ^(mb|tbb)-[1-9][0-9]\.[05]a[1-9][0-9]*-build[1-9]$ ]]; then
    
    22
    +    RELEASE="alpha"
    
    23
    +elif [[ "${TAG}" =~ ^(mb|tbb)-[1-9][0-9]\.[05](\.[1-9][0-9]*)?-build[1-9]$ ]]; then
    
    24
    +    RELEASE="release"
    
    25
    +else
    
    26
    +    echo "Error: malformed build tag '${TAG}'"
    
    27
    +    exit 1
    
    28
    +fi
    
    29
    +
    
    30
    +# get auth token for submission to devmole build server
    
    31
    +AUTH_TOKEN=[% c("buildconf/devmole_auth_token") %]
    
    32
    +if [[ "${AUTH_TOKEN}" = "" ]]; then
    
    33
    +    echo "AUTH_TOKEN: ${AUTH_TOKEN}"
    
    34
    +    echo "Error: buildconf/devmole_auth_token missing from rbm.local.conf"
    
    35
    +    exit 1
    
    36
    +fi
    
    37
    +
    
    38
    +# make request
    
    39
    +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"
    
    40
    +
    
    41
    +echo
    
    42
    +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:
    42 42
       ### signing the tag.
    
    43 43
       #git_signtag_opt: '-u keyid'
    
    44 44
     
    
    45
    +  ### The buildconf/devmole_auth_token option is used for starting remote builds on
    
    46
    +  ### Mullvad's devmole server using the kick_devmole_build step in the release
    
    47
    +  ### project. Such a token can be acquired from the Mullvad sysadmins.
    
    48
    +  #devmole_auth_token: abcdefghijklmnopqrstuvwxyz012345
    
    49
    +
    
    45 50
     var:
    
    46 51
       local_conf: 1
    
    47 52