File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -107,11 +107,30 @@ EOF
107
107
echo " --- Building templates"
108
108
make " mappings-for-${os} -${arch} -image" build/aws-stack.yml " IMAGE_ID=$image_id "
109
109
110
+ echo " --- Uploading test template to S3"
111
+ s3_bucket=" buildkite-agent-elastic-stack-test-templates"
112
+ s3_key=" templates/build-${BUILDKITE_BUILD_NUMBER} /${os} -${arch} /${BUILDKITE_COMMIT} .aws-stack.yml"
113
+
114
+ # s3 cp requires old path style, cloudformation requires new http style. sigh.
115
+ upload_location=" s3://${s3_bucket} /${s3_key} "
116
+ download_location=" https://s3.amazonaws.com/${s3_bucket} /${s3_key} "
117
+
118
+ aws s3 cp --content-type ' text/yaml' " build/aws-stack.yml" " $upload_location "
119
+
110
120
echo " --- Validating templates"
111
- make validate
121
+ aws --no-cli-pager cloudformation validate-template \
122
+ --output text \
123
+ --template-url " $download_location "
112
124
113
125
echo " --- Creating stack ${stack_name} "
114
- make create-stack " STACK_NAME=$stack_name " " SERVICE_ROLE=$service_role "
126
+ aws cloudformation create-stack \
127
+ --output text \
128
+ --stack-name " ${stack_name} " \
129
+ --template-url " $download_location " \
130
+ --disable-rollback \
131
+ --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM CAPABILITY_AUTO_EXPAND \
132
+ --parameters " $( cat config.json) " \
133
+ --role-arn " $service_role "
115
134
116
135
echo " +++ ⌛️ Waiting for update to complete"
117
136
./parfait watch-stack " ${stack_name} "
You can’t perform that action at this time.
0 commit comments