You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix regression: DownloadRelease escapes the '*' sign in the project name
Fixesmicrosoft#1018Fixesmicrosoft#970Fixesmicrosoft#818Fixesmicrosoft#918
Adding new setting:
- `useEarliestArtifact`: set this to true in order for AL-Go for GitHub
to build a project using the earliest compatible Business Central
artifact, determined by the highest application dependency from app.json
in all apps in the project and the `applicationDependency` in project
settings.
Small bugs:
- Only show a warning about a specific version of BcContainerHelper if
this is specified in Settings
---------
Co-authored-by: freddydk <[email protected]>
Co-authored-by: Alexander Holstrup <[email protected]>
Copy file name to clipboardexpand all lines: Actions/AL-Go-Helper.ps1
+25-13
Original file line number
Diff line number
Diff line change
@@ -400,6 +400,9 @@ function DownloadAndImportBcContainerHelper([string] $baseFolder = $ENV:GITHUB_W
400
400
if ($bcContainerHelperVersion-like"https://*") {
401
401
throw"Setting BcContainerHelperVersion to a URL in settings is not allowed. Fork the AL-Go repository and use direct AL-Go development instead."
402
402
}
403
+
if ($bcContainerHelperVersion-ne'latest'-and$bcContainerHelperVersion-ne'preview') {
404
+
Write-Host"::Warning::Using a specific version of BcContainerHelper is not recommended and will lead to build failures in the future. Consider removing the setting."
@@ -412,10 +415,6 @@ function DownloadAndImportBcContainerHelper([string] $baseFolder = $ENV:GITHUB_W
412
415
throw"ContainerHelperVersion private is no longer supported. Use direct AL-Go development and a direct download url instead."
413
416
}
414
417
415
-
if ($bcContainerHelperVersion-ne'latest'-and$bcContainerHelperVersion-ne'preview') {
416
-
Write-Host"::Warning::Using a specific version of BcContainerHelper is not recommended and will lead to build failures in the future. Consider removing the setting."
if ($kind-eq"local"-and$settings.type-eq"AppSource App" ) {
1716
-
if ($licenseFileUrl-eq"") {
1717
-
OutputWarning -message "When building an AppSource App, you should create a secret called LicenseFileUrl, containing a secure URL to your license file with permission to the objects used in the app."
1718
-
}
1719
-
}
1720
-
1721
1714
$installApps=$settings.installApps
1722
1715
$installTestApps=$settings.installTestApps
1723
1716
@@ -2208,9 +2201,28 @@ function DetermineArtifactUrl {
2208
2201
$version=$segments[2]
2209
2202
$country=$segments[3]; if ($country-eq"") { $country=$projectSettings.country }
2210
2203
$select=$segments[4]; if ($select-eq"") { $select="latest" }
throw"Invalid artifact setting ($artifact) in $ALGoSettingsFile. Version can only be '*' if select is first or latest."
2215
+
}
2216
+
Write-Host"Found $($allArtifactUrls.Count) artifacts for version $version matching application dependency $($projectSettings.applicationDependency), selecting $select."
2217
+
if (-not$artifactUrl) {
2218
+
throw"No artifacts found for the artifact setting ($artifact) in $ALGoSettingsFile, when application dependency is $($projectSettings.applicationDependency)"
Copy file name to clipboardexpand all lines: Actions/RunPipeline/RunPipeline.ps1
-6
Original file line number
Diff line number
Diff line change
@@ -124,12 +124,6 @@ try {
124
124
exit
125
125
}
126
126
127
-
if ($settings.type-eq"AppSource App" ) {
128
-
if ($licenseFileUrl-eq"") {
129
-
OutputWarning -message "When building an AppSource App, you should create a secret called LicenseFileUrl, containing a secure URL to your license file with permission to the objects used in the app."
Copy file name to clipboardexpand all lines: RELEASENOTES.md
+9
Original file line number
Diff line number
Diff line change
@@ -13,10 +13,18 @@ Note that when using the preview version of AL-Go for GitHub, we recommend you U
13
13
- Issue 997 'Deliver to AppSource' action fails for projects containing a space
14
14
- Issue 987 Resource not accessible by integration when creating release from specific version
15
15
- Issue 979 Publish to AppSource Documentation
16
+
- Issue 1018 Artifact setting - possiblity to read version from app.json
16
17
- Issue 1008 Allow PullRequestHandler to use ubuntu or self hosted runners for all jobs except for pregateCheck
17
18
- Issue 962 Finer control of "shell"-property
18
19
20
+
### Better artifact selection
21
+
22
+
The artifact setting in your project settings file can now contain a `*` instead of the version number. This means that AL-Go for GitHub will determine the application dependency for your projects together with the `applicationDependency` setting and determine which Business Central version is needed for the project.
23
+
-`"artifact": "//*//latest"` will give you the latest Business Central version, higher than your application dependency and with the same major.minor as your application dependency.
24
+
-`"artifact": "//*//first"` will give you the first Business Central version, higher than your application dependency and with the same major.minor as your application dependency.
25
+
19
26
### New Settings
27
+
20
28
-`deliverToAppSource`: a JSON object containing the following properties
21
29
-**productId** must be the product Id from partner Center.
22
30
-**mainAppFolder** specifies the appFolder of the main app if you have multiple apps in the same project.
@@ -25,6 +33,7 @@ Note that when using the preview version of AL-Go for GitHub, we recommend you U
25
33
- Add `shell` as a property under `DeployTo` structure
26
34
27
35
### Deprecated Settings
36
+
28
37
-`appSourceContinuousDelivery` is moved to the `deliverToAppSource` structure
29
38
-`appSourceMainAppFolder` is moved to the `deliverToAppSource` structure
30
39
-`appSourceProductId` is moved to the `deliverToAppSource` structure
Copy file name to clipboardexpand all lines: Scenarios/SetupCiCdForExistingAppSourceApp.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7

8
8
1. Back on github.com, under **Actions**, select the **Add existing app or test app** workflow and choose **Run workflow**. Paste in the **Secure Download URL** and choose **Run Workflow**. When the workflow finishes, complete the pull request created.
9
9
1. A CI workflow is kicked off by the pull request, this will fail with this error: *For AppSource Apps with AppSourceCop enabled, you need to specify AppSourceCopMandatoryAffixes in .AL-Go\settings.json.*
10
-
1.If you fix this and re-run, you will get a warning: *When building an AppSource App, you should create a secret called LicenseFileUrl, containing a secure URL to your license file with permission to the objects used in the app*. If you are building your AppSource app for Business Central versions prior to 22, the license file is a requirement. In 22, the CRONUS license has sufficient rights to be used as a DevOps license.
10
+
1.Note that if you are building your AppSource app for Business Central versions prior to 22, you also need to create a secret called LicenseFileUrl, with permissions to your objects. for version 22 and later, the CRONUS license has sufficient rights to be used as a DevOps license.
11
11
1. I will use my **KeyVault from [Scenario 7](UseAzureKeyVault.md)**, by adding a secret called **AZURE_CREDENTIALS** to my GitHub repo. And then add or modify the following 3 properties in the **.AL-Go\settings.json** file:
Copy file name to clipboardexpand all lines: Scenarios/UseAzureKeyVault.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# #7 Use Azure KeyVault for secrets with AL-Go
2
-
*Prerequisites: A completed [scenario 6](UpdateAlGoSystemFiles.md), an Azure KeyVault and you will need to follow the guidelines on how to connect to an Azure KeyVault as specified [here](https://go.microsoft.com/fwlink/?linkid=2217417&clcid=0x409). Add your KeyVault name to the the JSON construct from this walkthrough (using **“keyVaultName” : “{your keyvault name}”**) and add this JSON construct as a repository secret called AZURE_CREDENTIALS. You can also specify the KeyVault name in the AL-Go settings file if you do not wait to mess with the JSON construct.*
2
+
*Prerequisites: A completed [scenario 6](UpdateAlGoSystemFiles.md), an Azure KeyVault and you will need to follow the guidelines on how to connect to an Azure KeyVault as specified [here](https://learn.microsoft.com/azure/developer/github/connect-from-azure?tabs=azure-portal%2Cwindows#use-the-azure-login-action-with-a-service-principal-secret). Add your KeyVault name to the the JSON construct from this walkthrough (using **“keyVaultName” : “{your keyvault name}”**) and add this JSON construct as a repository secret called AZURE_CREDENTIALS. You can also specify the KeyVault name in the AL-Go settings file if you do not wait to mess with the JSON construct.*
3
3
4
4
*If you need to use Hardware Security Modules, you'll need to use a Premium SKU key vault. For more information on this, see [learn.microsoft.com](https://learn.microsoft.com/en-us/azure/key-vault/keys/about-keys)*
Copy file name to clipboardexpand all lines: Scenarios/settings.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ The repository settings are only read from the repository settings file (.github
72
72
73
73
| Name | Description | Default value |
74
74
| :-- | :-- | :-- |
75
-
| <aid="artifact"></a>artifact | Determines the artifacts used for building and testing the app.<br />This setting can either be an absolute pointer to Business Central artifacts (https://... - rarely used) or it can be a search specification for artifacts (\<storageaccount\>/\<type\>/\<version\>/\<country\>/\<select\>).<br />If not specified, the artifacts used will be the latest sandbox artifacts from the country specified in the country setting. ||
75
+
| <aid="artifact"></a>artifact | Determines the artifacts used for building and testing the app.<br />This setting can either be an absolute pointer to Business Central artifacts (https://... - rarely used) or it can be a search specification for artifacts (\<storageaccount\>/\<type\>/\<version\>/\<country\>/\<select\>).<br />If not specified, the artifacts used will be the latest sandbox artifacts from the country specified in the country setting.<br />**Note:** if version is set to `*`, then the application dependency from the apps in your project will determine which artifacts to use. If select is *first*, then you will get the first artifacts matching your application dependency. If select is *latest* then you will get the latest artifacts with the same major.minor as your application dependency.||
76
76
| <aid="updateDependencies"></a>updateDependencies | Setting updateDependencies to true causes AL-Go to build your app against the first compatible Business Central build and set the dependency version numbers in the app.json accordingly during build. All version numbers in the built app will be set to the version number used during compilation. | false |
77
77
| <aid="generateDependencyArtifact"></a>generateDependencyArtifact | When this repository setting is true, CI/CD pipeline generates an artifact with the external dependencies used for building the apps in this repo. | false |
78
78
| <aid="companyName"></a>companyName | Company name selected in the database, used for running the CI/CD workflow. Default is to use the default company in the selected Business Central localization. ||
@@ -95,7 +95,7 @@ The repository settings are only read from the repository settings file (.github
95
95
| <aid="rulesetFile"></a>rulesetFile | Filename of the custom ruleset file ||
96
96
| <aid="enableExternalRulesets"></a>enableExternalRulesets | If enableExternalRulesets is set to true, then you can have external rule references in the ruleset | false |
97
97
| <aid="vsixFile"></a>vsixFile | Determines which version of the AL Language Extension to use for building the apps. This can be:<br />**default** to use the AL Language Extension which ships with the Business Central version you are building for<br />**latest** to always download the latest AL Language Extension from the marketplace<br />**preview** to always download the preview AL Language Extension from the marketplace.<br/>or a **direct download URL** pointing to the AL Language VSIX file to use for building the apps.<br />By default, AL-Go uses the AL Language extension, which is shipped with the artifacts used for the build. | default |
98
-
| <aid="codeSignCertificateUrlSecretName"></a>codeSignCertificateUrlSecretName<br />codeSignCertificatePasswordSecretName |When developing AppSource Apps, your app needs to be code signed and you need to add secrets to GitHub secrets or Azure KeyVault, specifying the secure URL from which your codesigning certificate pfx file can be downloaded and the password for this certificate. These settings specifies the names (**NOT the secrets**) of the code signing certificate url and password. Default is to look for secrets called CodeSignCertificateUrl and CodeSignCertificatePassword. Read [this](SetupCiCdForExistingAppSourceApp.md) for more information. | CodeSignCertificateUrl<br />CodeSignCertificatePassword |
98
+
| <aid="codeSignCertificateUrlSecretName"></a>codeSignCertificateUrlSecretName<br />codeSignCertificatePasswordSecretName |**Note** there is a new way of signing apps, which is described [here](../Scenarios/Codesigning.md).<br />Using the old mechanism, you need a certificate .pfx file and password and you need to add secrets to GitHub secrets or Azure KeyVault, specifying the secure URL from which your codesigning certificate pfx file can be downloaded and the password for this certificate. These settings specifies the names (**NOT the secrets**) of the code signing certificate url and password. Default is to look for secrets called CodeSignCertificateUrl and CodeSignCertificatePassword. Read [this](SetupCiCdForExistingAppSourceApp.md) for more information. | CodeSignCertificateUrl<br />CodeSignCertificatePassword |
99
99
| <aid="keyVaultCodesignCertificateName"></a>keyVaultCodesignCertificateName | Name of a certificate stored in your KeyVault that can be used to codesigning. To use this setting you will also need enable Azure KeyVault in your AL-GO project. Read [this](UseAzureKeyVault.md) for more information ||
100
100
| <aid="applicationInsightsConnectionStringSecretName"></a>applicationInsightsConnectionStringSecretName | This setting specifies the name (**NOT the secret**) of a secret containing the application insights connection string for the apps. | applicationInsightsConnectionString |
101
101
| <aid="storageContextSecretName"></a>storageContextSecretName | This setting specifies the name (**NOT the secret**) of a secret containing a json string with StorageAccountName, ContainerName, BlobName and StorageAccountKey or SAS Token. If this secret exists, AL-Go will upload builds to this storage account for every successful build.<br />The BcContainerHelper function New-ALGoStorageContext can create a .json structure with this content. | StorageContext |
@@ -106,7 +106,7 @@ The repository settings are only read from the repository settings file (.github
106
106
| <aid="cacheKeepDays"></a>cacheKeepDays | When using self-hosted runners, cacheKeepDays specifies the number of days docker image are cached before cleaned up when running the next pipeline.<br />Note that setting cacheKeepDays to 0 will flush the cache before every build and will cause all other running builds using agents on the same host to fail. | 3 |
107
107
| <aid="assignPremiumPlan"></a>assignPremiumPlan | Setting assignPremiumPlan to true in your project setting file, causes the build container to be created with the AssignPremiumPlan set. This causes the auto-created user to have Premium Plan enabled. This setting is needed if your tests require premium plan enabled. | false |
108
108
| <aid="enableTaskScheduler"></a>enableTaskScheduler | Setting enableTaskScheduler to true in your project setting file, causes the build container to be created with the Task Scheduler running. | false |
109
-
| <aid="useCompilerFolder"></a>useCompilerFolder | Setting useCompilerFolder to true causes your pipelines to use containerless compiling. Unless you also set **doNotPublishApps** to true, setting useCompilerFolder to true won't give you any performance advantage, since AL-Go for GitHub will still need to create a container in order to publish and test the apps. In the future, publishing and testing will be split from building and there will be other options for getting an instance of Business Central for publishing and testing. | false |
109
+
| <aid="useCompilerFolder"></a>useCompilerFolder | Setting useCompilerFolder to true causes your pipelines to use containerless compiling. Unless you also set **doNotPublishApps** to true, setting useCompilerFolder to true won't give you any performance advantage, since AL-Go for GitHub will still need to create a container in order to publish and test the apps. In the future, publishing and testing will be split from building and there will be other options for getting an instance of Business Central for publishing and testing. **Note** when using UseCompilerFolder you need to sign apps using the new signing mechanism described [here](../Scenarios/Codesigning.md). | false |
110
110
| <aid="excludeEnvironments"></a>excludeEnvironments | excludeEnvironments can be an array of GitHub Environments, which should be excluded from the list of environments considered for deployment. github-pages is automatically added to this array and cannot be used as environment for deployment of AL-Go for GitHub projects. |[]|
0 commit comments