-
Notifications
You must be signed in to change notification settings - Fork 1
/
buildspec.yml
39 lines (33 loc) · 1.27 KB
/
buildspec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
version: 0.2
phases:
install:
runtime-versions:
docker: latest
pre_build:
commands:
- echo Logging in to Amazon ECR...
- aws --version
- echo "Attempting ECR Login"
- echo "ECR Login Successful"
- echo "changing permissions on project directory"
- chmod 777 *
- echo "permissions changed"
- echo "skaffold installation"
- curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64
- install skaffold /usr/local/bin/
- echo "Kube cluster config"
- aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
- aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
- echo "ecr login"
- aws ecr get-login-password --region ca-central-1 | docker login --username AWS --password-stdin 533178462151.dkr.ecr.ca-central-1.amazonaws.com
- aws configure set default.region ca-central-1
- aws eks --region ca-central-1 update-kubeconfig --name $KUBE_CLUSTER
- kubectl config set-context --current --namespace=jhub
- kubectl get pods
build:
commands:
- skaffold build
- echo "image pushed to the repo"
- echo "attempting to run the image"
- skaffold run
- echo "kubernetes deployment successful!!"