This builder installs the Pulumi CLI
in a Node 8-based Docker image. You can use this image to install other language tools too. If you would like to see the Pulumi builder for other languages, please contact us on our community Slack.
Use your favorite languages to build, deploy, and manage cloud software – on any cloud – with one workflow for developers and operators alike. Learn more at pulumi.com.
- Build this image and add it to your gcr repo
$ git clone [email protected]:GoogleCloudPlatform/cloud-builders-community
$ cd cloud-builders/pulumi
$ gcloud builds submit .
- Add the steps to your
cloudbuild.yaml
Create a project on Pulumi quickly using one of our examples. Click to get started now.
The following cloud build configuration snippet uses build variable substitution as a quickstart example. Substitutions are not treated as sensitive values in Cloud Build. Sensitive values such as access tokens, and other secrets should encrypt such environment variables.
Learn how to encrypt env variables and use them in your build configuration here.
$ cd my-project
$ cat >> cloudbuild.yaml
steps:
- name: gcr.io/$PROJECT_ID/pulumi-node
entrypoint: /bin/sh
args:
- '-c'
- 'yarn install && pulumi login && pulumi stack select <stack_name> && pulumi preview'
env: ["PULUMI_ACCESS_TOKEN=$_INSECURE_SUBSTITUTION_PULUMI_ACCESS_TOKEN_FOR_TESTING"]
CTRL-D
$ cd my-project
$ gcloud builds submit .
At this point you can automate the build using triggers via GCP Repos or Github. See this doc on how to integrate Pulumi into your CI/CD setup.