Skip to content

Commit

Permalink
EcsImage now has a region. (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkirillov authored Dec 5, 2017
1 parent 6be3770 commit 6965a45
Showing 1 changed file with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public Collection<ImageDetails> byTags(Stage stage, String packageName, Map<Stri
.sorted()
.collect(Collectors.toList());

HashSet<ImageDetails> response = Sets.newHashSet(allMatchedImages.get(0).toImageDetails("us-west-2"));
HashSet<ImageDetails> response = Sets.newHashSet(allMatchedImages.get(0).toImageDetails());
return response;
}

Expand Down Expand Up @@ -91,16 +91,11 @@ public static class EcsImage implements Comparable<EcsImage> {
@JsonProperty
Map<String, List<String>> amis;

ImageDetails toImageDetails(String region) {
String imageId = amis.get(region).get(0);

// Map<String, String> imageTags = tagsByImageId.get(imageId);
// AppVersion appVersion = AppVersion.parseName(imageTags.get("appversion"));
@JsonProperty
String region;

// JenkinsDetails jenkinsDetails = Optional
// .ofNullable(appVersion)
// .map(av -> new JenkinsDetails(imageTags.get("build_host"), av.getBuildJobName(), av.getBuildNumber()))
// .orElse(null);
ImageDetails toImageDetails() {
String imageId = amis.get(region).get(0);

return new EcsImageDetails(
imageId, imageName, region, new JenkinsDetails("host", "name", "1337001")
Expand Down

0 comments on commit 6965a45

Please sign in to comment.