forked from aws-samples/aws-deploy-spinnaker-halyard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec-deploy.yaml
19 lines (18 loc) · 1.06 KB
/
buildspec-deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
## Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
## SPDX-License-Identifier: MIT-0
version: 0.2
phases:
build:
commands:
- curl -LO https://amazon-eks.s3-us-west-2.amazonaws.com/1.10.3/2018-07-26/bin/linux/amd64/kubectl
- chmod +x kubectl
- mv kubectl /usr/local/bin
- curl -LO https://amazon-eks.s3-us-west-2.amazonaws.com/1.10.3/2018-07-26/bin/linux/amd64/aws-iam-authenticator
- chmod +x aws-iam-authenticator
- mv aws-iam-authenticator /usr/local/bin/heptio-authenticator-aws
- curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
- unzip awscli-bundle.zip
- ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
- ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
- aws s3 cp s3://codebuild-artifacts-${ACCOUNT_ID}/create-eks/files/resources/kubernetes/kubeconfig-no-role.yaml /home/spinnaker/.kube/config
- su spinnaker -c "./scripts/deploy_spinnaker.sh -S ${USE_SSM} -f ${SECURITY_GROUP_ID} -s ${SPINNAKER_VERSION}"