@@ -22,27 +22,51 @@ ladder:
2222 color : " #7CCB92"
2323rules :
2424- title : Learned
25- expression : custom("learned") != null
25+ description : " # About\n This scorecard rule will walk you through setting up and\
26+ \ testing multi-branch support in Cortex using the cortex-properties.yaml file.\n \
27+ \n # Set up\n Ensure you have a functioning Github configuration and gitops enabled\
28+ \ for entity type service. \n\n\n\n ### Gotchas\n - The cortex-properties.yaml must\
29+ \ be in the default branch. If it’s missing there, the configuration won't apply.\n \
30+ - Changes in non-listed branches won’t be visible in Cortex.\n - You can manage\
31+ \ the same entity across branches using the same x-cortex-tag. In this case, Cortex\
32+ \ will reflect the entity as defined in the most recent commit across those branches.\n \
33+ - Some customers track entities with different x-cortex-tags across multiple branches\
34+ \ using the same directory and file names. While this works to distinguish entities\
35+ \ in Cortex, it prevents GitOps-based auto-archiving from working as expected.\
36+ \ Because Cortex sees these as the same file path across branches, it will archive\
37+ \ the file in all branches if it’s removed from just one. To avoid this, customers\
38+ \ should name the files differently or avoid using auto archiving. \n\n # Related\
39+ \ Cortex Academy courses\n None\n\n # Task\n\n - Add a cortex-properties.yaml file\
40+ \ to the main branch with the following content:\n ```\n branches:\n \
41+ \ - main\n - uat\n ```\n \n \
42+ \n \n \
43+ \n\n - Add a basic cortex.yaml file to define a simple entity in your sandbox.\
44+ \ Example:\n ```\n openapi: 3.0.1\n info:\n title: My Sandbox Service\n \
45+ \ x-cortex-tag: my-sandbox-service\n x-cortex-type: service\n ```\n \
46+ \n - Create a new branch named uat.\n - In GitHub:\n - Go to your repository\n \
47+ \ - Select the `main` branch dropdown\n - Type `uat` and select\
48+ \ “Create branch: uat”\n - Or in your terminal:\n ```\n git checkout\
49+ \ -b uat\n ```\n \n \
50+ \n - In the `uat` branch, update the cortex.yaml to make this entity an incoming\
51+ \ dependency for the `learn-cortex` entity. This will demonstrate the most recent\
52+ \ commit being the source of truth:\n ```\n openapi: 3.0.1\n info:\n \
53+ \ title: My Sandbox Service\n x-cortex-tag: my-sandbox-service\n \
54+ \ x-cortex-type: service\n x-cortex-dependency:\n - tag: learn-cortex\n \
55+ \ ```\n\n - Commit and push your changes to the uat branch:\n ```\n git\
56+ \ add cortex.yaml\n git commit -m \" Add dependency block from uat branch\"\n \
57+ \ git push origin uat\n ```\n\n\n - Confirm that:\n \n - The commit to\
58+ \ the entity in uat was picked up and your new entity is now an incoming dependency\
59+ \ for the learn-cortex entity and passing the rule. \n\n # Relevant documentation\n \
60+ - [Using GitOps in a non-default branch](https://docs.cortex.io/settings/gitops#using-gitops-in-a-non-default-branch)\n "
61+ expression : dependencies.in().length > 0
2662 identifier : 921bc595-5a12-3aa1-af45-e17d17e0d649
2763 weight : 1
2864 level : Completed
29- failureMessage : |
30- # About
31- Describe what the scorecard does.
32-
33- # Set up
34- Refer to any existing documentation at https://cortex.io/docs and describe any third party software setup.
35-
36-
37- # Related Cortex Academy courses
38- List any related courses available at academy.cortex.io.
39-
40- # Task
41- Describe the steps to complete the task here.
42-
43-
44- # CQL Rule
45- Explain what the CQL checks.
65+ failureMessage : " # About\n This scorecard is checking that the incoming dependency\
66+ \ is set to illustrate the most recent commit in the uat branch was successful.\
67+ \ \n\n # Set up\n You can read a little more about this here - [Using GitOps in\
68+ \ a non-default branch](https://docs.cortex.io/settings/gitops#using-gitops-in-a-non-default-branch)\n \
69+ \n "
4670filter :
4771 kind : GENERIC
4872 groups :
0 commit comments