Update buildspec.yml
This commit is contained in:
parent
b9e99be53f
commit
86fa41c9a6
1 changed files with 3 additions and 3 deletions
|
@ -11,7 +11,7 @@ phases:
|
|||
pre_build:
|
||||
commands:
|
||||
- TAG="$REPOSITORY_NAME.$REPOSITORY_BRANCH.$ENVIRONMENT_NAME.$(date +%Y-%m-%d.%H.%M.%S).$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | head -c 8)"
|
||||
- sed -i 's@CONTAINER_IMAGE@'"$REPOSITORY_URI:$TAG"'@' hello-k8s.yml
|
||||
- sed -i 's@CONTAINER_IMAGE@'"$REPOSITORY_URI:$TAG"'@' frontend.yml
|
||||
- $(aws ecr get-login --no-include-email)
|
||||
- export KUBECONFIG=$HOME/.kube/config
|
||||
build:
|
||||
|
@ -27,7 +27,7 @@ phases:
|
|||
- export AWS_SESSION_TOKEN="$(echo ${CREDENTIALS} | jq -r '.Credentials.SessionToken')"
|
||||
- export AWS_EXPIRATION=$(echo ${CREDENTIALS} | jq -r '.Credentials.Expiration')
|
||||
- aws eks update-kubeconfig --name $EKS_CLUSTER_NAME
|
||||
- kubectl apply -f hello-k8s.yml
|
||||
- printf '[{"name":"hello-k8s","imageUri":"%s"}]' $REPOSITORY_URI:$TAG > build.json
|
||||
- kubectl apply -f frontend.yaml -n hipster
|
||||
- printf '[{"name":"frontend","imageUri":"%s"}]' $REPOSITORY_URI:$TAG > build.json
|
||||
artifacts:
|
||||
files: build.json
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue