Skip to content

Add support for custom templates + customizations #853

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

Merged
merged 282 commits into from
Jun 19, 2025

Conversation

freddydk
Copy link
Contributor

@freddydk freddydk commented Dec 12, 2023

Changes included in this PR:

  • Support custom template repository = Point to an existing AL-Go repository as a template, like:

image

In this case, org/myptetemplate is a standard AL-Go repository, which gets updated as any other AL-Go repository using Update AL-Go System Files. This is a way of standardizing your repository based on type specific AL-Go templates (which can be private or public).

Normally, Update AL-Go System Files follows this mechanism:

File Type Repository file(s) AL-Go Template
Workflows .github/workflows/*.yaml <-
Repo Scripts .github/*.ps1 <-
Project Scripts .AL-Go/*.ps1 <-

Workflows and scripts are read from the template repository and modified based on settings and saved to the repository.

Using a custom template repository, the picture looks like this:

File Type Repository file(s) Custom Template AL-Go Template
Workflows .github/workflows/*.yaml <- Customizations <-
Workflows .github/workflows/*.yaml <- New files
Repo Scripts .github/*.ps1 <-
Repo Scripts .github/*.ps1 <- New files
Repo Settings .github/templateRepoSettings.doNotEdit.json <- .github/AL-Go-Settings.json
Project Scripts .AL-Go/*.ps1 <-
Project Scripts .AL-Go/*.ps1 <- New files
Project Settings .github/templateProjectSettings.doNotEdit.json <- .AL-Go/settings.json

Workflows and scripts are read from the "real" template repository and modified based on settings. Customizations for workflows in the custom template repository are applied.

New workflows and scripts from the custom template repository are copied over.

Repo and Project settings from the custom template repository are copied over to new settings files, which are applied before the final repos repo and project settings in order to allow the indirect template to add new defaults to settings to be applied to all repositories.

The final repository can also contain customizations to workflows and the winner here is the indirect template repository (if a custom job exists in both places).

This PR: freddydk/customized#17 - is an example of a repository with customizations of CI/CD and _BuildALGoProject, which runs Update AL-Go System Files and gets customizations from the indirect template repository (both settings, scripts and workflow customizations)

Documentation on customization capabilities is here: https://github.com/freddydk/AL-Go/blob/customize/Scenarios/CustomizingALGoForGitHub.md

@freddydk freddydk changed the title Add support for indirect template + customizations [DRAFT] Add support for indirect template + customizations Dec 12, 2023
@mortenseifert
Copy link

@freddydk, do you have an estimated time of completion for this PR? We've been testing it for a while and are considering deploying it live. However, we're a bit cautious about when the PR will be finalized and whether it will disrupt any modifications we've implemented.

@freddydk
Copy link
Contributor Author

Check #1097 - to ensure the scenario is supported

@freddydk freddydk changed the title [DRAFT] Add support for indirect template + customizations Add support for indirect template + customizations Jun 26, 2024
freddydk and others added 11 commits June 13, 2025 07:29
Co-authored-by: Alexander Holstrup <117829001+aholstrup1@users.noreply.github.com>
Co-authored-by: Maria Zhelezova <43066499+mazhelez@users.noreply.github.com>
Co-authored-by: Maria Zhelezova <43066499+mazhelez@users.noreply.github.com>
@freddydk freddydk requested review from mazhelez and aholstrup1 June 13, 2025 23:20
mazhelez
mazhelez previously approved these changes Jun 18, 2025
Co-authored-by: Alexander Holstrup <117829001+aholstrup1@users.noreply.github.com>
@freddydk freddydk enabled auto-merge (squash) June 19, 2025 03:52
@freddydk freddydk requested review from mazhelez and aholstrup1 June 19, 2025 03:52
@freddydk freddydk merged commit 8c51fa4 into microsoft:main Jun 19, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants