Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating documentation #15

Merged
merged 2 commits into from
Dec 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -21,12 +21,26 @@ The **Skyline.DataMiner.CICD.Tools.GitHubToCatalogYaml** tool automates the crea
| Variable: `CATALOGIDENTIFIER` | `Id` | If not specified in the existing YAML or as a variable, an identifier is generated automatically for each catalog entry. |
| Owners | `Owners` | Customizable, with owner email, name, and URL settings. |

## Auto-Generated Catalog YAML File
## **Auto-Generated Catalog YAML File**

This tool not only extends an existing `catalog.yml` or `manifest.yml` but also generates an `auto-generated-catalog.yml` file in the `.githubtocatalog` directory. This secondary file is essential because:
**WARNING! DO NOT MODIFY THIS FILE.**

1. **Tracking Catalog IDs**: By committing and pushing `auto-generated-catalog.yml`, the tool can create a unique ID on the first run and reuse this ID on future runs. This avoids duplicate catalog records that can occur if new IDs are generated in every workflow run.
2. **Workflow Automation**: The `auto-generated-catalog.yml` is maintained separately to allow other processes to retrieve it as needed without modifying the primary catalog file in each update.
This tool generates an `auto-generated-catalog.yml` file in the `.githubtocatalog` directory, alongside extending any existing `catalog.yml` or `manifest.yml` file. This secondary file is critical for the following reasons:

1. **Tracking Catalog IDs:**
Committing and pushing the `auto-generated-catalog.yml` allows the tool to create a unique Catalog ID on the first run and reuse it for future runs. This prevents duplicate catalog records, which can occur if new IDs are generated with each workflow run.

2. **Workflow Automation:**
The `auto-generated-catalog.yml` is maintained separately, enabling other processes to access it without modifying the primary catalog file during updates.



## **Primary Catalog YAML File**

If you wish to make adjustments based on the `auto-generated-catalog.yml` file, you can do so by:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rephrasing suggestion:

If you wish to make adjustments to the 'auto-generated-catalog.yml' file, you'll need to create a 'catalog.yml' file in the root folder of your repository.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a suggestion to leave out the ID field?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ID field can be included, or left out, same as all the other variables. I think I'd prefer adding that information in the readme to avoid people thinking they have to specificy and make the whole file.


- Creating a new `catalog.yml` file in the root of your repository and including only the modifications you want.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave out the suggestions to copy or start from scratch.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left that out

- Alternatively, duplicating the entire `auto-generated-catalog.yml` file to the root of your repository and making adjustments as needed.

## Inferring Catalog Item Type

Original file line number Diff line number Diff line change
@@ -53,7 +53,11 @@ public class CatalogYaml
" Cannot contain newlines.\r\n" +
" Cannot contain leading or trailing whitespace characters.";

private const string typeComment = "[Required]\r\n" +
private const string typeComment = "WARNING! DO NOT CHANGE THIS FILE.\r\n" +
"Overriding or extending this file can be done by:\r\n" +
" - creating a new catalog.yml file in the root of your repository and writing only the things you want to adjust in there.\r\n" +
" - You may also duplicate this entire file to the root of your repository and then adjust what you want.\r\n\r\n" +
"[Required]\r\n" +
"Possible values for the Catalog item that can be deployed on a DataMiner System:\r\n" +
" - automationscript: If the Catalog item is a general-purpose DataMiner Automation script.\r\n" +
" - lifecycleserviceorchestration: If the Catalog item is a DataMiner Automation script designed to manage the life cycle of a service.\r\n" +