YAML vs GUI

Changes made in GUI will be automatically reflected in YAML and vice-versa.

YAML and GUI configuration

Configuring a pipeline via the GUI automatically generates its definition in the YAML tab.

Image loading...

Modifying a pipeline in the GUI updates its definition, and vice-versa – modifying a definition updates pipeline configuration. For example, changing the refs property in the YAML will update the branch for which the pipeline is run:

Image loading...

Storing pipeline definitions

By default, YAML is stored in the app. However, you can also keep the configuration in your git repository. That way, you can change piepline definitions by editing the files in the repository. When choosing to store YAML definition in the repository you have to specify project, branch and path to the YAML file.

By storing your YAML in the repository, you can also hard-set the branch it should be on, or choose to make it dynamic.

Fixed branch

If you want to have your configuration file on a fixed branch. Pipeline with storage location set to a fixed branch, will always relate to definitions of this branch, pushing to different refs will not change it.

Image loading...

Success
Storing pipeline definitions in a dedicated repository is the preferred way for teams looking to enhance project security. Restricting access to a specific group of developers provides precise control over the process and prevents unwanted changes to the delivery configuration.

Dynamic branch

If you want for pipeline definition to be dependent on how it's defined in ref (branch/tag/pr) for which it's being run, then you'll have to use dynamic mode. In dynamic mode, the configuration is based on a YAML file pushed to a branch, tag, or pull request matching the refs for which the pipeline is run. On git push pipeline definition switches to the one defined in the branch, pull request or tag to which the push was made - provided that the push reference matches the pipeline's codescope definition set in the YAML.

**For example: When the pipeline's YAML definition's codescope is set to refs/branches/dev, the dev branch will switch the pipeline definition to its own once a push to dev is made.

Image loading...

Hint
The config file must be named buddy.yml and pushed either to root or .buddy directory.

Autodiscovery

By enabling autodiscovery option in the Project Settings, pipeline definitions will be autodiscovered in the /.buddy/ directory.

If the YAML definition includes multiple branches, Buddy will utilize the definition specific to each branch within its respective branch's codescope.

By default, autodiscovered pipelines are set to dynamic branch which means they will only appear on branch/tag/pr push matching the codescope defined in the pipeline.

Adding .fixed to the YAML filename (e.g., pipeline.fixed.yml) instructs Buddy to apply the initial branch's configuration across all branches listed in codescope. The "initial branch" refers to the branch where the definition was first introduced.

Parsing errors

If you cannot see any changes upon updating the definition, it probably means there was a parsing error with the file. You can check the details of the errors from two places:

  • on the event stream in the Activity tab
  • by clicking the error icon on the pipeline list

Solving problems

If the pipeline definition in buddy.yml is incorrect, the pipeline will not be added. In order to debug what went wrong, follow these steps:

  1. Go to the project’s Activity stream
  2. Find the push containing the commit with the new version of buddy.yml

Clicking the commit will launch the logs covering the process of the file:

Image loading...YAML processing logs

Hint
Due to backwards compatibility, multiple YAML-file definitions are supported. However, we strongly suggest keeping each pipeline in separate files.

Last modified on Sep 23, 2024