Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

BuildStep doesn't run commands when --skip-preview is used #44

Open
wimoMisterX opened this issue Dec 1, 2021 · 1 comment
Open

BuildStep doesn't run commands when --skip-preview is used #44

wimoMisterX opened this issue Dec 1, 2021 · 1 comment

Comments

@wimoMisterX
Copy link
Contributor

The BuildStep pulumi module doesn't run the cmd when --skip-preview is passed to pulumi.

Unfortunately pulumi doesn't expose whether --skip-preview has been used. I've check the process.env and process.argv as well to see if we can determine if --skip-preview is used, and we can't :(

I have 2 solutions in mind:

  1. Run the pulumi command with an env variable called PULUMI_SKIP_PREVIEW and that could checked in our BuildStep component.
  2. Change the BuildStep into a DynamicResourceProvider and always run the command in the diff method
@JakeGinnivan
Copy link
Contributor

BuildStep needs to move the run into the apply stage.

Either we build outside of the pulumi process (which the NX pulumi plugin can do), or it only builds in plan and not preview.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants