Skip to content

Commit

Permalink
Merge pull request #57 from spinnaker/more-hystrix
Browse files Browse the repository at this point in the history
More hystrix
  • Loading branch information
tomaslin committed Dec 8, 2015
2 parents 5c7c53f + a210ef6 commit da333d1
Showing 1 changed file with 6 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ class JenkinsService {
}

Build getBuild(String jobName, Integer buildNumber) {
new SimpleHystrixCommand<Build>(
groupKey, "getBuild", {
return jenkinsClient.getBuild(jobName, buildNumber)
}).execute()
return jenkinsClient.getBuild(jobName, buildNumber)
}

ScmDetails getGitDetails(String jobName, Integer buildNumber) {
Expand All @@ -88,38 +85,22 @@ class JenkinsService {
}

QueuedJob getQueuedItem(Integer item) {
// new SimpleHystrixCommand<QueuedJob>(
// groupKey, "getQueuedItem", {
return jenkinsClient.getQueuedItem(item)
// }).execute()
return jenkinsClient.getQueuedItem(item)
}

Response build(String jobName) {
new SimpleHystrixCommand<Response>(
groupKey, "build", {
return jenkinsClient.build(jobName)
}).execute()
return jenkinsClient.build(jobName)
}

Response buildWithParameters(String jobName, Map<String, String> queryParams) {
new SimpleHystrixCommand<Response>(
groupKey, "buildWithParameters", {
return jenkinsClient.buildWithParameters(jobName, queryParams)
}).execute()
return jenkinsClient.buildWithParameters(jobName, queryParams)
}

JobConfig getJobConfig(String jobName) {
new SimpleHystrixCommand<JobConfig>(
groupKey, "getJobConfig", {
return jenkinsClient.getJobConfig(jobName)
}).execute()
return jenkinsClient.getJobConfig(jobName)
}

Response getPropertyFile(String jobName, Integer buildNumber, String fileName) {
new SimpleHystrixCommand<Response>(
groupKey, "getPropertyFile", {
return jenkinsClient.getPropertyFile(jobName, buildNumber, fileName)
}).execute()

return jenkinsClient.getPropertyFile(jobName, buildNumber, fileName)
}
}

0 comments on commit da333d1

Please sign in to comment.