Skip to content

[BUG] CI/CD error when overwriting NewBcContainer.ps1 to connect the Docker container to an external database in a self-hosted runner setup #1925

@christianbraeunlich

Description

@christianbraeunlich

AL-Go version

7.3

Describe the issue

Hello dear AL-Go Team,
when running the CI/CD workflow, we would like to connect the container to an external database.

Based on previous disscussion (see #1901), I was able to restore the database before creating the container.

Now that I have added the new parameters, the workflow is returning an error message.

$parameters.databaseServer = 'localhost'
$parameters.databaseInstance = ''
$parameters.databaseName = 'MYDATABASE'
$parameters.databaseCredential = $databaseCredential

Error on step "Compiling apps":

Using Version 25.11.0.62
Copying dependencies from C:\my-actions-runner\_work\al-go-publish-app-issue\al-go-publish-app-issue\DE\.buildartifacts\Dependencies to C:\my-actions-runner\_work\al-go-publish-app-issue\al-go-publish-app-issue\DE\.packages
Copying C:\my-actions-runner\_work\al-go-publish-app-issue\al-go-publish-app-issue\DE\.buildartifacts\Dependencies\christianbraeunlich_My Base Application_25.11.0.62.app to C:\my-actions-runner\_work\al-go-publish-app-issue\al-go-publish-app-issue\DE\.packages\christianbraeunlich_My Base Application_25.11.0.62.app

Compiling C:\my-actions-runner\_work\al-go-publish-app-issue\al-go-publish-app-issue\DE\My Custom DE Extension
Copying DLLs from C:\Program Files\Microsoft Dynamics NAV\250\Service to assemblyProbingPath
Removing dotnet Framework Assemblies
Using Symbols Folder: C:\my-actions-runner\_work\al-go-publish-app-issue\al-go-publish-app-issue\DE\.packages
Processing dependency Microsoft_Application_25.0.0.0 (c1335042-3002-4257-bf8a-75c898ccb1b8)
Downloading symbols: Microsoft_Application_25.0.23364.25445.app
Url : http://172.17.155.126:7049/BC/dev/packages?appId=c1335042-3002-4257-bf8a-75c898ccb1b8&versionText=25.0.0.0&tenant=default
Compile-AppInBcContainer Telemetry Correlation Id: ff94b816-a61a-40c0-979f-72d7a8a63f98

Error Message:

Error downloading symbols for Microsoft_Application_25.0.23364.25445.app. Error was: Exception calling "GetResult" with "0" argument(s): "Response status code does not indicate success: 401 (Unauthorized).

Unexpected error when running action. Error Message: Error downloading symbols for Microsoft_Application_25.0.23364.25445.app. Error was: Exception calling "GetResult" with "0" argument(s): "Response status code does not indicate success: 401 (Unauthorized).", StackTrace: at Compile-AppInBcContainer, C:\ProgramData\BcContainerHelper\6.1.7\BcContainerHelper\AppHandling\Compile-AppInNavContainer.ps1: line 485 <- at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.1.7\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1161 <- at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.1.7\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 2232 <- at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.1.7\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1735 <- at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.1.7\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1730 <- at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.1.7\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1281 <- at Run-AlPipeline, C:\ProgramData\BcContainerHelper\6.1.7\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1266 <- at <ScriptBlock>, C:\my-actions-runner\_work\_actions\microsoft\AL-Go-Actions\v7.3\RunPipeline\RunPipeline.ps1: line 475 <- at <ScriptBlock>, C:\my-actions-runner\_work\_temp\f82e2c32-0e59-4e3d-82f1-a352c305d084.ps1: line 3 <- at <ScriptBlock>, C:\my-actions-runner\_work\_actions\microsoft\AL-Go-Actions\v7.3\Invoke-AlGoAction.ps1: line 21 <- at <ScriptBlock>, C:\my-actions-runner\_work\_temp\f82e2c32-0e59-4e3d-82f1-a352c305d084.ps1: line 2 <- at <ScriptBlock>, <No file>: line 1

Thank you in advance!

Expected behavior

The CI/CD workflow can download the symbols even if the container is connected to an external database.

Steps to reproduce

  • Repository: https://github.com/christianbraeunlich/al-go-publish-app-issue
    • please find the NewBcContainer.ps1 in the DE project
  • Host: Windows 11 24H2 (OS Build 26100.6584
  • Docker Engine (v28.0.4)
  • Self-hosted GitHub Runner, running as a Service by the LOCAL ACCOUNT user
  • MS SQL Server 2022 (Developer Edition)
    • install feature Full-text Search
    • new Login User: bc-docker-devops (with permissions to restore the database)
    • allow SQL Server authentication (not only Windows)
    • enable SQL Server Network Protocol TCP/IP and Named Pipes
  • Create a backup of an existing BC (container) database
    • artifactUrl: (Get-BCArtifactUrl -type OnPrem -country de -version '25.0')
    • multitenant: $false
    • save the backup file as: C:\ProgramData\BcContainerHelper\temp\mydatabase

Additional context (logs, screenshots, etc.)

✅ Workflow run without external database connection: https://github.com/christianbraeunlich/al-go-publish-app-issue/actions/runs/17978287474/job/51137700002

❌ Workflow run with external database connection: https://github.com/christianbraeunlich/al-go-publish-app-issue/actions/runs/17978298431/job/51138102627

Metadata

Metadata

Assignees

Labels

Need more infoPlease add more info about how to repro the problembugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions