File: /var/www/api-management/bitbucket-pipelines.yml
image: google/cloud-sdk:latest
pipelines:
default:
- step:
name: Build and Deploy
services:
- docker
caches:
- docker
script:
- echo $GCP_CREDENTIALS | base64 -d > $HOME/gcp-key.json
- gcloud auth activate-service-account --key-file=$HOME/gcp-key.json
- gcloud config set project moreno-clavijo
- gcloud auth configure-docker gcr.io
- docker build -t gcr.io/moreno-clavijo/api-management-staging:v2.1 -f Dockerfile.staging .
- docker push gcr.io/moreno-clavijo/api-management-staging:v2.1
- gcloud container clusters get-credentials prueba --region southamerica-east1
- kubectl apply -f k8s/deployment.yaml
- kubectl apply -f k8s/service.yaml
definitions:
services:
docker:
memory: 3072