steps: # Build Images - id: Building Init Image name: gcr.io/cloud-builders/docker args: - build - -t - eu.gcr.io/$PROJECT_ID/init:latest - -t - eu.gcr.io/$PROJECT_ID/init:$SHORT_SHA - -f - init.dockerfile - . - id: Building Nginx Image name: gcr.io/cloud-builders/docker args: - build - -t - eu.gcr.io/$PROJECT_ID/nginx:latest - -t - eu.gcr.io/$PROJECT_ID/nginx:$SHORT_SHA - -f - nginx.dockerfile - . waitFor: ['-'] - id: Building PHP-FPM Image name: gcr.io/cloud-builders/docker args: - build - -t - eu.gcr.io/$PROJECT_ID/php:latest - -t - eu.gcr.io/$PROJECT_ID/php:$SHORT_SHA - -f - php.dockerfile - . waitFor: ['-'] # Push Images - id: Push Init Image name: gcr.io/cloud-builders/docker args: - push - eu.gcr.io/$PROJECT_ID/init:$SHORT_SHA - id: Push Nginx Image name: gcr.io/cloud-builders/docker args: - push - eu.gcr.io/$PROJECT_ID/nginx:$SHORT_SHA - id: Push PHP-FPM Image name: gcr.io/cloud-builders/docker args: - push - eu.gcr.io/$PROJECT_ID/php:$SHORT_SHA # Update Deployment - id: Updating Deployment name: gcr.io/cloud-builders/kubectl args: - apply - -f - deployment.yaml env: - CLOUDSDK_COMPUTE_ZONE=europe-west1-b - CLOUDSDK_CONTAINER_CLUSTER=cluster-1 # Images images: - eu.gcr.io/$PROJECT_ID/init:latest - eu.gcr.io/$PROJECT_ID/init:$SHORT_SHA - eu.gcr.io/$PROJECT_ID/nginx:latest - eu.gcr.io/$PROJECT_ID/nginx:$SHORT_SHA - eu.gcr.io/$PROJECT_ID/php:latest - eu.gcr.io/$PROJECT_ID/php:$SHORT_SHA # Tags tags: - master - dev - init