Once you set up config as code for a component, the component becomes managed via the compass.yaml
configuration file located in its related repository. You can update a managed component by making changes to the compass.yaml
file.
You might need to update a managed component for several reasons:
compass.yaml
file to another folder in your repository.compass.yaml
file to the new repository so that it is co-located with the component's source code.Before you update your managed components, make sure you’ve done the following:
A Compass admin must install and configure one of the supported apps: Bitbucket Cloud, GitHub Cloud, or GitLab.com.
Have some basic experience with using Git and familiarize yourself with adding and editing files in Bitbucket Cloud, GitHub, or GitLab.com. Learn how to add, edit, and commit to source files in a Bitbucket repository, learn how to manage files in GitHub, or learn how to manage files in GitLab
Have a basic understanding of YAML file structures.
Familiarize yourself with the structure and contents of the compass.yml file.
A component’s details can change over time. You might want to call it by a different name, assign ownership to a different team, or add links and dependencies. You can update the details of a managed component by updating the component’s compass.yaml
file in the source repository.
To update the details of a component that is managed with config as code:
compass.yaml
file and save the changes.compass.yml
file is invalid, Compass rejects the update for that component. You’ll know there is a problem if the component details aren’t updated in Compass within a few seconds. Check the contents of the file, fix any errors, and merge your changes with the repository’s default branch. Learn more about file validationOnce a component is managed via config as code, you can move the compass.yaml
to a new location within the same repository, without impacting the component’s connection with Compass. Compass maintains the connection via the unique id
in the compass.yaml
file, even if the compass.yaml
file changes location within the repository.
To move the compass.yaml
file to a different location within the same repository:
compass.yaml
file to a new location.compass.yaml
file in its new location.compass.yaml
file in its new location.Your component is now managed from the new location in the repository.
You can change a repository that is connected to a managed component. To do so, you first need to disconnect the component from its current repository and then connect it to a new repository via config as code.
Note the following points about changing a managed component’s repository:
compass.yaml
file you use when connecting it to the new repository overrides any interim changes to the component.id
in the compass.yaml
file must be present to connect the file in the new repository to the corresponding component in Compass.To change a managed component’s repository:
compass.yaml
file from the component’s current repository.compass.yaml
file from the component’s current repository.compass.yaml
file in that repository.compass.yaml
file’s new repository. Ensure that the component is in sync with the file.Your component is now managed from the new repository.
Rate this page: