Non-interactive forge install in CI env

I am trying to build & deploy a forge app from a bitbucket pipeline and I notice that there is no --non-interactive flag on the forge install command. So, even though I pass through the --site, --environment, --product, --confirm-scopes, and --upgrade flags the install command still prompts me for confirmation.

I realize that the install is only needed in certain circumstances like new changes in scopes however I want the CI environment to be as automated as possible so I am simply always doing an upgrade install as part of the process.

Shouldn’t the install support the --non-interactive flag as well? Is there a better way to handle this?

Thanks,
Jeff

Hi @jeffryan, sorry for the delayed response.

The install command has been designed to be non-interactive, with all the available flags you have listed.

Would you be able to send through the exact command you are using, and the response from the CLI?

Edit: I think we’ve been able to reproduce with the --upgrade flag. This looks like unexpected behaviour and I will create a ticket for the team to fix this issue!

Great. Thanks @kchan for checking it out. I would actually like to see the --upgrade option also perform the initial install if it has not been done yet. The reason for this is that it would simplify execution of our CI pipelines. Currently we need to manually install the application on the CI test machines first so that the upgrade operation will succeed. This is a bit of a pain whenever we target a new site for deployment.

2 Likes

Thanks for the feedback, I’ll pass that onto the rest of the team.

In the meantime, is it possible to write a script which determines what error the --upgrade command failed with, and if it is not installed yet then run it without --upgrade?