github actions and azure pipelines use different environment variables
we could use to identify the running system.
we should use this possibility to output formatting commands for the
given system.
---------
Co-authored-by: Christoph Blank <christoph.blank@kumavision.com>
Co-authored-by: Freddy Kristiansen <freddy.kristiansen@microsoft.com>
When specifying BcAuthContext and Environment to Run-AlPipeline,
Run-AlPipeline would always create a filesonly container, disallowing
running on Linux.
This PR fixes this plus some bugs found as a result of this.
- Replace all occurrences of
[System.Runtime.InteropServices.Marshal]::PtrToStringAuto with
[System.Runtime.InteropServices.Marshal]::PtrToStringBSTR as the Auto
function doesn't always do what's expected under Linux (We do not use
the Auto function in AL-Go)
- Ensure correct casing of Newtonsoft.Json.dll for Linux (also not a
problem in AL-Go)
- Always add extensionId (when specified) to Properties section in test
results xml
- Also added two new overrides (PipelineInitialize and PipelineFinalize)
requested by COSMO Consult.
- If environment is specified as a Web Client URL, and BcAuthContext
contains username/password in Run-AlPipeline, then tests will run
against this environment. PublishBcContainerApp and
ImportTestToolkitToBcContainer needs to be overridden for this to work
with full pipeline.
- Add parameter CompilerFolder to Run-TestsInBcContainer and
Import-TestToolkitToBcContainer for running tests using CompilerFolder
bits from the host
- Including caching of appinfos in CompilerFolder cache (to save time
when caching on GitHub Actions)
Running Build AND Test under Linux (using CompilerFolder), using an
online environment as "Service Tier" can be seen here:
https://github.com/BusinessCentralDemos/bingmaps.pte/actions/runs/10313615507
Build and test here takes approx. 3 minutes.
This functionality is needed by COSMO to enable using their Docker Swarm
for running tests in AL-Go.
COSMO is aware that AL-Go moves away from using BcContainerHelper and
will subsequently have to change their integration when this has
happened.
---------
Co-authored-by: freddydk <freddydk@users.noreply.github.com>
Bump version number
Fixes#3525
Dumps free disk space on container exceptions
Increase download timeout on insider or no CDN
Co-authored-by: freddydk <freddydk@users.noreply.github.com>
Session caching didn't really work in the latest preview
+ telemetry in the low level functions can be measured in perf.
Co-authored-by: freddydk <freddydk@users.noreply.github.com>
```
bcartifacts.azureedge.net -> bcartifacts-exdbf9fwegejdqak.b02.azurefd.net
bcinsider.azureedge.net -> bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net
bcpublicpreview.azureedge.net ->bcpublicpreview-f2ajahg0e2cudpgh.b02.azurefd.net
businesscentralapps.azureedge.net -> businesscentralapps-hkdrdkaeangzfydv.b02.azurefd.net
bcprivate.azureedge.net -> bcprivate-fmdwbsb3ekbkc0bt.b02.azurefd.net
```
Also: remove support for SAS Token
PR also contains a fix for building with symbols only .app files -
copying installApps to the packagesFolder as well as publishing to a
container. Reason is that you cannot download symbols from a container
if you publish a symbols only package to the container.
---------
Co-authored-by: freddydk <freddydk@users.noreply.github.com>
Include Microsoft_Business Foundation Test Libraries.app when importing
test libraries (and tests)
Include Microsoft_System Application Test.app and Microsoft_Business
Foundation Tests.app when importing tests
Bug when running Publish-BcContainerApp against a cloud container
($authContext not defined)
Remove the need for a Container when using Replace-DependenciesInAppFile
(containername parameter is now obsolete)
---------
Co-authored-by: freddydk <freddydk@users.noreply.github.com>
Expose Copy-AppFilesToFolder and Get-AppJsonFromAppFile to public
Make Sort-AppFilesByDependencies use Get-AppJsonFromAppFile instead of a
container
Fix bug in NormalizeVersionStr
New function Create-SymbolsFileFromAppFile
---------
Co-authored-by: freddydk <freddydk@users.noreply.github.com>
Compare normalized version numbers when locating nuget packages (ADO
turns 4.4.3.0 into 4.4.3 when getting version numbers and a normal
compare between 4.4.3 and 4.4.3.0 is not equal)
Runtime packages can contain multiple localized versions of the runtime
package.
When installing or downloading nuget packages - grab the country
subfolder (if it exists), else revert to the original version
---------
Co-authored-by: freddydk <freddydk@users.noreply.github.com>
Rename appinfo cache from AppInfo.json to cache_AppInfo.json (in order
for it to be picked up by .gitignore)
Proof of concept functionality for NuGet feeds:
- Add trusted feeds to ContainerHelper settings.
- Search all trusted feeds for packages in Get-BcNuGetPackage
- Some refactoring of NuGet code
- Allow searching for Earliest, Latest, Any or Exact version of NuGet
package
- Support NuGet Versioning schema
---------
Co-authored-by: freddydk <freddydk@users.noreply.github.com>
When using Publish-PerTenantExtensionApps with a set of apps, which
takes a very long time to publish, the AccessToken might expire and lead
to failure. AccessToken is now refreshed when needed.
Issue #3254 vsix no longer includes dotnet framework 4.8 compatible dlls
for version 24
Avoid using CDN when downloading from bcinsider as this frequently
changes and subsequently fails
---------
Co-authored-by: freddydk <freddydk@users.noreply.github.com>
Latest insider artifacts fail building in compilerfolder
`AL-Go action ran: RunPipeline Telemetry Correlation Id:
5f39d8a8-e12d-4443-bbe1-9ffe5b053643
Error: Unexpected error when running action. Error Message: Exception
calling "Create" with "2" argument(s): "Could not load file or assembly
'System.IO.Packaging, Version=4.0.5.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system
cannot find the file specified.", StackTrace: at GetAppInfo,
C:\ProgramData\BcContainerHelper\6.0.1-preview1082\BcContainerHelper\HelperFunctions.ps1:
line 1154 <- at Compile-AppWithBcCompilerFolder,
C:\ProgramData\BcContainerHelper\6.0.1-preview1082\BcContainerHelper\CompilerFolderHandling\Compile-AppWithBcCompilerFolder.ps1:
line 178 `
HttpClient does not relay on global ServicePointManager to determine apply ssl policy
This change is extending the existing class used by WebClient and make it usable by HttpClient aswell
Introduce a new parameter switch on DownloadLowFile method allowing to disable ssl check
related to #3066
HttpClient does not throw same exceptions type as WebClient
Catch HttpRequestException and return message
Catch AuthenticationException (ssl handshake) and return message
related to #3066
for some reason, it appears ssl validation bypass using
System.Net.ServicePointManager does not work with powershell 7
use built-in powershell method Invoke-WebRequest which provide same
capabilities
related to #3066