Skip to content

Commit

Permalink
fix(bakery): Include cloudProvider in CompleteBakeTask output results (
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Tomsu authored Nov 22, 2019
1 parent 40a0155 commit 59ca44d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ class CompletedBakeTask implements Task {
imageId: bake.ami ?: bake.imageName,
artifacts: bake.artifact ? [bake.artifact] : []
]
if (stage.context.cloudProvider) {
results.cloudProvider = stage.context.cloudProvider
}
/**
* TODO:
* It would be good to standardize on the key here. "imageId" works for all providers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ public TaskResult execute(@Nonnull Stage stage) {

Map<String, Object> outputs = new HashMap<>();
outputs.put("artifacts", Collections.singleton(result));
outputs.put("cloudProvider", "kubernetes"); // Needed for stat collection.

return TaskResult.builder(ExecutionStatus.SUCCEEDED).context(outputs).outputs(outputs).build();
}
Expand Down

0 comments on commit 59ca44d

Please sign in to comment.