This post is part of the New Functionality In Microsoft Dynamics 365 Business Central 2023 Wave 2 series in which I am taking a look at the new functionality introduced in Microsoft Dynamics 365 Business Central 2023 Wave 2.
The fifteenth of the new functionality in the Development section is Track source and build metadata on extensions.
To help track extensions that are created as part of DevOps pipelines, Microsoft are introducing Source and Build properties in the app.json manifest of extensions. This allows easily finding the relevant source repo, commit ID, and build system used to create the extension.
Enabled for: Admins, makers, marketers, or analysts, automatically
Public Preview: Aug 2023
General Availability: Oct 2023
Feature Details
The app.json manifest of extensions now contains two new properties, Source and Build. These can be used to track source location and the build context.
For source, the following are supported:
- repositoryUrl, which is the URL of the repository where the source code of the project can be found.
- commit, which is an ID of the source code for the current version of the project, that allows getting back to the commit that triggered building the extension.
For build, the following are supported:
- by, which is useful for tracking the build agent/system that orchestrated the build; for example, AL-Go for GitHub.
- url, which can be used for the URL to the build system invocation where the build can be found.
You can define these values directly in the app.json, but given the dynamic nature, the usual scenario would be to set these as part of build pipelines via command line parameters for the used alc.exe compiler executable. The values passed here will overwrite any values in the app.json source file.
If using BcContainerHelper, the functions Compile-AppInBcContainer and Compile-AppWithCompilerFolder now take parameters for "SourceRepositoryUrl", "SourceCommit", "BuildBy", and "BuildUrl". These are now being set if you use AL:Go for GitHub to build your extensions.
In this release none of these values are yet surfacing in the Extension Management page, in TAC, or via PowerShell commands like NAV-AppInfo. If you want to read the values, the option is currently to use the BcContainerHelper "Extract-AppFileToFolder", which will allow getting the app.json file with the settings.
Here’s an example of build and source metadata in app.json. This is normally set by the build process and not manually.
New Functionality In Microsoft Dynamics 365 Business Central 2023 Wave 2
What should we write about next?
If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.