Track source and build metadata on extensions

Important

This content is archived and is not being updated. For the latest documentation, go to What's new or changed in Business Central. For the latest release plans, go to Dynamics 365, Power Platform, and Cloud for Industry release plans.

Enabled for Public preview General availability
Admins, makers, marketers, or analysts, automatically Aug 16, 2023 Oct 2, 2023

Business value

To help track extensions that are created as part of DevOps pipelines, we 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.

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, we support:

  • 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, we support:

  • 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.

Example of build and source metadata in app.json

Tell us what you think

Help us improve Dynamics 365 Business Central by discussing ideas, providing suggestions, and giving feedback. Use the forum at https://aka.ms/bcideas.

See also

JSON files (docs)