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

Export projects as .zip (yaml, state, config) #913

Open
taylordowns2000 opened this issue Jun 29, 2023 · 0 comments
Open

Export projects as .zip (yaml, state, config) #913

taylordowns2000 opened this issue Jun 29, 2023 · 0 comments

Comments

@taylordowns2000
Copy link
Member

taylordowns2000 commented Jun 29, 2023

User Story

  • As a user that is setting up version control for an already existing project,
  • I'd like to be able to export a whole directory that I can immediately use as a git repo
  • To save time and make clearer the process for "linking an existing project" to git.

Details

  1. This builds on Export projects as .yaml via UI #249, which allows users to export their current project configuration as a .yaml file. That .yaml file can be use to do new deployments but it can't be used to immediately start updating an existing project. (In this sense, it's good for portability but not adding version control to existing projects.)
  2. The ideal repo structure for version controlling an OpenFn project includes at least a project.yaml, a .state.json file, and a configuration.json file without an API token. (The API token will be passed in manually, or via GitHub secrets if this repo is being used with a GitHub action as in Github action to deploy changes to Lightning #250 )
  3. The project.yaml export functionality has been delivered in Export projects as .yaml via UI #249, the .state.json functionality is available via the projects API (and is used by the CLI when deploying) and the configuration.json information can be inferred by the current Lightning deployment and decisions—e.g., what will we call the .state.json file, what will we call the project.yaml file, and what is the api endpoint of the current instance: https://app.openfn.org/api or whatever.)

Implementation notes

  1. Start by reviewing the current export as YAML feature.
  2. Read through the export as ZIP feature from V1
  3. Test your zip export by opening the newly downloaded folder and running OPENFN_API_KEY=<<yourkey>> openfn deploy -c configuration.json
@taylordowns2000 taylordowns2000 moved this to Icebox in v2 Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Icebox
Development

No branches or pull requests

1 participant