https://pulumi.com logo
#automation-api
Title
# automation-api
s

sticky-mechanic-98071

11/15/2021, 10:58 AM
Hey everyone 🙂 Glad to join the awesome community of Pulumi! pulumipus 8bit I'm building an app that should support promotion to production based on the success of e2e test and I wonder if it's possible to have a multi-stage deployment with pulumi for example: 1. Build the application (CRA) and deploy pre-production (Pulumi) 2. run the test against the pre-production (external) 3. deploy production (use the same build artifacts from step 1 The build artifacts from step 1 is uploaded to s3 bucket that is created with pulumi and this is why step 1 combines both the build and deploy
b

bored-oyster-3147

11/15/2021, 12:27 PM
I think you would just compartmentalize this kinda like this: 1. Deploy transient pre-production stack (maybe generate a stack name with the build id or something) 2. Run e2e tests 3. Destroy pre-production stack 4. Deploy production stack
I think if you are uploading your build artifacts with Pulumi than you might want to pull that portion out into a separate Pulumi project so that it can deployed independently of production/pre-production.
So that tearing down pre-production doesn't mean tearing down those artifacts.
s

sticky-mechanic-98071

11/15/2021, 12:33 PM
Sound legit 🙂 I'm not sure we want to dispose the pre-production environment every time
b

bored-oyster-3147

11/15/2021, 12:39 PM
Gotcha, so yea whatever works for you guys obviously but something like that is how I would do it
l

lemon-agent-27707

11/15/2021, 7:48 PM
I think that sounds like a reasonable approach, and possible to implement a multi-stage workflow like this with automation api.
Do you have any specific questions that I can help with?