diff options
author | Yu-Ju Hong <yjhong@chromium.org> | 2014-05-23 08:25:32 +0000 |
---|---|---|
committer | Yu-Ju Hong <yjhong@chromium.org> | 2014-05-23 08:26:45 +0000 |
commit | ab0f166e4946402d13e6153984026c01316746e7 (patch) | |
tree | a362836e2e904e020c1ec05fbcfc9c422c1e20b7 /buildbot | |
parent | 66652ec908c9b62a82060f9c67c9b2bef7578808 (diff) | |
download | chromite-ab0f166e4946402d13e6153984026c01316746e7.tar.gz |
Revert "Copy LATEST markers to extra upload archives."
This reverts commit 1c2d38ac06521e2b1d7066fc1c76cf91446563be.
BUG=chromium:375354
TEST=None
Change-Id: Ia5b401e278b8ad2c3097563ed2be9a1ab62dcc5d
Reviewed-on: https://chromium-review.googlesource.com/201165
Reviewed-by: Yu-Ju Hong <yjhong@chromium.org>
Tested-by: Yu-Ju Hong <yjhong@chromium.org>
Diffstat (limited to 'buildbot')
-rw-r--r-- | buildbot/cbuildbot_archive.py | 20 | ||||
-rw-r--r-- | buildbot/stages/generic_stages.py | 9 | ||||
-rw-r--r-- | buildbot/stages/report_stages.py | 5 | ||||
-rwxr-xr-x | buildbot/stages/report_stages_unittest.py | 2 |
4 files changed, 13 insertions, 23 deletions
diff --git a/buildbot/cbuildbot_archive.py b/buildbot/cbuildbot_archive.py index 44092c205..dd4614793 100644 --- a/buildbot/cbuildbot_archive.py +++ b/buildbot/cbuildbot_archive.py @@ -155,16 +155,13 @@ class Archive(object): osutils.SafeMakedirs(self.archive_path) - def UpdateLatestMarkers(self, manifest_branch, debug, upload_urls=None): + def UpdateLatestMarkers(self, manifest_branch, debug): """Update the LATEST markers in GS archive area. Args: manifest_branch: The name of the branch in the manifest for this run. debug: Boolean debug value for this run. - upload_urls: Google storage urls to upload the Latest Markers to. """ - if not upload_urls: - upload_urls = [self.upload_url] # self.version will be one of these forms, shown through examples: # R35-1234.5.6 or R35-1234.5.6-b123. In either case, we want "1234.5.6". version_marker = self.version.split('-')[1] @@ -172,11 +169,10 @@ class Archive(object): filenames = ('LATEST-%s' % manifest_branch, 'LATEST-%s' % version_marker) base_archive_path = os.path.dirname(self.archive_path) - base_upload_urls = [os.path.dirname(url) for url in upload_urls] - for base_upload_url in base_upload_urls: - for filename in filenames: - latest_path = os.path.join(base_archive_path, filename) - osutils.WriteFile(latest_path, self.version, mode='w') - commands.UploadArchivedFile( - base_archive_path, [base_upload_url], filename, - debug, acl=self.upload_acl) + base_upload_url = os.path.dirname(self.upload_url) + for filename in filenames: + latest_path = os.path.join(base_archive_path, filename) + osutils.WriteFile(latest_path, self.version, mode='w') + commands.UploadArchivedFile( + base_archive_path, [base_upload_url], filename, + debug, acl=self.upload_acl) diff --git a/buildbot/stages/generic_stages.py b/buildbot/stages/generic_stages.py index f650a0dbd..365743cc1 100644 --- a/buildbot/stages/generic_stages.py +++ b/buildbot/stages/generic_stages.py @@ -692,20 +692,17 @@ class ArchivingStageMixin(object): return True return False - def _GetUploadUrls(self, filename, board=None): + def _GetUploadUrls(self, filename): """Returns a list of all urls for which to upload filename to. Args: filename: The filename of the file we want to upload. - board: Board whose overlay to search for the artifacts.json file. - If none, self._current_board is used if it exists. """ urls = [self.upload_url] if (not self._IsInUploadBlacklist(filename) and - (hasattr(self, '_current_board') or board)): - board = board if board else self._current_board + hasattr(self, '_current_board')): custom_artifacts_file = portage_utilities.ReadOverlayFile( - 'scripts/artifacts.json', board=board) + 'scripts/artifacts.json', board=self._current_board) if custom_artifacts_file is not None: json_file = json.loads(custom_artifacts_file) for url in json_file.get('extra_upload_urls', []): diff --git a/buildbot/stages/report_stages.py b/buildbot/stages/report_stages.py index 61bb5d295..5e9ded0ee 100644 --- a/buildbot/stages/report_stages.py +++ b/buildbot/stages/report_stages.py @@ -330,12 +330,9 @@ class ReportStage(generic_stages.BuilderStage, archive_urls.update(run_archive_urls) # Also update the LATEST files, since this run did archive something. - upload_urls = self._GetUploadUrls( - 'LATEST-*', board=builder_run.config['boards'][0]) archive = builder_run.GetArchive() archive.UpdateLatestMarkers(builder_run.manifest_branch, - builder_run.debug, - upload_urls=upload_urls) + builder_run.debug) version = getattr(self._run.attrs, 'release_tag', '') results_lib.Results.Report(sys.stdout, archive_urls=archive_urls, diff --git a/buildbot/stages/report_stages_unittest.py b/buildbot/stages/report_stages_unittest.py index 5505783be..7952364cf 100755 --- a/buildbot/stages/report_stages_unittest.py +++ b/buildbot/stages/report_stages_unittest.py @@ -35,7 +35,7 @@ class ReportStageTest(generic_stages_unittest.AbstractStageTest): RELEASE_TAG = '' def setUp(self): - for cmd in ((osutils, 'WriteFile'), + for cmd in ((osutils, 'ReadFile'), (osutils, 'WriteFile'), (commands, 'UploadArchivedFile'), (alerts, 'SendEmail')): self.StartPatcher(mock.patch.object(*cmd, autospec=True)) |