mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Use taskcluster secret directly in WPT sync script.
This commit is contained in:
parent
dbdbbeb132
commit
7e139db97d
2 changed files with 10 additions and 13 deletions
|
@ -85,7 +85,6 @@ function unsafe_update_metadata() {
|
||||||
# against servo/servo.
|
# against servo/servo.
|
||||||
function unsafe_open_pull_request() {
|
function unsafe_open_pull_request() {
|
||||||
WPT_SYNC_USER=servo-wpt-sync
|
WPT_SYNC_USER=servo-wpt-sync
|
||||||
WPT_SYNC_TOKEN=`cat .wpt-token`
|
|
||||||
|
|
||||||
# If the branch doesn't exist, we'll silently exit. This deals with the
|
# If the branch doesn't exist, we'll silently exit. This deals with the
|
||||||
# case where an earlier step either failed or discovered that syncing
|
# case where an earlier step either failed or discovered that syncing
|
||||||
|
@ -93,6 +92,11 @@ function unsafe_open_pull_request() {
|
||||||
git checkout "${BRANCH_NAME}" || return 0
|
git checkout "${BRANCH_NAME}" || return 0
|
||||||
|
|
||||||
if [[ -z "${WPT_SYNC_TOKEN+set}" ]]; then
|
if [[ -z "${WPT_SYNC_TOKEN+set}" ]]; then
|
||||||
|
SECRET_RESPONSE=$(curl $TASKCLUSTER_PROXY_URL/api/secrets/v1/secret/project/servo/wpt-sync)
|
||||||
|
WPT_SYNC_TOKEN=`echo "${OPEN_PR_RESPONSE}" | jq '.token'`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "${WPT_SYNC_TOKEN}" ]]; then
|
||||||
echo "Github auth token missing from .wpt-token file."
|
echo "Github auth token missing from .wpt-token file."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -459,18 +459,11 @@ def macos_nightly():
|
||||||
"./mach upload-nightly mac --secret-from-taskcluster",
|
"./mach upload-nightly mac --secret-from-taskcluster",
|
||||||
)
|
)
|
||||||
.with_artifacts("repo/target/release/servo-tech-demo.dmg")
|
.with_artifacts("repo/target/release/servo-tech-demo.dmg")
|
||||||
.with_env(PY2="""if 1:
|
.with_script(
|
||||||
import urllib, json
|
"./etc/ci/update-wpt-checkout fetch-and-update-expectations",
|
||||||
url = "http://taskcluster/secrets/v1/secret/project/servo/wpt-sync"
|
"./etc/ci/update-wpt-checkout open-pr",
|
||||||
token = json.load(urllib.urlopen(url))["secret"]["token"]
|
"./etc/ci/update-wpt-checkout cleanup",
|
||||||
open(".wpt-token", "w").write(token)
|
)
|
||||||
""")
|
|
||||||
.with_script("""
|
|
||||||
python -c "$PY2"
|
|
||||||
./etc/ci/update-wpt-checkout fetch-and-update-expectations
|
|
||||||
./etc/ci/update-wpt-checkout open-pr
|
|
||||||
./etc/ci/update-wpt-checkout cleanup
|
|
||||||
""")
|
|
||||||
.find_or_create("build.mac_x64_nightly." + CONFIG.git_sha)
|
.find_or_create("build.mac_x64_nightly." + CONFIG.git_sha)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue