hi all! any idea on how to run in a clean way a bu...
# general
p
hi all! any idea on how to run in a clean way a build script just in the middle of pulumi deployment flow? i'm using webpack. e.g.:
Copy code
// pulumi deploys server resources --> Pulumit.output gives me the 'endpoint'
execSync(
  pulumi.interpolate`yarn build --env endpoint_url=${endpoint}`
)
// pulumi deploys the frontend resources
b
You're probably going to want to use the automation api for this.
p
cool! thanks!
i'll give it a try and comeback 👍
c
Copy code
endpoint.apply(e => new Promise(resolve => exec('yarn', ['build', '--env', `--endpoint_url=${e}`))
Something along the lines of that
https://github.com/pulumi/pulumi/issues/99 - this is the issue tracking actual support
p
this sounds more reasonable to me, that it can be integreated seamlessly within the pulumi up flow
thanks!
p
you might also want to combine it with
isDryRun()
to not execute it while doing a preview https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/pulumi/runtime/#isDryRun
p
now working! thank you guys