forked from mozilla-releng/shipit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
startup.sh
executable file
·39 lines (35 loc) · 1.5 KB
/
startup.sh
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
#!/bin/bash
export TASKCLUSTER_ROOT_URL="${TASKCLUSTER_ROOT_URL:-https://firefox-ci-tc.services.mozilla.com}"
scopes=('hooks:trigger-hook:project-app-services/in-tree-action-1-generic/*' \
'hooks:trigger-hook:project-app-services/in-tree-action-1-release-promotion/*' \
'hooks:trigger-hook:project-comm/in-tree-action-1-generic/*' \
'hooks:trigger-hook:project-comm/in-tree-action-1-release-promotion/*' \
'hooks:trigger-hook:project-gecko/in-tree-action-1-generic/*' \
'hooks:trigger-hook:project-gecko/in-tree-action-1-release-promotion/*' \
'hooks:trigger-hook:project-mobile/in-tree-action-1-generic/*' \
'hooks:trigger-hook:project-mobile/in-tree-action-1-release-promotion/*' \
'hooks:trigger-hook:project-mozillavpn/in-tree-action-1-generic/*' \
'hooks:trigger-hook:project-mozillavpn/in-tree-action-1-release-promotion/*' \
'hooks:trigger-hook:project-xpi/in-tree-action-1-release-promotion/*')
function signin {
scope_str=$(IFS=$'\n' ; echo "${scopes[*]}")
eval "$(taskcluster signin --scope="$scope_str")"
}
if [[ -z "${TASKCLUSTER_CLIENT_ID}" ]]; then
signin
else
active_scopes=$(taskcluster api auth currentScopes)
for scope in "${scopes[@]}"
do
if [[ $active_scopes != *"$scope"* ]]; then
signin
break
fi
done
fi
if [[ -z "${GITHUB_TOKEN}" ]]; then
echo -n "Please enter your github token: "
read -r _token
export GITHUB_TOKEN="$_token"
fi
docker compose up