Skip to content

Commit

Permalink
feat(moniker): Use moniker for Job stages. (#1699)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbackes authored and lwander committed Oct 17, 2017
1 parent 8699a19 commit 958be83
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ public class WaitOnJobCompletion extends AbstractCloudProviderAwareTask implemen

def name = names[0]
def parsedName = Names.parseName(name)
String appName = stage.context.moniker?.app ?: stage.context.applicaton ?: parsedName.app

Map job = objectMapper.readValue(katoRestService.collectJob(parsedName.app, account, location, name, "delete").body.in(), new TypeReference<Map>() {})
Map job = objectMapper.readValue(katoRestService.collectJob(appName, account, location, name, "delete").body.in(), new TypeReference<Map>() {})
outputs.jobStatus = job

switch ((String) job.jobState) {
Expand All @@ -80,7 +81,7 @@ public class WaitOnJobCompletion extends AbstractCloudProviderAwareTask implemen

if (stage.context.propertyFile) {
Map<String, Object> properties = [:]
properties = katoRestService.getFileContents(parsedName.app, account, location, name, stage.context.propertyFile)
properties = katoRestService.getFileContents(appName, account, location, name, stage.context.propertyFile)
if (properties.size() == 0) {
throw new IllegalStateException("expected properties file ${stage.context.propertyFile} but one was not found or was empty")
}
Expand Down

0 comments on commit 958be83

Please sign in to comment.