microsoft / navcontainerhelper

Official Microsoft repository for BcContainerHelper, a PowerShell module, which makes it easier to work with Business Central Containers on Docker.
MIT License
389 stars 248 forks source link

Multiple agents Run-AlPipeline #3603

Open akhileshekartha opened 4 months ago

akhileshekartha commented 4 months ago

Hi I have installed multiple build agents on our build server. Our build process includes multiple stages to generate app files for different versions and countries , builds running based on preprocessors. I am trying to run multiple jobs on the same server using different devops agents. The build script is already updated with usePsSession = $false. All agents are running with different admin user accounts. However, when running multiple pipelines in different stages, I'm encountering issues. Can you help me identify what might be missing ?

Scripts used to create container and cause the issue

Run-AlPipeline  -containerName $ContainerName `
  -imageName $imageName `
  -baseFolder $WorkFolder `
  -credential $credential `
  -CreateRuntimePackages `
  -licenseFile $latest_License `
  -BuildArtifactFolder $WorkFolder\AppFiles `
  -accept_insiderEula `
  -previousApps $Previousapp `
  -installApps $DependedApps `
  -pipeline $ProjectName `
  -enableCodeCop `
  -enableAppSourceCop `
  -AppSourceCopMandatoryAffixes @Affixes `
  -enableUICop `
  -azureDevOps `
  -doNotRunBcptTests `
  -doNotBuildTests `
  -doNotRunTests `
  -appFolders @("Project\Main App") `
  -artifact $bcArtifacts `
  -preProcessorSymbols $preProcessorSymbols `
  -PostCompileApp $addtionalScripts `
  -PreCompileApp $PreCompileApp `
  -CustomCodeCops $CustomCop `
  -vsixFile  $AlLanguageExtensionUrl `
  -AppBuild $buildID

image

image

freddydk commented 4 months ago

This image

looks like somebody is removing the container.

It looks like you are using predictable names for the container - maybe that name is reused in another run pipeline, which deletes your container and then nothing works.