def PushImage(): # This helper script is only available on internal manifests currently. if not config['internal']: return self.GetParallel('debug_tarball_generated', pretty_name='debug tarball') # Needed for stateful.tgz self.GetParallel('test_artifacts_uploaded', pretty_name='test artifacts') # Now that all data has been generated, we can upload the final result to # the image server. # TODO: When we support branches fully, the friendly name of the branch # needs to be used with PushImages sign_types = [] if config['sign_types']: sign_types = config['sign_types'] logging.info('Running commands.PushImages') urls = commands.PushImages( board=board, archive_url=upload_url, dryrun=debug or not config['push_image'], profile=self._run.options.profile or config['profile'], sign_types=sign_types) self.board_runattrs.SetParallel('instruction_urls_per_channel', urls)
def PushBoardImage(self): """Helper method to run push_image against the dummy boards artifacts.""" # This helper script is only available on internal manifests currently. if not self._run.config['internal']: raise UnsafeBuildForPushImage( "Can't use push_image on external builds.") logging.info('Use pushimage to publish signing artifacts for: %s', self._current_board) # Push build artifacts to gs://chromeos-releases for signing and release. # This runs TOT pushimage against the build artifacts for the branch. commands.PushImages(board=self._current_board, archive_url=self.dummy_archive_url, dryrun=self._run.options.debug or not self._run.config['push_image'], profile=self._run.options.profile or self._run.config['profile'], sign_types=self._run.config['sign_types'] or [], buildroot=self._build_root)
def testPushImages(self): """Test PushImages Command.""" m = self.PatchObject(pushimage, 'PushImage') commands.PushImages(self._board, 'gs://foo/R34-1234.0.0', False, None) self.assertEqual(m.call_count, 1)