blob: f9f07f24e928710c103fde4c6074b3e61bc314a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
#!/usr/bin/env bash
# This script verifies the build produced by the buildserver. It helps the user verify the staging
# repository versions and triggers a e2e run with a small subset of the tests to verify the build.
# This should be be run after `2-push-release-tag` and after the build server has finished building.
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/gh-ready-check
$REPO_ROOT/scripts/utils/commit-verification
"$SCRIPT_DIR/verify-version-is-release"
source $REPO_ROOT/scripts/utils/log
WAIT="false"
for argument in "$@"; do
case "$argument" in
--wait)
WAIT="true"
;;
*)
log_error "Unknown option \"$argument\""
exit 1
;;
esac
done
function verify_repository_versions {
print_versions_args=( --staging )
if [[ "$PRODUCT_VERSION" == *-beta* ]]; then
print_versions_args+=( --beta )
fi
deb_version_output=$(./print-package-versions --deb "${print_versions_args[@]}")
deb_version=$(echo "$deb_version_output" | grep mullvad-vpn | awk '{print $2}' | sed 's/~/-/')
if [[ "$deb_version" != "$PRODUCT_VERSION" ]]; then
log_error "Incorrect deb version in repository ($deb_version)"
echo "$deb_version_output"
exit 1
fi
rpm_version_output=$(./print-package-versions --rpm "${print_versions_args[@]}")
rpm_version=$(echo "$rpm_version_output" | grep mullvad-vpn | awk '{print $2}' | sed 's/~/-/')
if [[ "$rpm_version" != "$PRODUCT_VERSION-1" ]]; then
log_error "Incorrect rpm version in repository ($rpm_version)"
echo "$rpm_version_output"
exit 1
fi
}
function wait_for_workflow_result {
log_header "Waiting workflow result..."
sleep 30 # Sleep to allow the workflow run to start
while true; do
run=$(gh run list --workflow desktop-e2e.yml --branch "$PRODUCT_VERSION" --limit 1 --json conclusion,status,updatedAt,url | jq --exit-status '.[0]')
status=$(echo "$run" | jq --exit-status --raw-output '.status')
echo "Status: $status"
if [[ "$status" != "in_progress" ]] && [[ "$status" != "queued" ]]; then
if echo "$run" | jq --exit-status '.conclusion == "success"' > /dev/null; then
log_success "Workflow run successfull"
break
else
log_error "Workflow failed"
exit 1
fi
fi
sleep 60
done
}
verify_repository_versions
gh workflow run desktop-e2e.yml --ref "$PRODUCT_VERSION" \
-f oses="fedora42 ubuntu2504 windows11 macos15" \
-f tests="test_quantum_resistant_tunnel test_ui_tunnel_settings"
if [[ "$WAIT" == "true" ]]; then
wait_for_workflow_result
fi
|