Hey everyone, Josh here from the Compass product team and I’m really excited to share that config as code now supports managing component labels, custom fields, the lifecycle attribute, and changing component type!
Config as code is a way to describe and manage your components using a "compass.yaml file" that gets added to your git repository. When a component is managed by config as code, it’s catalog information can only be updated by committing changes to the yaml file, which allows for governance over who can make changes and version control of component metadata.
The example yaml file below demonstrates how to use the new features if you’re already familiar with config as code. Checkout our docs for complete details on how to get started with config as code including more information on how to use these new fields.
configVersion: 1
name: example-service
id: 'ari:cloud:compass:d7141038-29ed-438b-901a-cebe65515bab:component/0fa12d64-d15f-4b2e-96fb-5b84203bf3c9/2b5abb73-0a29-465a-8bfd-afc69e5af0e8'
description: This is an example service.
typeId: SERVICE
ownerId: null
fields:
tier: 4
lifecycle: Active
links:
- name: Source Code
type: REPOSITORY
url: 'https://bitbucket.org/example/service'
labels:
- 'foo:bar'
- baz
customFields:
- name: platform
type: text
value: web
- name: reviewed
type: boolean
value: true
relationships:
DEPENDS_ON:
- 'ari:cloud:compass:00000000-0000-0000-0000-000000000000:component/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-00000000000'
- 'ari:cloud:compass:00000000-0000-0000-0000-000000000000:component/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-00000000000'
# Learn more about formatting compass.yml:
# https://go.atlassian.com/compass-yml-format
You may also notice that we now have a "configVersion" key as well; this is currently optional and the only supported "configVersion" today is "1".
What’s next for config as code you may ask? Next up we’ll be working on allowing you to create new components by simply adding a compass.yaml file to your repository which means we’ll remove the requirement to first create the component in the UI to obtain the ARI.
If you aren’t already managing your components through config as code learn more about it today! Let us know what you think and what else you’d like to see config as code do.
Josh Campbell
Product Manager
Atlassian
Seattle, WA
8 accepted answers
4 comments