1

I am deploying a Craft website with Bitbucket Pipelines. Basically what it does is spinning up a container that runs composer install and builds my CSS and JS with webpack. The vendor folder and js/css builds are kept as artefacts to be deployed to the server. So far so good.

However when I am doing some updates locally (updating craft version or plugins) and push these to my repository, deploy them and run php craft up I get the following message:

Total 4 new Craft migrations to be applied:
    - m230531_123004_add_entry_type_show_status_field
    - m230607_102049_add_entrytype_slug_translation_columns
    - m230710_162700_element_activity
    - m230820_162023_fix_cache_id_type```

This is actually prompting me to answer yes or no. But since this is a automatic pipeline there won't be any input from me.

Is there an option I can add to the php craft up command which will always choose yes so that the pipeline will complete successfully?

For example with composer install I added the --no-interaction flag.

1 Answer 1

3

You can run most of Craft's console commands using the --interactive=0 flag which will disable interactive prompts for the command. More details in the docs here: https://craftcms.com/docs/4.x/console-commands.html#global-options

2
  • 1
    To add to Steve's answer, here's a good set of commands to run in the pipeline: php craft up --interactive=0, clear-caches/compiled-templates --interactive=0, clear-caches/cp-resources --interactive=0, clear-caches/data --interactive=0 Commented Aug 24, 2023 at 11:53
  • Awesome! @MaxStrebel Nice addition
    – Matthias
    Commented Aug 24, 2023 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.