CI/CD: Google Cloud Build — Pass artifacts between steps

Serverless Guru
Serverless Guru
Published in
6 min readJan 21, 2019

--

Downtown PDX — Ryan Jones

In this article we are going to cover passing artifacts between build steps using Google Cloud Build. This will be a short and straight to the point article not covering the full range of Google Cloud Build capabilities or the Google Cloud Platform.

If you’re interested in CI/CD pipelines, then please check out our other articles which cover varying topics. Here is a short list.

Alright, let’s jump in!

Full file:

Below is the full cloudbuild.yaml file detailing what we will cover in this article. The CI/CD pipeline only consists of two build steps for simplicity and staying focused on passing artifacts between build steps. Enjoy.

steps:
# Step 1:
- name: 'gcr.io/cloud-builders/mvn'
entrypoint: bash
args: ['./scripts/build.bash']
volumes:
- name: 'jar'
path: /jar
# Step 2:
- name: 'gcr.io/cloud-builders/gcloud'
entrypoint: bash
args: ['./scripts/deploy.bash', '$_APP_NAME', '$_ENV_NAME', '$_REGION']
volumes:
- name: 'jar'…

--

--

Serverless Guru
Serverless Guru

We can help you migrate to serverless, build serverless applications, and train your team on serverless best practices. https://www.serverlessguru.com