| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Set of utilities to add commands to a buildbot factory. | 5 """Set of utilities to add commands to a buildbot factory. |
| 6 | 6 |
| 7 This is based on commands.py and adds chromium-specific commands.""" | 7 This is based on commands.py and adds chromium-specific commands.""" |
| 8 | 8 |
| 9 import logging | 9 import logging |
| 10 import os | 10 import os |
| (...skipping 1723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1734 | 1734 |
| 1735 self.AddGenerateIsolatedHashesStep( | 1735 self.AddGenerateIsolatedHashesStep( |
| 1736 [t[:-len('_swarm')] for t in tests], | 1736 [t[:-len('_swarm')] for t in tests], |
| 1737 doStepIf=swarm_commands.TestStepFilterTriggerSwarm) | 1737 doStepIf=swarm_commands.TestStepFilterTriggerSwarm) |
| 1738 | 1738 |
| 1739 # Trigger the swarm test builder. The only issue here is that | 1739 # Trigger the swarm test builder. The only issue here is that |
| 1740 # updateSourceStamp=False cannot be used because we want the user to get the | 1740 # updateSourceStamp=False cannot be used because we want the user to get the |
| 1741 # email, e.g. the blamelist to be properly set, but that causes any patch to | 1741 # email, e.g. the blamelist to be properly set, but that causes any patch to |
| 1742 # be caried over, which is annoying but benign. | 1742 # be caried over, which is annoying but benign. |
| 1743 self._factory.addStep(commands.CreateTriggerStep( | 1743 self._factory.addStep(commands.CreateTriggerStep( |
| 1744 trigger_name='swarm_triggered', | 1744 trigger_name=factory_properties['triggered_builder'], |
| 1745 trigger_set_properties={ | 1745 trigger_set_properties={ |
| 1746 'target_os': self._target_platform, | 1746 'target_os': self._target_platform, |
| 1747 'use_swarm_client_revision': | 1747 'use_swarm_client_revision': |
| 1748 WithProperties('%(got_swarm_client_revision:-)s'), | 1748 WithProperties('%(got_swarm_client_revision:-)s'), |
| 1749 'use_swarming_client_revision': | 1749 'use_swarming_client_revision': |
| 1750 WithProperties('%(got_swarming_client_revision:-)s'), | 1750 WithProperties('%(got_swarming_client_revision:-)s'), |
| 1751 }, | 1751 }, |
| 1752 trigger_copy_properties=[ | 1752 trigger_copy_properties=[ |
| 1753 'run_default_swarm_tests', | 1753 'run_default_swarm_tests', |
| 1754 'swarm_hashes', | 1754 'swarm_hashes', |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1846 return '%s/%s/%s' % (config.Master.archive_url, archive_type, builder_name) | 1846 return '%s/%s/%s' % (config.Master.archive_url, archive_type, builder_name) |
| 1847 | 1847 |
| 1848 | 1848 |
| 1849 def _GetSnapshotUrl(factory_properties=None, builder_name='%(build_name)s'): | 1849 def _GetSnapshotUrl(factory_properties=None, builder_name='%(build_name)s'): |
| 1850 if not factory_properties or 'gs_bucket' not in factory_properties: | 1850 if not factory_properties or 'gs_bucket' not in factory_properties: |
| 1851 return (_GetArchiveUrl('snapshots', builder_name), None) | 1851 return (_GetArchiveUrl('snapshots', builder_name), None) |
| 1852 gs_bucket = factory_properties['gs_bucket'] | 1852 gs_bucket = factory_properties['gs_bucket'] |
| 1853 gs_bucket = re.sub(r'^gs://', 'http://commondatastorage.googleapis.com/', | 1853 gs_bucket = re.sub(r'^gs://', 'http://commondatastorage.googleapis.com/', |
| 1854 gs_bucket) | 1854 gs_bucket) |
| 1855 return ('%s/index.html?path=%s' % (gs_bucket, builder_name), '/') | 1855 return ('%s/index.html?path=%s' % (gs_bucket, builder_name), '/') |
| OLD | NEW |