Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nightly WPT sync job #23434

Merged
merged 2 commits into from May 22, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Allow pushing updated WPT results to git remote.

  • Loading branch information
jdm committed May 22, 2019
commit ceff9a61ef03f8e11de0f5cad3facc970b1d73fd
@@ -490,7 +490,8 @@ def update_wpt():
"etc/taskcluster/macos/Brewfile-wpt",
"etc/taskcluster/macos/Brewfile-gstreamer",
])
.with_repo()
# Pushing the new changes to the git remote requires a full repo clone.
.with_repo(shallow=False)
.with_curl_artifact_script(build_task, "target.tar.gz")
.with_script("""
export PKG_CONFIG_PATH="$(brew --prefix libffi)/lib/pkgconfig/"
@@ -427,7 +427,7 @@ def with_path_from_homedir(self, *paths):
self.with_early_script("set PATH=%HOMEDRIVE%%HOMEPATH%\\{};%PATH%".format(p))
return self

def with_repo(self, sparse_checkout=None):
def with_repo(self, sparse_checkout=None, shallow=True):
"""
Make a shallow clone the git repository at the start of the task.
This uses `CONFIG.git_url`, `CONFIG.git_ref`, and `CONFIG.git_sha`,
@@ -452,9 +452,9 @@ def with_repo(self, sparse_checkout=None):
type .git\\info\\sparse-checkout
"""
git += """
git fetch --depth 1 %GIT_URL% %GIT_REF%
git fetch {depth} %GIT_URL% %GIT_REF%
git reset --hard %GIT_SHA%
"""
""".format(depth="--depth 1" if shallow else "")
return self \
.with_git() \
.with_script(git) \
@@ -560,7 +560,7 @@ def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.curl_scripts_count = 0

def with_repo(self):
def with_repo(self, shallow=True):
"""
Make a shallow clone the git repository at the start of the task.
This uses `CONFIG.git_url`, `CONFIG.git_ref`, and `CONFIG.git_sha`
@@ -578,9 +578,9 @@ def with_repo(self):
.with_early_script("""
git init repo
cd repo
git fetch --depth 1 "$GIT_URL" "$GIT_REF"
git fetch {depth} "$GIT_URL" "$GIT_REF"
git reset --hard "$GIT_SHA"
""")
""".format(depth="--depth 1" if shallow else ""))

def with_curl_script(self, url, file_path):
self.curl_scripts_count += 1
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.