Skip to content

Commit

Permalink
fix(amazon/pipeline): sort list of available bake regions (#7472)
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Munson committed Oct 2, 2019
1 parent 30c7f2c commit f957d42
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ module.exports = angular
baseLabelOptions: BakeryReader.getBaseLabelOptions(),
storeTypes: ['ebs', 'docker'],
}).then(function(results) {
$scope.regions = results.regions;
$scope.regions = [...results.regions].sort();
$scope.storeTypes = results.storeTypes;
if (!$scope.stage.storeType && $scope.storeTypes && $scope.storeTypes.length) {
$scope.stage.storeType = $scope.storeTypes[0];
Expand All @@ -78,10 +78,7 @@ module.exports = angular
delete $scope.stage.region;
}
if (!$scope.stage.regions.length && $scope.application.defaultRegions.aws) {
$scope.stage.regions.push($scope.application.defaultRegions.aws);
}
if (!$scope.stage.regions.length && $scope.application.defaultRegions.aws) {
$scope.stage.regions.push($scope.application.defaultRegions.aws);
$scope.stage.regions.push(...Object.keys($scope.application.defaultRegions.aws).sort());
}
$scope.baseOsOptions = results.baseOsOptions.baseImages;
$scope.baseLabelOptions = results.baseLabelOptions;
Expand Down

0 comments on commit f957d42

Please sign in to comment.