Skip to content

Commit

Permalink
fix(titus): pass authenticated user to titus when creating new jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaslin committed Apr 18, 2017
1 parent 714d5d3 commit 467fa73
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ class AmazonServerGroupCreator implements ServerGroupCreator, DeploymentDetailsA
}
}

if (context.cloudProvider == 'titus' && stage.execution.authentication?.user) {
operation.user = stage.execution.authentication?.user
}

log.info("Deploying ${operation.amiName ?: operation.imageId} to ${targetRegion}")

if (context.account && !operation.credentials) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ class TitusJobRunner implements JobRunner {
}
operation.put('cloudProvider', cloudProvider)

if (stage.execution.authentication?.user) {
operation.put('user', stage.execution.authentication?.user)
}

return [[(OPERATION): operation]]
}
}
Expand Down

0 comments on commit 467fa73

Please sign in to comment.