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

Updated AL-Go System Files #2

Merged
merged 1 commit into from
Mar 1, 2023
Merged

Updated AL-Go System Files #2

merged 1 commit into from
Mar 1, 2023

Conversation

SearchAndDestroy
Copy link
Owner

v2.4

Issues

  • Issue #171 create a workspace file when creating a project
  • Issue #356 Publish to AppSource fails in multi project repo
  • Issue #358 Publish To Environment Action stopped working in v2.3
  • Issue #362 Support for EnableTaskScheduler
  • Issue #360 Creating a release and deploying from a release branch
  • Issue #371 'No previous release found' for builds on release branches
  • Issue #376 CICD jobs that are triggered by the pull request trigger run directly to an error if title contains quotes

Release Branches

NOTE: Release Branches are now only named after major.minor if the patch value is 0 in the release tag (which must be semver compatible)

This version contains a number of bug fixes to release branches, to ensure that the recommended branching strategy is fully supported. Bugs fixed includes:

  • Release branches was named after the full tag (1.0.0), even though subsequent hotfixes released from this branch would be 1.0.x
  • Release branches named 1.0 wasn't picked up as a release branch
  • Release notes contained the wrong changelog
  • The previous release was always set to be the first release from a release branch
  • SemVerStr could not have 5 segments after the dash
  • Release was created on the right SHA, but the release branch was created on the wrong SHA

Recommended branching strategy:

Branching Strategy

New Settings

New Project setting: EnableTaskScheduler in container executing tests and when setting up local development environment

Support for GitHub variables: ALGoOrgSettings and ALGoRepoSettings

Recently, GitHub added support for variables, which you can define on your organization or your repository.
AL-Go now supports that you can define a GitHub variable called ALGoOrgSettings, which will work for all repositories (with access to the variable)
Org Settings will be applied before Repo settings and local repository settings files will override values in the org settings
You can also define a variable called ALGoRepoSettings on the repository, which will be applied after reading the Repo Settings file in the repo
Example for usage could be setup of branching strategies, versioning or an appDependencyProbingPaths to repositories which all repositories share.
appDependencyProbingPaths from settings variables are merged together with appDependencyProbingPaths defined in repositories

Refactoring and tests

ReadSettings has been refactored to allow organization wide settings to be added as well. CI Tests have been added to cover ReadSettings.

v2.3

Issues

  • Issue #312 Branching enhancements
  • Issue #229 Create Release action tags wrong commit
  • Issue #283 Create Release workflow uses deprecated actions
  • Issue #319 Support for AssignPremiumPlan
  • Issue #328 Allow multiple projects in AppSource App repo
  • Issue #344 Deliver To AppSource on finding app.json for the app
  • Issue #345 LocalDevEnv.ps1 can't Dowload the file license file

New Settings

New Project setting: AssignPremiumPlan on user in container executing tests and when setting up local development environment
New Repo setting: unusedALGoSystemFiles is an array of AL-Go System Files, which won't be updated during Update AL-Go System Files. They will instead be removed. Use with care, as this can break the AL-Go for GitHub functionality and potentially leave your repo no longer functional.

Build modes support

AL-Go projects can now be built in different modes, by specifying the buildModes setting in AL-Go-Settings.json. Read more about build modes in the Basic Repository settings.

LocalDevEnv / CloudDevEnv

With the support for PowerShell 7 in BcContainerHelper, the scripts LocalDevEnv and CloudDevEnv (placed in the .AL-Go folder) for creating development environments have been modified to run inside VS Code instead of spawning a new powershell 5.1 session.

Continuous Delivery

Continuous Delivery can now run from other branches than main. By specifying a property called branches, containing an array of branches in the deliveryContext json construct, the artifacts generated from this branch are also delivered. The branch specification can include wildcards (like release/*). Default is main, i.e. no changes to functionality.

Continuous Deployment

Continuous Deployment can now run from other branches than main. By creating a repo setting (.github/AL-Go-Settings.json) called <environmentname>-Branches, which is an array of branches, which will deploy the generated artifacts to this environment. The branch specification can include wildcards (like release/*), although this probably won't be used a lot in continuous deployment. Default is main, i.e. no changes to functionality.

Create Release

When locating artifacts for the various projects, the SHA used to build the artifact is used for the release tag
If all projects are not available with the same SHA, this error is thrown: The build selected for release doesn't contain all projects. Please rebuild all projects by manually running the CI/CD workflow and recreate the release.
There is no longer a hard dependency on the main branch name from Create Release.

AL-Go Tests

Some unit tests have been added and AL-Go unit tests can now be run directly from VS Code.
Another set of end to end tests have also been added and in the documentation on contributing to AL-Go, you can see how to run these in a local fork or from VS Code.

LF, UTF8 and JSON

GitHub natively uses LF as line seperator in source files.
In earlier versions of AL-Go for GitHub, many scripts and actions would use CRLF and convert back and forth. Some files were written with UTF8 BOM (Byte Order Mark), other files without and JSON formatting was done using PowerShell 5.1 (which is different from PowerShell 7).
In the latest version, we always use LF as line seperator, UTF8 without BOM and JSON files are written using PowerShell 7. If you have self-hosted runners, you need to ensure that PS7 is installed to make this work.

Experimental Support

Setting the repo setting "shell" to "pwsh", followed by running Update AL-Go System Files, will cause all PowerShell code to be run using PowerShell 7 instead of PowerShell 5. This functionality is experimental. Please report any issues at https://github.com/microsoft/AL-Go/issues
Setting the repo setting "runs-on" to "Ubuntu-Latest", followed by running Update AL-Go System Files, will cause all non-build jobs to run using Linux. This functionality is experimental. Please report any issues at https://github.com/microsoft/AL-Go/issues

@SearchAndDestroy SearchAndDestroy merged commit e935df3 into main Mar 1, 2023
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.

1 participant