Skip to content

WorkflowTemplates from Git

If your WorkflowTemplates live in a Git repo and a GitOps tool like Argo CD or Flux applies them to your cluster, link them instead of copying them into Dagweave. Dagweave then follows the repo, and the repo stays in charge.

Open Import, choose From GitHub, and pick the repository, branch and path. Keep in sync with Git is ticked. A folder links every Argo resource in it, and a file links that one. Each file has to hold one resource.

Linking the same folder again picks up new files and follows files that moved.

When the import finishes, each workflow it made is listed by name. Click one to open it. Linked workflows show a Git mark in the Workflows list.

To link a workflow you already have, push it with Keep this workflow linked to the file ticked. See Push to Git.

Dagweave reads each file when you open it and after every push to the branch. The canvas shows the repository, file, branch and commit, and tells you when Git has something newer than what you’re looking at.

Git owns a linked file, so Dagweave doesn’t save your edits. Push to Git sends them back to the same file as a pull request or a commit.

See changes on the banner shows what a push would write next to the file as you opened it. Both sides are in Dagweave’s layout, so only your edits show up.

If someone changed the file since you opened it, a commit stops. To keep your edits, use Copy my YAML or Download my YAML, then Reload from Git. A pull request can still go ahead with Open the pull request anyway. Its diff shows what your version replaces.

After a pull request, the banner links it and says your changes are in it. That lasts until the file changes in Git, which is usually when it merges. Pushing again opens a second pull request.

Dagweave writes the file in its own layout, so comments in it are lost. Check the diff before you merge.

The name is part of the file, so rename a linked workflow on the canvas and push it. In the Workflows list, Open to rename (goes to Git) takes the place of Rename.

Dagweave never installs a linked WorkflowTemplate on your cluster. That’s your GitOps tool’s job. A run submits a Workflow that refers to the WorkflowTemplate by name, with the parameters you give it. A required parameter with no default has to be given.

Each run records the Git commit it came from, and the run page links to the file at that commit.

The run is drawn as a graph, and a step that calls a WorkflowTemplate opens to show its steps.

If a file can’t be read, Dagweave keeps the last good version and says what happened. Push to Git replaces the broken file with the version on your canvas. If a file is deleted, a push writes it back. To stop following Git instead, unlink it.

If an owner disconnects the GitHub account a file lives on, the workflows linked to its files are unlinked. They stay as ordinary workflows with their current steps.