Created
February 1, 2016 01:08
-
-
Save rail/da89c8b1338346f81222 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -u b/testing/mozharness/configs/releases/postrelease_beta.py b/testing/mozharness/configs/releases/postrelease_beta.py | |
--- b/testing/mozharness/configs/releases/postrelease_beta.py | |
+++ b/testing/mozharness/configs/releases/postrelease_beta.py | |
@@ -2,11 +2,12 @@ | |
"log_name": "bump_beta", | |
"version_files": [{"file": "browser/config/version_display.txt"}], | |
"repo": { | |
- "repo": "ssh://hg.mozilla.org/releases/mozilla-beta", | |
+ "repo": "https://hg.mozilla.org/releases/mozilla-beta", | |
"revision": "default", | |
"dest": "mozilla-beta", | |
"vcs": "hg", | |
}, | |
+ "push_dest": "ssh://hg.mozilla.org/releases/mozilla-beta", | |
"ignore_no_changes": True, | |
"ssh_user": "ffxbld", | |
"ssh_key": "~/.ssh/ffxbld_rsa", | |
diff -u b/testing/mozharness/configs/releases/postrelease_date.py b/testing/mozharness/configs/releases/postrelease_date.py | |
--- b/testing/mozharness/configs/releases/postrelease_date.py | |
+++ b/testing/mozharness/configs/releases/postrelease_date.py | |
@@ -3,11 +3,12 @@ | |
"version_files": [{"file": "browser/config/version_display.txt"}], | |
"repo": { | |
- "repo": "ssh://hg.mozilla.org/projects/date", | |
+ "repo": "https://hg.mozilla.org/projects/date", | |
"revision": "default", | |
"dest": "date", | |
"vcs": "hg", | |
}, | |
+ "push_dest": "ssh://hg.mozilla.org/projects/date", | |
"ignore_no_changes": True, | |
- "ssh_user": "ffxbld", | |
+ "ssh_user": "ffxbld", | |
"ssh_key": "~/.ssh/ffxbld_rsa", | |
} | |
diff -u b/testing/mozharness/configs/releases/postrelease_esr38.py b/testing/mozharness/configs/releases/postrelease_esr38.py | |
--- b/testing/mozharness/configs/releases/postrelease_esr38.py | |
+++ b/testing/mozharness/configs/releases/postrelease_esr38.py | |
@@ -7,11 +7,12 @@ | |
{"file": "config/milestone.txt"}, | |
], | |
"repo": { | |
- "repo": "ssh://hg.mozilla.org/releases/mozilla-esr38", | |
+ "repo": "https://hg.mozilla.org/releases/mozilla-esr38", | |
"revision": "default", | |
"dest": "mozilla-esr38", | |
"vcs": "hg", | |
}, | |
+ "push_dest": "ssh://hg.mozilla.org/releases/mozilla-esr38", | |
"ignore_no_changes": True, | |
"ssh_user": "ffxbld", | |
"ssh_key": "~/.ssh/ffxbld_rsa", | |
diff -u b/testing/mozharness/configs/releases/postrelease_release.py b/testing/mozharness/configs/releases/postrelease_release.py | |
--- b/testing/mozharness/configs/releases/postrelease_release.py | |
+++ b/testing/mozharness/configs/releases/postrelease_release.py | |
@@ -6,11 +6,12 @@ | |
{"file": "config/milestone.txt"}, | |
], | |
"repo": { | |
- "repo": "ssh://hg.mozilla.org/releases/mozilla-release", | |
+ "repo": "https://hg.mozilla.org/releases/mozilla-release", | |
"revision": "default", | |
"dest": "mozilla-release", | |
"vcs": "hg", | |
}, | |
+ "push_dest": "ssh://hg.mozilla.org/releases/mozilla-release", | |
"ignore_no_changes": True, | |
"ssh_user": "ffxbld", | |
"ssh_key": "~/.ssh/ffxbld_rsa", | |
diff -u b/testing/mozharness/mozharness/mozilla/merge.py b/testing/mozharness/mozharness/mozilla/merge.py | |
--- b/testing/mozharness/mozharness/mozilla/merge.py | |
+++ b/testing/mozharness/mozharness/mozilla/merge.py | |
@@ -107,7 +107,7 @@ | |
self.run_command(hg + ["diff"], cwd=cwd) | |
self.hg_commit( | |
cwd, user=self.config['hg_user'], | |
- message="Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release", | |
+ message=self.query_commit_message(), | |
ignore_no_changes=self.config.get("ignore_no_changes", False) | |
) | |
self.info("Now verify |hg out| and |hg out --patch| if you're paranoid, and --push") | |
@@ -122,7 +122,9 @@ | |
if not cwd: | |
self.warning("Skipping %s" % cwd) | |
continue | |
- push_cmd = hg + self.query_push_args() + ['push'] | |
+ push_cmd = hg + ['push'] + self.query_push_args(cwd) | |
+ if self.config.get("push_dest"): | |
+ push_cmd.append(self.config["push_dest"]) | |
status = self.run_command( | |
push_cmd, | |
cwd=cwd, | |
diff -u b/testing/mozharness/scripts/merge_day/gecko_migration.py b/testing/mozharness/scripts/merge_day/gecko_migration.py | |
--- b/testing/mozharness/scripts/merge_day/gecko_migration.py | |
+++ b/testing/mozharness/scripts/merge_day/gecko_migration.py | |
@@ -168,12 +168,15 @@ | |
commit_dirs.append(dirs['abs_from_dir']) | |
return commit_dirs | |
+ def query_commit_message(self): | |
+ return "Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release" | |
+ | |
def query_push_dirs(self): | |
dirs = self.query_abs_dirs() | |
return dirs.get('abs_from_dir'), dirs.get('abs_to_dir') | |
- def query_push_args(self, dest): | |
- if dest == self.query_abs_dirs()['abs_to_dir'] and \ | |
+ def query_push_args(self, cwd): | |
+ if cwd == self.query_abs_dirs()['abs_to_dir'] and \ | |
self.config['migration_behavior'] == 'beta_to_release': | |
return ['--new-branch'] | |
else: | |
@@ -452,6 +455,7 @@ | |
halt_on_failure=True, | |
) | |
+# Actions {{{1 | |
def bump_second_digit(self, *args, **kwargs): | |
"""Bump second digit. | |
@@ -471,7 +475,6 @@ | |
curr_version, next_version + f["suffix"]) | |
self.touch_clobber_file(dirs['abs_to_dir']) | |
-# Actions {{{1 | |
def pull(self): | |
""" Pull tools first, then use hgtool for the gecko repos | |
""" | |
diff -u b/testing/mozharness/scripts/release/postrelease_version_bump.py b/testing/mozharness/scripts/release/postrelease_version_bump.py | |
--- b/testing/mozharness/scripts/release/postrelease_version_bump.py | |
+++ b/testing/mozharness/scripts/release/postrelease_version_bump.py | |
@@ -19,8 +19,9 @@ | |
from mozharness.mozilla.merge import GeckoMigrationMixin | |
-# GeckoMigration {{{1 | |
-class PostReleaseVersionBump(MercurialScript, BuildbotMixin, GeckoMigrationMixin): | |
+# PostReleaseVersionBump {{{1 | |
+class PostReleaseVersionBump(MercurialScript, BuildbotMixin, | |
+ GeckoMigrationMixin): | |
config_options = [ | |
[['--hg-user', ], { | |
"action": "store", | |
@@ -67,6 +68,9 @@ | |
'commit-changes', | |
'push', | |
], | |
+ config={ | |
+ 'buildbot_json_path': 'buildprops.json', | |
+ }, | |
require_config_file=require_config_file | |
) | |
@@ -80,7 +84,7 @@ | |
else: | |
next_version = self.buildbot_config["properties"].get("next_version") | |
if next_version: | |
- if self.config["next_version"]: | |
+ if self.config.get("next_version"): | |
self.warning("Overriding next_version %s by %s" % | |
(self.config["next_version"], next_version)) | |
self.config["next_version"] = next_version | |
@@ -105,11 +109,15 @@ | |
def query_commit_dirs(self): | |
return [self.query_abs_dirs()["abs_gecko_dir"]] | |
+ def query_commit_message(self): | |
+ return "Automatic version bump. CLOSED TREE NO BUG a=release" | |
+ | |
def query_push_dirs(self): | |
return self.query_commit_dirs() | |
- def query_push_args(self, dest): | |
- hg_ssh_opts = "ssh -u {user} -k {key}".format( | |
+ def query_push_args(self, cwd): | |
+ # cwd is not used here | |
+ hg_ssh_opts = "ssh -l {user} -i {key}".format( | |
user=self.config["ssh_user"], | |
key=os.path.expanduser(self.config["ssh_key"]) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment