Migrate from V0
Migrate from the V0 version of the CLI.
The V1 CLI can automatically migrate from the V0 directory structure while preserving your test and modules data. Please review the breaking changes between the V1 and V0 versions and backup all existing assets before proceeding.
Changes
Migration steps
Please migrate all users and CI scripts to the V1 CLI at the same time to avoid disruption. The V0 CLI is not compatible with the V1 directory structure.
Navigate to your v0 directory root, which should contain a folder called
momentic
.
Run the migrate command:
Modify momentic
CLI invocations in any scripts to conform to the new
command syntax: - The --local
/ --remote
flags are no longer supported.
Please use momentic@latest queue
to run tests/suites
remotely and momentic@latest run
to run
entities locally.
If any of your tests reference the special results
variable, you need to
modify them to conform to the new context management
system:
-
Open the
momentic
directory in your preferred text editor. Search for instances ofresults[
in all Momentic YAML files. -
Open each affected test or module in the app (
npx momentic@latest app
) and replace theresults
reference with anenv
reference. You may need to toggle theSave to environment variable
option on for the step that is expected to produce the result.
If desired, delete hardcoded environment variables from
momentic.config.yaml
and place sensitive values into .env
files or shell
environment variables that are available to Momentic at runtime.
If desired, commit all Momentic YAML files to your source control repository to facilitate collaboration with other team members.
After migrating, you may move your Momentic tests and modules around anywhere in your project.
Note that the migration will remove the environments
and fixtures
folders from your local machine, if they exist. This is expected as the environments
configuration is migrated to the momentic.config.yaml
.
Was this page helpful?