summaryrefslogtreecommitdiff
path: root/cbuildbot/stages/artifact_stages.py
diff options
context:
space:
mode:
Diffstat (limited to 'cbuildbot/stages/artifact_stages.py')
-rw-r--r--cbuildbot/stages/artifact_stages.py45
1 files changed, 10 insertions, 35 deletions
diff --git a/cbuildbot/stages/artifact_stages.py b/cbuildbot/stages/artifact_stages.py
index 0c5803f5e..e3f491535 100644
--- a/cbuildbot/stages/artifact_stages.py
+++ b/cbuildbot/stages/artifact_stages.py
@@ -179,7 +179,6 @@ class ArchiveStage(generic_stages.BoardSpecificBuilderStage,
# \- ArchiveStandaloneArtifact
# \- ArchiveZipFiles
# \- ArchiveHWQual
- # \- ArchiveGceTarballs
# \- PushImage (blocks on BuildAndArchiveAllImages)
# \- ArchiveManifest
# \- ArchiveStrippedPackages
@@ -237,30 +236,6 @@ class ArchiveStage(generic_stages.BoardSpecificBuilderStage,
parallel.RunTasksInProcessPool(ArchiveStandaloneArtifact,
[[x] for x in self.artifacts])
- def ArchiveGceTarballs():
- """Creates .tar.gz files that can be converted to GCE images.
-
- These files will be uploaded to GCS buckets, where they can be
- used as input to the "gcloud compute images create" command.
- This will convert them into images that can be used to create
- GCE VM instances.
- """
- image_bins = []
- if 'base' in config['images']:
- image_bins.append(constants.IMAGE_TYPE_TO_NAME['base'])
- if 'test' in config['images']:
- image_bins.append(constants.IMAGE_TYPE_TO_NAME['test'])
-
- for image_bin in image_bins:
- if not os.path.exists(os.path.join(image_dir, image_bin)):
- logging.warning('Missing image file skipped: %s', image_bin)
- continue
- output_file = commands.BuildGceTarball(
- archive_path, image_dir, image_bin)
- self._release_upload_queue.put([output_file])
-
- self.board_runattrs.SetParallel('gce_tarball_generated', True)
-
def ArchiveZipFiles():
"""Build and archive zip files.
@@ -315,12 +290,16 @@ class ArchiveStage(generic_stages.BoardSpecificBuilderStage,
# For recovery image to be generated correctly, BuildRecoveryImage must
# run before BuildAndArchiveFactoryImages.
if 'recovery' in config.images:
- assert self.IsArchivedFile(constants.BASE_IMAGE_BIN)
+ assert os.path.isfile(os.path.join(image_dir, constants.BASE_IMAGE_BIN))
commands.BuildRecoveryImage(buildroot, board, image_dir, extra_env)
self._recovery_image_status_queue.put(True)
- # Re-generate the artifacts list so we include the newly created
- # recovery image.
- self.LoadArtifactsList(self._current_board, image_dir)
+ recovery_image = constants.RECOVERY_IMAGE_BIN
+ if not self.IsArchivedFile(recovery_image):
+ info = {'paths': [recovery_image],
+ 'input': [recovery_image],
+ 'archive': 'tar',
+ 'compress': 'xz'}
+ self.artifacts.append(info)
else:
self._recovery_image_status_queue.put(False)
@@ -331,8 +310,6 @@ class ArchiveStage(generic_stages.BoardSpecificBuilderStage,
ArchiveStandaloneArtifacts,
ArchiveZipFiles,
]
- if config['upload_gce_images']:
- steps.append(ArchiveGceTarballs)
parallel.RunParallelSteps(steps)
def ArchiveImageScripts():
@@ -358,10 +335,8 @@ class ArchiveStage(generic_stages.BoardSpecificBuilderStage,
# TODO: When we support branches fully, the friendly name of the branch
# needs to be used with PushImages
sign_types = []
- if config['name'].endswith('-%s' % config_lib.CONFIG_TYPE_FIRMWARE):
- sign_types += ['firmware']
- if config['name'].endswith('-%s' % config_lib.CONFIG_TYPE_FACTORY):
- sign_types += ['factory']
+ if config['sign_types']:
+ sign_types = config['sign_types']
urls = commands.PushImages(
board=board,
archive_url=upload_url,