Skip to content

Commit

Permalink
fix(cfn): include credentials on the task sent to clouddriver (#3323) (
Browse files Browse the repository at this point in the history
…#3332)

Clouddriver expects the credentials to be on the kato task context we
sent from Orca. That was not the case for the DeleteCloudFormationTask
so it was failing in Clouddriver.

This patch adds the credentials field so clouddriver can do the
task conversion properly.
  • Loading branch information
spinnakerbot authored and Travis Tomsu committed Dec 9, 2019
1 parent ed38c00 commit e357a67
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public TaskResult execute(@Nonnull Stage stage) {
task.put("stackName", stackName);
task.put("changeSetName", changeSetName);
task.put("region", region);
task.put("credentials", getCredentials(stage));

Map<String, Map> operation =
new ImmutableMap.Builder<String, Map>().put(TASK_NAME, task).build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ class DeleteCloudFormationChangeSetTaskSpec extends Specification {

then:
1 * katoService.requestOperations("aws", {
it.get(0).get("deleteCloudFormationChangeSet") != null
def task = it.get(0).get("deleteCloudFormationChangeSet")
task != null
task.get("stackName").equals(context.get("stackName"))
task.get("changeSetName").equals(context.get("changeSetName"))
task.get("region").equals(context.get("regions")[0])
task.get("credentials").equals(context.get("credentials"))
}) >> Observable.just(taskId)
result.getStatus() == ExecutionStatus.SUCCEEDED

Expand Down

0 comments on commit e357a67

Please sign in to comment.