File tree Expand file tree Collapse file tree 2 files changed +21
-7
lines changed Expand file tree Collapse file tree 2 files changed +21
-7
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} "
Original file line number Diff line number Diff line change @@ -243,11 +243,6 @@ bump-agent-version:
243
243
$(SED ) -Ei " s/AGENT_VERSION=.+/AGENT_VERSION=$( AGENT_VERSION) /g" packer/linux/scripts/install-buildkite-agent.sh
244
244
$(SED ) -Ei " s/\\\$ $AGENT_VERSION = \" .+\" /\$ $AGENT_VERSION = \" $( AGENT_VERSION) \" /g" packer/windows/scripts/install-buildkite-agent.ps1
245
245
246
- validate : build/aws-stack.yml
247
- aws --no-cli-pager cloudformation validate-template \
248
- --output text \
249
- --template-body " file://$( PWD) /build/aws-stack.yml"
250
-
251
246
generate-toc :
252
247
docker run -it --rm -v " $( PWD) :/app" node:slim bash \
253
248
-c " npm install -g markdown-toc && cd /app && markdown-toc -i README.md"
You can’t perform that action at this time.
0 commit comments