File tree Expand file tree Collapse file tree 2 files changed +17
-9
lines changed Expand file tree Collapse file tree 2 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 3
3
4
4
# Download the data.
5
5
code_version=$1
6
- code_architecture=$2
6
+ export code_architecture=$2
7
7
8
- curl -L -o lambda.zip " https://github.com/spacelift-io/ec2-workerpool-autoscaler/releases/download/${code_version} /ec2-workerpool-autoscaler_linux_${code_architecture} .zip"
8
+ if [ " $code_version " != " latest" ]; then
9
+ code_version=" tags/$code_version "
10
+ fi
11
+
12
+ release=$( curl -sS " https://api.github.com/repos/spacelift-io/ec2-workerpool-autoscaler/releases/${code_version} " | jq -r --arg ZIP " ec2-workerpool-autoscaler_linux_$code_architecture .zip" ' .assets[] | select(.name==$ZIP)' )
13
+
14
+ release_date=$( echo $release | jq -r ' .created_at' )
15
+ download_url=$( echo $release | jq -r ' .browser_download_url' )
16
+
17
+ echo " Downloading Details:"
18
+ echo " Release Name: $code_version "
19
+ echo " Release Date: $release_date "
20
+ echo " Download URL: $download_url "
21
+
22
+ curl -L -o lambda.zip $download_url
9
23
10
24
mkdir -p lambda
11
25
cd lambda
Original file line number Diff line number Diff line change @@ -6,13 +6,7 @@ variable "autoscaling_group_arn" {
6
6
variable "autoscaler_version" {
7
7
type = string
8
8
description = " Version of the autoscaler to deploy"
9
- default = " v0.3.0"
10
- }
11
-
12
- variable "autoscaling_frequency" {
13
- type = number
14
- description = " How often to run the autoscaler, in minutes"
15
- default = 5
9
+ default = " latest"
16
10
}
17
11
18
12
variable "spacelift_api_key_id" {
You can’t perform that action at this time.
0 commit comments