-
Notifications
You must be signed in to change notification settings - Fork 14
Pull Deploy Beta
Docs for the new pull/deploy commands
Pass --beta into pull or deploy commands to access the next-generation sync commands.
! IMPORTANT ! The beta API is in early stages, is likely to change, and may destroy your local or remote projects. DO NOT USE IN PRODUCTION ENVIRONMENTS
The new pull command is designed to always auto-expand a project to the filesystem. So you'll see a workflow.yaml for each workflow and a expression.js for each step. The execute command is compatible with the new workflow.yaml.
Note some important things:
-
pullexpects you to pull into a "repo" which may have mulitple projects (and non project stuff) inside - A repo is marked and configured with an
openfn.yamlfile - An
openfn.yamlfile will be created automatically on pull - When you pull a project, all existing files related to that workflow will be removed. You will be warned about this. This will improve.
- If you want to pull into a different folder other than the one you're one, pass
--path path/to/folder
Pull a project by id into the current working dir
pnpm openfn pull --beta e16c5f09-f0cb-4ba7-a4c2-73fcb2f29d00
Pull a project by id into a custom dir
pnpm openfn pull --beta e16c5f09-f0cb-4ba7-a4c2-73fcb2f29d00 --path tmp/projects
Set the lightning endpoint and API key (from an env var). OPENFN_ENDPOINT and OPENFN_API_KEY are still used by default
openfn pull --beta --endpoint https://app.staging.openfn.org --api-key $OPENFN_STAGING_PAT
Coming soon:
- configure json or yaml preferences
- configure which folders your workflows live in
- smarter, safer file rewriting
- rename a local workflow or step
- Pull a project by local name, not by id (ie,
openfn pull main)
The new deploy function assumes you have a previously pulled project nicely expanded into your filesystem.
You can rename steps and paths in the workflow.yaml file and changes will be synced to the app. This is not well tested but seems to work. Do not expect good errors if you refactor wrongly. Better support is coming.
Deploy the currently expanded project:
pnpm openfn deploy --beta
Deploy to a particular server:
openfn deploy --beta --endpoint https://app.staging.openfn.org --api-key $OPENFN_STAGING_PAT
Deploy a project from a different folder
openfn deploy --beta --path path/to/project
Note that you can only deploy to a project that you've previously pulled from.
Coming soon:
- Deploy a new project
- Control which project is deployed, and where, by name
- Better error handling and prompting
You can run a workflow in a new project folder (anything with an openfn.yaml)
From a folder with openfn.yaml file, just pass the workflow id
openfn my-workflow
If you want to run a workflow from an openfn.yaml at another path, just pass the path as the first positional argument:
openfn path/to/folder my-workflow