prehistoric-account-60014
12/18/2019, 5:51 PMgcloud builds submit
) Something like this could help increase speed CI/CD pipelines by building images with GCP instead of locally.stocky-island-3676
12/18/2019, 5:56 PMgcp.cloudbuild
what you’re looking for? https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/gcp/cloudbuild/prehistoric-account-60014
12/18/2019, 5:59 PMgcp.couldbuild
lets you define triggers for running different builds. It does not let you declare a single build like you would be able to do with gcloud build submit
though.import * as gcp from '@pulumi/gcp'
import * as docker from '@pulumi/docker'
const build = new gcp.cloudbuild.Build({
source: '.',
config: './cloudbuild.yaml',
})
const images = build.images.map(buildImage => new docker.RemoteImage('app', { name: buildImage.name }))
pulumi up
results in a very large amount of Docker images being built it might be prohibitive to build them all locally. This way, the builds can all happen in GCP.stocky-island-3676
12/18/2019, 6:05 PMprehistoric-account-60014
12/18/2019, 6:05 PMgcloud
https://cloud.google.com/cloud-build/docs/quickstart-dockerwhite-balloon-205
docker.Image
is implemented as just shelling out to docker build
locally.
For a slightly more advanced version, dynamic providers assets could be used to ensure that the build gets "replaced" (regenerated) on any diffs to the source or config. https://www.pulumi.com/docs/intro/concepts/programming-model/#dynamicprovidersprehistoric-account-60014
12/18/2019, 6:09 PMdocker.Image
source and see if I can take a stab at it. In the topic of dynamic providers, how open are you guys on embracing community dynamic providers and are there any existing lists?white-balloon-205
docker.Image
itself is a bit more complex than it really needs to be - I expect you can do what you want here in a dozen-ish lines of JS code.custom providers to use Pulumi to manage things like Auth0 clients and APIs as well as Stripe Billing plans among other resourcesYes - the easiest way to get started with these sorts of things tends to be dynamic providers -though I think both of these are things we've looked at adding first class providers for as well.
prehistoric-account-60014
12/18/2019, 6:15 PMwhite-balloon-205