Designer and push

Edit forms in the designer and push them to the repository

  1. Editing and pushing from the designer
  2. Pushing local content

Editing and pushing from the designer

With a repository used for forms, the designer edits the files in its working tree and pushes them back to the remote.

Button What it does
Save (local) Writes the forms and config.yaml into the working trees, without committing
Save (repository) Commits and pushes the saved changes; enabled once there are unpushed changes
Load (repository) Pulls the forms repositories and reloads the designer, after a confirmation if edits are unsaved

Forms stay in their repository; new ones wait, already usable, in FORMS_STAGING_PATH until you push. A form saved in a subfolder keeps its relative path: team/deploy.yaml is pushed to team/deploy.yaml under the forms folder of the repository. A new form whose path already exists there is not overwritten; it stays in staging, so rename it. With several forms repositories, Save (repository) and Load (repository) ask which one, defaulting to the config.yaml one; from 7.9.0 the push asks in the dialog of Pushing local content, with Push all beside Push.

A push stages all changes, commits them as AnsibleForms with the message Forms sync by <user>, then fetches, rebases on the remote and pushes, retrying up to five times. A rebase conflict is aborted and the conflicted files are listed; fix them in the remote, or use Reset on the Repositories page. Push on the Repositories page does the same.

When a single forms repository is cloned empty, AnsibleForms copies the local config.yaml and forms into its working tree, so a push (Save (repository), or Push on the Repositories page) publishes them. More on the designer is in Designer and git.


Pushing local content

From 7.9.0 content that is in no repository yet has a Push too, which asks where it goes, in the same dialog in every section.

Local content is a form in local mode (no forms repository), the categories or the constants no repository holds, a playbook, vars file or workflow file of the local folders, and a local inventory. Once saved, its Push, titled Push to a repository, turns orange. It opens one dialog: the section’s repositories in a dropdown, and New repository on its own line under it, which opens the repositories’ New dialog with the section’s usage ticked and chooses the new one once it is cloned. Push then moves the content into the repository chosen and pushes it:

Section What Push does
Forms A new forms repository takes the local forms on its first clone; the forms repository is then committed and pushed
Categories, Constants Their local files move into the repository, in the same files, then it is pushed
Playbooks, Vars files Every local file moves to the same path in the repository, then it is pushed
Workflows The file open moves to the same path in the repository, then it is pushed
Inventories Only a new repository: each inventories repository is one inventory. It is named after the inventory, which moves into it once it is cloned, and is pushed at once

A file keeps its path in the repository. When the repository already has a file at a path moved, the move is refused and nothing moves.

New repository needs access to Settings > Repositories; without it, the dropdown offers the repositories there are, and with none the dialog says No repository yet: an admin adds one in Settings > Repositories. Content already in a repository keeps its one-click Push, which asks nothing.