Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Redeploy with Build #545

Open
nrdevau opened this issue Aug 8, 2024 · 0 comments
Open

Redeploy with Build #545

nrdevau opened this issue Aug 8, 2024 · 0 comments

Comments

@nrdevau
Copy link

nrdevau commented Aug 8, 2024

As noted in #538 (which isn't quite the inverse of this request)

magento-cloud redeploy acts on a remote environment. But as you noted, sometimes the build phase is not included in the redeployment. You should open a new issue if your concern is remote environments.

I open a new issue. My concern is running the build phase on an environment in Magento Cloud, without having to change code.

There is plenty discussion in slack about companies that do this with a workaround, such as adding a build environment variable that they increase when they need to force a build.

I believe the right solution is to add a flag to the magento-cloud environment:deploy command like magento-cloud env:deploy --force-build or something along those lines.

Current help

Command: environment:redeploy
Aliases: redeploy
Description: Redeploy an environment

Usage:
 magento-cloud redeploy [-p|--project PROJECT] [-e|--environment ENVIRONMENT] [-W|--no-wait] [--wait]

Options:
  -p, --project=PROJECT          The project ID or URL
  -e, --environment=ENVIRONMENT  The environment ID. Use "." to select the project's default environment.
  -W, --no-wait                  Do not wait for the operation to complete
      --wait                     Wait for the operation to complete (default)
  -h, --help                     Display this help message
  -V, --version                  Display this application version
  -y, --yes                      Answer "yes" to confirmation questions; accept the default value for other questions; disable interaction
      --no-interaction           Do not ask any interactive questions; accept default values. Equivalent to using the environment variable: MAGENTO_CLOUD_CLI_NO_INTERACTION=1
  -v|vv|vvv, --verbose           Increase the verbosity of messages

Proposed help

Command: environment:redeploy
Aliases: redeploy
Description: Redeploy an environment

Usage:
 magento-cloud redeploy [-p|--project PROJECT] [-e|--environment ENVIRONMENT] [-W|--no-wait] [--wait] [--force-build]

Options:
  -p, --project=PROJECT          The project ID or URL
  -e, --environment=ENVIRONMENT  The environment ID. Use "." to select the project's default environment.
  -W, --no-wait                  Do not wait for the operation to complete
      --wait                     Wait for the operation to complete (default)
      --force-build              Trigger the build phase for this environment
  -h, --help                     Display this help message
  -V, --version                  Display this application version
  -y, --yes                      Answer "yes" to confirmation questions; accept the default value for other questions; disable interaction
      --no-interaction           Do not ask any interactive questions; accept default values. Equivalent to using the environment variable: MAGENTO_CLOUD_CLI_NO_INTERACTION=1
  -v|vv|vvv, --verbose           Increase the verbosity of messages

Bonus feature would be to add a Redeploy with Build menu item in the cloud console, which opens a modal showing the --force-build flag.

I am happy to work on a PR for this if it's worth considering, but wanted to confirm it wouldn't just be wasted effort.

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

No branches or pull requests

1 participant