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

[DRAFT] Support indirect template repository and customizations of workflows #715

Closed
wants to merge 123 commits into from

Conversation

freddydk
Copy link
Collaborator

@freddydk freddydk commented Sep 19, 2023

Changes included in this PR:

  • Change all (Y/N) questions in workflows to type: boolean and checkmarks
  • Refactoring: Adding directCOMMIT logic into CloneIntoNewFolder and CommitFromNewFolder
  • Refactoring: Use CloneIntoNewFolder and CommitFromNewFolder in CheckForUpdates (code was duplicated)
  • Add step to all workflows to dump the content of all input parameters (for support reasons)
  • Refactoring: CheckForUpdates helperfunctions extracted and moved to CheckForUpdates.HelperFunctions.ps1
  • Support indirect 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:

image

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

Using an indirect template repository, the picture looks like this:

image

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

New workflows and scripts from the indirect template repository are copied over and new settings (for repo and for project) are copied over (if they don't already exist in the corresponding settings file).

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

This PR: freddydk/customized#3 - 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)

@freddydk freddydk closed this Dec 12, 2023
@mortenseifert
Copy link

Is this replaced by #853 ?

@freddydk
Copy link
Collaborator Author

Is this replaced by #853 ?

Yes - this PR was split into two.
One was already merged with support for these:

  • Change all (Y/N) questions in workflows to type: boolean and checkmarks
  • Refactoring: Adding directCOMMIT logic into CloneIntoNewFolder and CommitFromNewFolder
  • Refactoring: Use CloneIntoNewFolder and CommitFromNewFolder in CheckForUpdates (code was duplicated)
  • Add step to all workflows to dump the content of all input parameters (for support reasons)
  • Refactoring: CheckForUpdates helperfunctions extracted and moved to CheckForUpdates.HelperFunctions.ps1

This one is then only for customization capabilities

@mortenseifert
Copy link

This one is then only for customization capabilities

Great - thanks for the update (and the work you put into this)

@freddydk freddydk deleted the custom branch April 20, 2024 16:11
@freddydk freddydk restored the custom branch April 20, 2024 16:11
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.

None yet

2 participants