Closed fvet closed 3 years ago
We have the same situation
Hi, can I see the yaml? Or did you do this in a release pipeline?
Copy of the ALOps samples
AppSourceValidationPipelineMultiStage.yml
name: $(Build.BuildId)
resources:
repositories:
- repository: templates
type: git
name: Templates
ref: 'refs/heads/master'
variables:
- group: PipelineVariables
- group: PipelineSecrets
trigger: none
pool: $(pool_build)
stages:
- template: AppSourceValidationTemplateMultiStage.yml
parameters:
AppName: 'Appsource Test'
appversiontemplate: '1.0.[yyyyWW].*'
skipverification: true #this should be false as AppSourceValidation will fail when the app is not signed!
countries: ['w1'] # ['w1','be']
selectVersions: ['Current'] # ['Current','NextMinor']
alsourcepath: App/app.json
pool: $(pool_build)
sasToken: $(bcinsider-sas-token)
AppSourceValidationTemplateMultiStage.yml
parameters:
AppName: ''
selectVersions: ['Current']
countries: ['w1']
skipverification: false
alsourcepath: ''
appversiontemplate: ''
pool: ''
sasToken: ''
stages:
- ${{ each country in parameters.countries }}:
- ${{ each version in parameters.selectVersions }}:
# Compile your app, taking the AppSourceCop into account.
# It will also take all apps in your repo into account. So make sure you have a decent AppSourceCop.json, that indicates a previous version to check for breaking changes!
# more info on breaking changes: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/appsourcecop-as0003-previousversionnotfound
# Also include affixes in the AppSourceCop.json
- stage: 'build${{ country }}${{ version }}'
displayName: '${{ country }} ${{ version }}'
dependsOn: [] #run indepedently
jobs:
- job: 'build${{ country }}${{ version }}'
displayName: 'Job - Validate ${{ country }} ${{ version }}'
pool:
name: ${{ parameters.pool }}
steps:
- template: CI Pipelines\clone_repositories_appsource.yml@templates
- task: ALOpsAppCompiler@2
displayName: 'Fast compile with AppSourceCop and testing breaking changes - ${{ country }} ${{ version }}'
inputs:
artifacttype: 'Sandbox'
artifactcountry: '${{ country }}'
versionselect: ${{ version }}
publishartifact: false
alcodeanalyzer: AppSourceCop #AppSourceCop
alsourcepath: ${{ parameters.alsourcepath }}
appversiontemplate: ${{ parameters.appversiontemplate }}
sasToken: ${{ parameters.sasToken }}
# Compile is done and succeeded. Only now, we'll set up containers, because we need to be able to see if the apps work against the previous!
- task: ALOpsDockerCreate@1
displayName: 'Creating Docker - ${{ country }} ${{ version }}'
inputs:
artifacttype: Sandbox
artifactcountry: '${{ country }}'
versionselect: ${{ version }}
sasToken: ${{ parameters.sasToken }}
- task: ALOpsDockerStart@1
displayName: 'Starting Docker - ${{ country }} ${{ version }}'
- task: ALOpsDockerWait@1
displayName: 'Waiting for Docker to be started - ${{ country }} ${{ version }}'
inputs:
search_string: 'Ready for connections!'
- task: ALOpsLicenseImport@1
displayName: 'Import License - ${{ country }} ${{ version }}'
inputs:
usedocker: true
license_path: '$(bc.license)' # Don't forget to create this variable. more info: https://www.youtube.com/watch?v=iVLOerdCuwA&t=3078s
- task: ALOpsAppPublish@1
displayName: 'Publish dependent apps - ${{ country }} ${{ version }}'
inputs:
usedocker: true
batch_publish_folder: 'app/.apps' #dependentapps
skip_verification: ${{ parameters.skipverification }}
- task: ALOpsAppPublish@1
displayName: 'Publish previous version of my app - ${{ country }} ${{ version }}'
inputs:
usedocker: true
batch_publish_folder: 'app/.previous'
skip_verification: ${{ parameters.skipverification }}
- task: ALOpsAppPublish@1
displayName: 'Publish new version of app - ${{ country }} ${{ version }}'
inputs:
usedocker: true
artifact_path: '$(ALOPS_COMPILE_ARTIFACT)'
skip_verification: ${{ parameters.skipverification }}
# if all this was successfull, we're good!
- task: ALOpsDockerRemove@1
displayName: 'Remove Docker - ${{ country }} ${{ version }}'
enabled: true
condition: always()
Only changed the checkout part to
CI Pipelines\clone_repositories_appsource.yml@templates
parameters:
- name: country
displayName: Country
type: string
default: W1
steps:
- checkout: git://Navitrans.Base/Navitrans.Core
persistCredentials: true
- checkout: git://Navitrans.Base/Navitrans.Base
persistCredentials: true
- checkout: git://Navitrans.Base/Navitrans.Scanning
persistCredentials: true
- checkout: git://Navitrans.Base/Navitrans.Package
persistCredentials: true
- checkout: git://Navitrans.Base/Navitrans.CrossDock
persistCredentials: true
- checkout: git://Navitrans.Base/Navitrans.DriverAppConnector
persistCredentials: true
- checkout: git://Navitrans.Base/Navitrans.Navitrans_365
persistCredentials: true
The more I look into this, the more I realize that we shouldn't do this with ALOps.
Freddy does changes to different levels of the validation, and the only way to keep up, is to run the BcContainerHelper ALValidation, I'm afraid.
Don't you agree?
We've opted for ALOps in the past to take care of our full CI/CD process, starting from build, including code validation (using all available analyzers), to release and deploy (eventually to AppSource using API / FAME whenever possible).
BCContainerHelper is indeed moving fast as well and got more pipeline support the past months, although we would like to keep using ALOps as the 'facade' that hides the powershell / bccontainerhelper complexity. If ALOps could provide a wrapper to run the 'AppSourceValidation' and use BCContainerHelper validation, fine.
Some things to consider
The wrapper was already on the table .. but the complete rebuild of the validation process - that's where we have doubts.. .
Ok, thanks for the feedback! Very much appreciated!
Hi @fvet,
because we value the opinion of our customers ;-) - we'll add a wrapper for Run-ALValdiation.
We'll foresee a way to do additionalParameters for the ones we don't find important, so in fact all future parameters will also be addressable.
The wrapper exists in the form of a new step:
- task: ALOpsAppValidation@1
displayName: 'ALOps Docker Create'
inputs:
license_path: # Path of the FLF license to import. Must be a fully qualified path or relative to $(System.DefaultWorkingDirectory) or a downloadable Url. $(license_path)
countries: W1 # Comma seperated array of countries to validate. $(countries)
affixes: # Comma seperated array of affixes. $(affixes)
artifact_path: $(System.ArtifactsDirectory)# Path for App Artifact. $(artifact_path)
artifact_filter: *.app # Filter used for locating App file relative to $(path_to_publish). $(artifact_filter)
memory: 8G # Set maximum memory for Container. $(memory)
validateversion: # Full or partial version number. If specified, apps will also be validated against this version. $(validateversion)
validatecurrent: False # Validate against current version of Business Central. $(validatecurrent)
validatenextminor: False # Validate against Next Minor version of Business Central. $(validatenextminor)
validatenextmajor: False # Validate against Next Major version of Business Central. $(validatenextmajor)
sastoken: # SAS Token used to access Storage Account. $(sastoken)
skipverification: False # $(skipverification)
skipupgrade: False # $(skipupgrade)
skipappsourcecop: False # $(skipappsourcecop)
skipconnectiontest: False # $(skipconnectiontest)
includewarnings: False # Include this switch if you want to include Warnings. $(includewarnings)
failonerror: True # Include this switch if you want to fail on the first error instead of returning all errors to the caller. $(failonerror)
@waldo1001 Thanks for the wrapper. I've started experimenting with it, but I think I've found an issue if multiple pipelines are run in parallel. I face the error below and it seems to me that pipeline 1 (for country A) created a container 'bcserver', where pipeline 2 (for country B) completed in the meanwhile and deleted the container 'bcserver'.
I think the container names should be more unique instead of just having bcserver
as name. Maybe add bcserver_country_artifacttype
(bcserver_be_nextmajor) or use the rules that ALOps applies when spinning up new containers.
Initialization took 58 seconds
Ready for connections!
Reading CustomSettings.config from bcserver
Creating Desktop Shortcuts for bcserver
Container bcserver successfully created
Use:
Get-BcContainerEventLog -containerName bcserver to retrieve a snapshot of the event log from the container
Get-BcContainerDebugInfo -containerName bcserver to get debug information about the container
Enter-BcContainer -containerName bcserver to open a PowerShell prompt inside the container
Remove-BcContainer -containerName bcserver to remove the container again
docker logs bcserver to retrieve information about URL's again
Creating container took 233 seconds
_____ _ _____ _____
| __ \ (_) /\ / ____| / ____|
| |__) | _ _ __ _ __ _ _ __ __ _ / \ _ __ _ __| (___ ___ _ _ _ __ ___ ___| | ___ _ __
| _ / | | | '_ \| '_ \| | '_ \ / _` | / /\ \ | '_ \| '_ \\___ \ / _ \| | | | '__/ __/ _ \ | / _ \| '_ \
| | \ \ |_| | | | | | | | | | | | (_| | / ____ \| |_) | |_) |___) | (_) | |_| | | | (__ __/ |____ (_) | |_) |
|_| \_\__,_|_| |_|_| |_|_|_| |_|\__, | /_/ \_\ .__/| .__/_____/ \___/ \__,_|_| \___\___|\_____\___/| .__/
__/ | | | | | | |
|___/ |_| |_| |_|
Unexpected error while validating app. Error is: Error response from daemon: Container 2a91fc64a176f08ff7a2a2dfd1091aada4d57d7d7d4bd4356554dc68f38642b2 is not running
at Invoke-ScriptInBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.5\ContainerHandling\Invoke-ScriptInNavContainer.ps1: line 108
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.5\AppHandling\Sort-AppFilesByDependencies.ps1: line 41
at Sort-AppFilesByDependencies, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.5\AppHandling\Sort-AppFilesByDependencies.ps1: line 36
at Run-AlCops, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.5\AppHandling\Run-AlCops.ps1: line 77
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.5\AppHandling\Run-AlValidation.ps1: line 495
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.5\AppHandling\Run-AlValidation.ps1: line 478
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.5\AppHandling\Run-AlValidation.ps1: line 393
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.5\AppHandling\Run-AlValidation.ps1: line 367
at Run-AlValidation, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.5\AppHandling\Run-AlValidation.ps1: line 365
at <ScriptBlock>, <No file>: line 152
at <ScriptBlock>, <No file>: line 1
at <ScriptBlock>, C:\DockerInstallation\Agent2\_work\_tasks\ALOpsAppValidation_ade79b0a-fd75-46d4-b16c-ba9d8d808092\1.440.2187\29bce95c-c047-4c1b-b869-1ef1068af4e5.ps1: line 2
at <ScriptBlock>, <No file>: line 1
at <ScriptBlock>, <No file>: line 22
at <ScriptBlock>, <No file>: line 18
at <ScriptBlock>, <No file>: line 1
@waldo1001
Posted my pipeline sample on https://github.com/HodorNV/ALOps/issues/338#issuecomment-792601346 and it indeed fails when using multi stages / running in paralel. I've currently disable the dependson[] to run one stage at a time.
2021-03-08T09:01:21.5939582Z ##[section]Starting: Run AppSource Validation
2021-03-08T09:01:21.6033946Z ==============================================================================
2021-03-08T09:01:21.6034331Z Task : ALOps Docker Create
2021-03-08T09:01:21.6034589Z Description : Validate App from Business Central AppSource
2021-03-08T09:01:21.6035019Z Version : 1.440.2187
2021-03-08T09:01:21.6052559Z Author : Hodor
2021-03-08T09:01:21.6053346Z Help : Validate App from Business Central AppSource.
2021-03-08T09:01:21.6053630Z ==============================================================================
2021-03-08T09:01:22.3983094Z *** Validate configuration
2021-03-08T09:01:22.7206135Z *** Task Inputs:
2021-03-08T09:01:22.7250040Z
2021-03-08T09:01:22.7341268Z name value
2021-03-08T09:01:22.7343524Z ---- -----
2021-03-08T09:01:22.7375004Z license_path C:\DockerInstallation\Agent2\_work\40\s\https:\navitransdev.blob.core.windows.net\build\NVT%20ISV...
2021-03-08T09:01:22.7378223Z countries AT
2021-03-08T09:01:22.7383049Z affixes NVT
2021-03-08T09:01:22.7386043Z artifact_path C:\DockerInstallation\Agent2\_work\40\s
2021-03-08T09:01:22.7387864Z artifact_filter *.app
2021-03-08T09:01:22.7389945Z memory 12G
2021-03-08T09:01:22.7392548Z validateversion
2021-03-08T09:01:22.7393860Z validatecurrent True
2021-03-08T09:01:22.7395138Z validatenextminor False
2021-03-08T09:01:22.7396372Z validatenextmajor False
2021-03-08T09:01:22.7414926Z sastoken ?sv=2019-12-12&ss=b&srt=sco&st=2020-09-15T00%3A00%3A00Z&se=2021-04-01T00%3A00%3A00Z&sp=rl&spr=htt...
2021-03-08T09:01:22.7416080Z skipverification False
2021-03-08T09:01:22.7417220Z skipupgrade False
2021-03-08T09:01:22.7418361Z skipappsourcecop False
2021-03-08T09:01:22.7419568Z skipconnectiontest True
2021-03-08T09:01:22.7420696Z includewarnings False
2021-03-08T09:01:22.7421842Z failonerror True
2021-03-08T09:01:22.7422096Z
2021-03-08T09:01:22.7444831Z
2021-03-08T09:01:22.7451669Z
2021-03-08T09:01:22.7606803Z *** For documentation, please visit : https://www.alops.be/documentation
2021-03-08T09:01:22.7610273Z
2021-03-08T09:01:23.3535495Z *** ALOps License:
2021-03-08T09:01:23.3550844Z * Licensed To: Navitrans
2021-03-08T09:01:23.3553256Z
2021-03-08T09:01:24.0069299Z *** Memory Status: 24.73/31.84 (77.67% Free)
2021-03-08T09:01:24.0453584Z *** Importing required PS-Functions
2021-03-08T09:01:24.2043668Z *** Install/Update BCContainerHelper [https://github.com/microsoft/navcontainerhelper]
2021-03-08T09:01:24.2083900Z *** Check BcContainerHelper
2021-03-08T09:01:24.2751636Z *** Load BcContainerHelper
2021-03-08T09:01:25.1737657Z BcContainerHelper version 2.0.5
2021-03-08T09:01:26.2696239Z
2021-03-08T09:01:26.2698170Z ModuleType Version Name ExportedCommands
2021-03-08T09:01:26.2698940Z ---------- ------- ---- ----------------
2021-03-08T09:01:26.2699328Z Script 2.0.5 BcContainerHelper {Add-FontsToBcContainer, Add-GitToAlProjectFolder, Backup-...
2021-03-08T09:01:26.2699535Z
2021-03-08T09:01:26.2699617Z
2021-03-08T09:01:26.2699691Z
2021-03-08T09:01:26.2699768Z
2021-03-08T09:01:26.2706331Z *** Setup Flf File: ***
2021-03-08T09:01:26.2747616Z *** Create TempFile
2021-03-08T09:01:26.2844812Z *** Download file
2021-03-08T09:01:26.6353136Z *** Flf File: C:\WINDOWS\TEMP\tmp2D12.tmp.flf
2021-03-08T09:01:26.6358364Z *** Flf Content:
2021-03-08T09:01:26.6465124Z Microsoft Software License Information
2021-03-08T09:01:26.6465689Z Copyright (C) 2007-2018 Microsoft Corporation. All rights reserved
2021-03-08T09:01:26.6466105Z ****************************************************************************
2021-03-08T09:01:26.6466352Z VOICE Account Number : 5164052
2021-03-08T09:01:26.6466585Z Licensed to : Young & Partners
2021-03-08T09:01:26.6466835Z Spinnerijstraat 97
2021-03-08T09:01:26.6467127Z
2021-03-08T09:01:26.6467394Z
2021-03-08T09:01:26.6467646Z Kortrijk
2021-03-08T09:01:26.6467826Z VWV
2021-03-08T09:01:26.6467993Z 8500
2021-03-08T09:01:26.6468167Z Belgium
2021-03-08T09:01:26.6468300Z
2021-03-08T09:01:26.6468498Z Product Line : Microsoft Dynamics 365 Business Central on premises
2021-03-08T09:01:26.6468746Z Product Edition : Unspecified
2021-03-08T09:01:26.6468969Z Product Version : 17
2021-03-08T09:01:26.6469159Z Country : Belgium
2021-03-08T09:01:26.6469352Z Language : English (US)
2021-03-08T09:01:26.6469590Z Created Date : 1/31/2021 2:25:54 AM (-08:00)
2021-03-08T09:01:26.6469821Z Expires : 5/1/2021
2021-03-08T09:01:26.6470030Z Configuration : NVT ISV BE - BC17
2021-03-08T09:01:26.6470276Z ****************************************************************************
2021-03-08T09:01:26.6470543Z Name Amount
2021-03-08T09:01:26.6470812Z ----------------------------------------------------------------- ----------
2021-03-08T09:01:26.6471081Z All Application Module 1
2021-03-08T09:01:26.6471359Z Country Code: Belgium 1
2021-03-08T09:01:26.6471628Z Demo/Dev Named User 150
2021-03-08T09:01:26.6471906Z Dyn365 Business Central Device 150
2021-03-08T09:01:26.6472183Z Dyn365 Business Central Team Members 300
2021-03-08T09:01:26.6472456Z Partner Demo/Dev Module 1
2021-03-08T09:01:26.6472729Z Product Specialist 1
2021-03-08T09:01:26.6472996Z Solution Developer 1
2021-03-08T09:01:26.6473163Z
2021-03-08T09:01:26.6473350Z ****************************************************************************
2021-03-08T09:01:26.6473504Z
2021-03-08T09:01:26.6473577Z
2021-03-08T09:01:26.6624542Z ##[command]Run-AlValidation
2021-03-08T09:01:26.6642591Z
2021-03-08T09:01:26.6643756Z Name Value
2021-03-08T09:01:26.6644383Z ---- -----
2021-03-08T09:01:26.6644886Z affixes NVT
2021-03-08T09:01:26.6645264Z includeWarnings False
2021-03-08T09:01:26.6645627Z validateNextMajor False
2021-03-08T09:01:26.6646007Z apps {C:\DockerInstallation\Agent2\_work\40\s\Artifacts\Apps\Navitrans_Navitrans 365 Base ...
2021-03-08T09:01:26.6646378Z memoryLimit 12G
2021-03-08T09:01:26.6646754Z sasToken ?sv=2019-12-12&ss=b&srt=sco&st=2020-09-15T00%3A00%3A00Z&se=2021-04-01T00%3A00%3A00Z&s...
2021-03-08T09:01:26.6647120Z countries AT
2021-03-08T09:01:26.6647481Z skipupgrade False
2021-03-08T09:01:26.6647843Z failOnError True
2021-03-08T09:01:26.6648196Z skipappsourcecop False
2021-03-08T09:01:26.6648554Z skipverification False
2021-03-08T09:01:26.6648908Z validateCurrent True
2021-03-08T09:01:26.6649269Z skipconnectiontest True
2021-03-08T09:01:26.6649642Z licenseFile C:\WINDOWS\TEMP\tmp2D12.tmp.flf
2021-03-08T09:01:26.6650014Z validateNextMinor False
2021-03-08T09:01:26.6650214Z
2021-03-08T09:01:26.6650289Z
2021-03-08T09:01:26.6650368Z
2021-03-08T09:01:27.0691482Z _____ _
2021-03-08T09:01:27.0692235Z | __ \ | |
2021-03-08T09:01:27.0692496Z | |__) |_ _ _ __ __ _ _ __ ___ ___| |_ ___ _ __ ___
2021-03-08T09:01:27.0692734Z | ___/ _` | '__/ _` | '_ ` _ \ / _ \ __/ _ \ '__/ __|
2021-03-08T09:01:27.0692989Z | | | (_| | | | (_| | | | | | | __/ |_ __/ | \__ \
2021-03-08T09:01:27.0693235Z |_| \__,_|_| \__,_|_| |_| |_|\___|\__\___|_| |___/
2021-03-08T09:01:27.0695049Z
2021-03-08T09:01:27.0712752Z Container name bcserver
2021-03-08T09:01:27.0720486Z Image name
2021-03-08T09:01:27.0812130Z Credential admin/Lufi7031
2021-03-08T09:01:27.0842190Z License file Specified
2021-03-08T09:01:27.0851986Z MemoryLimit 12G
2021-03-08T09:01:27.0858339Z validateVersion
2021-03-08T09:01:27.0867050Z validateCurrent True
2021-03-08T09:01:27.0876869Z validateNextMinor False
2021-03-08T09:01:27.0885643Z validateNextMajor False
2021-03-08T09:01:27.0894566Z SasToken Specified
2021-03-08T09:01:27.0921061Z countries at
2021-03-08T09:01:27.0930009Z validateCountries at
2021-03-08T09:01:27.0937862Z affixes NVT
2021-03-08T09:01:27.0956142Z supportedCountries
2021-03-08T09:01:27.0962717Z vsixFile
2021-03-08T09:01:27.0966771Z Install Apps
2021-03-08T09:01:27.0971218Z - None
2021-03-08T09:01:27.0975312Z Previous Apps
2021-03-08T09:01:27.0979535Z - None
2021-03-08T09:01:27.0983670Z Apps
2021-03-08T09:01:27.1052379Z - C:\DockerInstallation\Agent2\_work\40\s\Artifacts\Apps\Navitrans_Navitrans 365 Base Application_17.2.0.10218_onprem_17.2_w1.app
2021-03-08T09:01:27.1058769Z - C:\DockerInstallation\Agent2\_work\40\s\Artifacts\Apps\Navitrans_Navitrans 365 Core_17.2.0.10134_onprem_17.2_w1.app
2021-03-08T09:01:27.1063484Z - C:\DockerInstallation\Agent2\_work\40\s\Artifacts\Apps\Navitrans_Navitrans 365 Cross-Dock_17.2.0.10143_onprem_17.2_w1.app
2021-03-08T09:01:27.1068146Z - C:\DockerInstallation\Agent2\_work\40\s\Artifacts\Apps\Navitrans_Navitrans 365 Excel Templates_17.2.0.10014_onprem_17.2_w1.app
2021-03-08T09:01:27.1072496Z - C:\DockerInstallation\Agent2\_work\40\s\Artifacts\Apps\Navitrans_Navitrans 365 Package_17.2.0.10047_onprem_17.2_w1.app
2021-03-08T09:01:27.1076964Z - C:\DockerInstallation\Agent2\_work\40\s\Artifacts\Apps\Navitrans_Navitrans 365 Scanning_17.2.0.9822_onprem_17.2_w1.app
2021-03-08T09:01:27.1081384Z - C:\DockerInstallation\Agent2\_work\40\s\Artifacts\Apps\Navitrans_Navitrans 365_17.2.0.9831_onprem_17.2_w1.app
2021-03-08T09:01:27.1203932Z
2021-03-08T09:01:27.1206732Z _____ _ _ _ _ _
2021-03-08T09:01:27.1207177Z | __ \ | | (_) (_) (_)
2021-03-08T09:01:27.1207591Z | |__) | _| | |_ _ __ __ _ __ _ ___ _ __ ___ _ __ _ ___ _ _ __ ___ __ _ __ _ ___
2021-03-08T09:01:27.1207912Z | ___/ | | | | | | '_ \ / _` | / _` |/ _ \ '_ \ / _ \ '__| |/ __| | | '_ ` _ \ / _` |/ _` |/ _ \
2021-03-08T09:01:27.1208236Z | | | |_| | | | | | | | (_| | | (_| | __/ | | | __/ | | | (__ | | | | | | | (_| | (_| | __/
2021-03-08T09:01:27.1208570Z |_| \__,_|_|_|_|_| |_|\__, | \__, |\___|_| |_|\___|_| |_|\___| |_|_| |_| |_|\__,_|\__, |\___|
2021-03-08T09:01:27.1208888Z __/ | __/ | __/ |
2021-03-08T09:01:27.1209210Z |___/ |___/ |___/
2021-03-08T09:01:27.1209387Z
2021-03-08T09:01:27.1214162Z Pulling mcr.microsoft.com/businesscentral:10.0.17763.1282
2021-03-08T09:01:27.4367310Z
2021-03-08T09:01:27.4371344Z Pulling generic image took 0 seconds
2021-03-08T09:01:27.4598406Z _____ _ _ _ _ __ _
2021-03-08T09:01:27.4598929Z | __ \ | | (_) | | (_)/ _| | |
2021-03-08T09:01:27.4599317Z | | | | ___| |_ ___ _ __ _ __ ___ _ _ __ ___ __ _ _ __| |_ _| |_ __ _ ___| |_ ___
2021-03-08T09:01:27.4600680Z | | | |/ _ \ __/ _ \ '__| '_ ` _ \| | '_ \ / _ \ / _` | '__| __| | _/ _` |/ __| __/ __|
2021-03-08T09:01:27.4601106Z | |__| | __/ |_ __/ | | | | | | | | | | | __/ | (_| | | | |_| | || (_| | (__| |_\__ \
2021-03-08T09:01:27.4601426Z |_____/ \___|\__\___|_| |_| |_| |_|_|_| |_|\___| \__,_|_| \__|_|_| \__,_|\___|\__|___/
2021-03-08T09:01:27.4601880Z
2021-03-08T09:01:45.1552663Z Found https://bcartifacts.azureedge.net/sandbox/17.5.22499.22680/at
2021-03-08T09:01:45.2346800Z Using https://bcartifacts.azureedge.net/sandbox/17.5.22499.22680/at
2021-03-08T09:01:45.2429010Z
2021-03-08T09:01:45.2431714Z _____ _ _ _ _
2021-03-08T09:01:45.2432136Z / ____| | | (_) | | (_)
2021-03-08T09:01:45.2432487Z | | _ __ ___ __ _| |_ _ _ __ __ _ ___ ___ _ __ | |_ __ _ _ _ __ ___ _ __
2021-03-08T09:01:45.2432957Z | | | '__/ _ \/ _` | __| | '_ \ / _` | / __/ _ \| '_ \| __/ _` | | '_ \ / _ \ '__|
2021-03-08T09:01:45.2433391Z | |____| | | __/ (_| | |_| | | | | (_| | | (__ (_) | | | | |_ (_| | | | | | __/ |
2021-03-08T09:01:45.2433672Z \_____|_| \___|\__,_|\__|_|_| |_|\__, | \___\___/|_| |_|\__\__,_|_|_| |_|\___|_|
2021-03-08T09:01:45.2433898Z __/ |
2021-03-08T09:01:45.2434397Z |___/
2021-03-08T09:01:45.2434569Z
2021-03-08T09:01:45.2504665Z Creating container for country at
2021-03-08T09:01:45.5427352Z BcContainerHelper is version 2.0.5
2021-03-08T09:01:45.5433710Z BcContainerHelper is running as administrator
2021-03-08T09:01:45.5449172Z Host is Microsoft Windows Server 2019 Standard - ltsc2019
2021-03-08T09:01:45.6612599Z Docker Client Version is 19.03.2
2021-03-08T09:01:45.6633495Z Docker Server Version is 19.03.2
2021-03-08T09:01:45.9414190Z Downloading application artifact /sandbox/17.5.22499.22680/at
2021-03-08T09:01:45.9543422Z Downloading C:\WINDOWS\TEMP\b436f3ca-ebd5-4a5e-8e1c-c5345f745af9.zip
2021-03-08T09:02:13.1526647Z Unpacking application artifact to tmp folder using Expand-Archive
2021-03-08T09:02:21.2457024Z Fetching all docker images
2021-03-08T09:02:21.5857902Z Using image mcr.microsoft.com/businesscentral:10.0.17763.1282
2021-03-08T09:02:21.7312118Z Creating Container bcserver
2021-03-08T09:02:21.7319799Z Version: 17.5.22499.22680-AT
2021-03-08T09:02:21.7324504Z Style: sandbox
2021-03-08T09:02:21.7329332Z Multitenant: No
2021-03-08T09:02:21.7336367Z Platform: 17.0.22463.22540
2021-03-08T09:02:21.7342764Z Generic Tag: 1.0.1.4
2021-03-08T09:02:21.7364962Z Container OS Version: 10.0.17763.1282 (ltsc2019)
2021-03-08T09:02:21.7369895Z Host OS Version: 10.0.17763.1282 (ltsc2019)
2021-03-08T09:02:21.7384517Z Using process isolation
2021-03-08T09:02:21.7400135Z Using locale de-AT
2021-03-08T09:02:21.7411094Z Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
2021-03-08T09:02:21.7505734Z Using license file C:\WINDOWS\TEMP\tmp2D12.tmp.flf
2021-03-08T09:02:21.7926274Z Additional Parameters:
2021-03-08T09:02:21.7988536Z --env customNavSettings=EnableTaskScheduler=True
2021-03-08T09:02:21.7997762Z Files in C:\ProgramData\BcContainerHelper\Extensions\bcserver\my:
2021-03-08T09:02:21.8036390Z - AdditionalOutput.ps1
2021-03-08T09:02:21.8042306Z - license.flf
2021-03-08T09:02:21.8048386Z - MainLoop.ps1
2021-03-08T09:02:21.8055796Z - SetupVariables.ps1
2021-03-08T09:02:21.8063148Z - updatehosts.ps1
2021-03-08T09:02:21.8070455Z Creating container bcserver from image mcr.microsoft.com/businesscentral:10.0.17763.1282
2021-03-08T09:02:21.9771601Z Unexpected error while validating app. Error is: docker.exe: Error response from daemon: Conflict. The container name "/bcserver" is already in use by container "3d404bc7275245d4277f09d030c6654b91d508e8ba569c21fa152f9cb7f4d407". You have to remove (or rename) that container to be able to reuse that name.
2021-03-08T09:02:21.9772230Z See 'docker.exe run --help'.
2021-03-08T09:02:21.9772900Z ExitCode: 125
2021-03-08T09:02:21.9775926Z Commandline: docker run --volume "c:\bcartifacts.cache:c:\dl" --label nav= --env isBcSandbox=Y --label version=17.5.22499.22680 --label platform=17.0.22463.22540 --label country=AT --env artifactUrl=https://bcartifacts.azureedge.net/sandbox/17.5.22499.22680/at --env licenseFile="c:\run\my\license.flf" --name bcserver --hostname bcserver --env auth=NavUserPassword --env username="admin" --env ExitOnError=N --env locale=de-AT --env databaseServer="" --env databaseInstance="" --volume "C:\ProgramData\BcContainerHelper:C:\ProgramData\BcContainerHelper" --volume "C:\ProgramData\BcContainerHelper\Extensions\bcserver\my:C:\Run\my" --isolation process --restart unless-stopped --env filesOnly=False --memory 12G --env enableApiServices=Y --env useSSL=N --volume "c:\windows\system32\drivers\etc:C:\driversetc" --env securePassword=76492d1116743f0423413b16050a5345MgB8AEMAdwB4AC8ASABFAG4ATQBwAEkAVwArAGYAWABFAFAAMABuAEIAdAB1AGcAPQA9AHwAYwA1AGMAZAA3ADYAOAA2ADgAYwBhADcAMAAxAGQANQA5AGMANwBhAGMAOQAxADMAMwA3ADAANgBjADIAZgAzAGUAMwAxAGEAMwBiADUAZABhADUAOQBhAGQANAAwAGEANABmADgAOQA2AGIAMwBiADYANgA2ADMAZgBjADEAYQA= --env passwordKeyFile="c:\run\my\aes.key" --env removePasswordKeyFile=Y --env customNavSettings=EnableTaskScheduler=True --env accept_eula=Y --env accept_outdated=Y --detach mcr.microsoft.com/businesscentral:10.0.17763.1282
2021-03-08T09:02:21.9790587Z at DockerDo, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.5\HelperFunctions.ps1: line 139
2021-03-08T09:02:21.9791132Z at New-BcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.5\ContainerHandling\New-NavContainer.ps1: line 1613
2021-03-08T09:02:21.9791622Z at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.5\AppHandling\Run-AlValidation.ps1: line 282
2021-03-08T09:02:21.9792082Z at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.5\AppHandling\Run-AlValidation.ps1: line 432
2021-03-08T09:02:21.9792550Z at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.5\AppHandling\Run-AlValidation.ps1: line 409
2021-03-08T09:02:21.9793029Z at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.5\AppHandling\Run-AlValidation.ps1: line 393
2021-03-08T09:02:21.9793483Z at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.5\AppHandling\Run-AlValidation.ps1: line 367
2021-03-08T09:02:21.9793943Z at Run-AlValidation, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.5\AppHandling\Run-AlValidation.ps1: line 365
2021-03-08T09:02:21.9794284Z at <ScriptBlock>, <No file>: line 152
2021-03-08T09:02:21.9794487Z at <ScriptBlock>, <No file>: line 1
2021-03-08T09:02:21.9794895Z at <ScriptBlock>, C:\DockerInstallation\Agent2\_work\_tasks\ALOpsAppValidation_ade79b0a-fd75-46d4-b16c-ba9d8d808092\1.440.2187\29bce95c-c047-4c1b-b869-1ef1068af4e5.ps1: line 2
2021-03-08T09:02:21.9795304Z at <ScriptBlock>, <No file>: line 1
2021-03-08T09:02:21.9795514Z at <ScriptBlock>, <No file>: line 22
2021-03-08T09:02:21.9795726Z at <ScriptBlock>, <No file>: line 18
2021-03-08T09:02:21.9795928Z at <ScriptBlock>, <No file>: line 1
2021-03-08T09:02:21.9798143Z
2021-03-08T09:02:21.9798548Z _____ _ _____ _ _
2021-03-08T09:02:21.9798930Z | __ \ (_) / ____| | | (_)
2021-03-08T09:02:21.9799266Z | |__) |___ _ __ ___ _____ ___ _ __ __ _ | | ___ _ __ | |_ __ _ _ _ __ ___ _ __
2021-03-08T09:02:21.9799581Z | _ // _ \ '_ ` _ \ / _ \ \ / / | '_ \ / _` | | | / _ \| '_ \| __/ _` | | '_ \ / _ \ '__|
2021-03-08T09:02:21.9799907Z | | \ \ __/ | | | | | (_) \ V /| | | | | (_| | | |____ (_) | | | | |_ (_| | | | | | __/ |
2021-03-08T09:02:21.9800232Z |_| \_\___|_| |_| |_|\___/ \_/ |_|_| |_|\__, | \_____\___/|_| |_|\__\__,_|_|_| |_|\___|_|
2021-03-08T09:02:21.9800537Z __/ |
2021-03-08T09:02:21.9800913Z |___/
2021-03-08T09:02:21.9801104Z
2021-03-08T09:02:22.7203464Z Removing container bcserver
2021-03-08T09:02:23.6412554Z Removing bcserver from host hosts file
2021-03-08T09:02:23.6954774Z Removing bcserver-* from host hosts file
2021-03-08T09:02:23.7086127Z Removing C:\ProgramData\BcContainerHelper\Extensions\bcserver
2021-03-08T09:02:23.7333625Z
2021-03-08T09:02:23.7337703Z Removing container took 2 seconds
2021-03-08T09:02:23.7398778Z
2021-03-08T09:02:23.7402383Z AL Validation finished in 56 seconds
2021-03-08T09:02:23.7408754Z __ __ _ _ _ _ _ _____ _ _
2021-03-08T09:02:23.7409272Z \ \ / / | (_) | | | | (_) | __ \ | | |
2021-03-08T09:02:23.7409812Z \ \ / /_ _| |_ __| | __ _| |_ _ ___ _ __ | |__) |___ ___ _ _| | |_ ___
2021-03-08T09:02:23.7410204Z \ \/ / _` | | |/ _` |/ _` | __| |/ _ \| '_ \ | _ // _ \ __| | | | | __/ __|
2021-03-08T09:02:23.7410486Z \ / (_| | | | (_| | (_| | |_| | (_) | | | | | | \ \ __\__ \ |_| | | |_\__ \
2021-03-08T09:02:23.7410760Z \/ \__,_|_|_|\__,_|\__,_|\__|_|\___/|_| |_| |_| \_\___|___/\__,_|_|\__|___/
2021-03-08T09:02:23.7410929Z
2021-03-08T09:02:23.7415878Z Unexpected error while validating app. Error is: docker.exe: Error response from daemon: Conflict. The container name "/bcserver" is already in use by container "3d404bc7275245d4277f09d030c6654b91d508e8ba569c21fa152f9cb7f4d407". You have to remove (or rename) that container to be able to reuse that name.
2021-03-08T09:02:23.7416430Z See 'docker.exe run --help'.
2021-03-08T09:02:23.7416589Z ExitCode: 125
2021-03-08T09:02:23.7418597Z Commandline: docker run --volume "c:\bcartifacts.cache:c:\dl" --label nav= --env isBcSandbox=Y --label version=17.5.22499.22680 --label platform=17.0.22463.22540 --label country=AT --env artifactUrl=https://bcartifacts.azureedge.net/sandbox/17.5.22499.22680/at --env licenseFile="c:\run\my\license.flf" --name bcserver --hostname bcserver --env auth=NavUserPassword --env username="admin" --env ExitOnError=N --env locale=de-AT --env databaseServer="" --env databaseInstance="" --volume "C:\ProgramData\BcContainerHelper:C:\ProgramData\BcContainerHelper" --volume "C:\ProgramData\BcContainerHelper\Extensions\bcserver\my:C:\Run\my" --isolation process --restart unless-stopped --env filesOnly=False --memory 12G --env enableApiServices=Y --env useSSL=N --volume "c:\windows\system32\drivers\etc:C:\driversetc" --env securePassword=76492d1116743f0423413b16050a5345MgB8AEMAdwB4AC8ASABFAG4ATQBwAEkAVwArAGYAWABFAFAAMABuAEIAdAB1AGcAPQA9AHwAYwA1AGMAZAA3ADYAOAA2ADgAYwBhADcAMAAxAGQANQA5AGMANwBhAGMAOQAxADMAMwA3ADAANgBjADIAZgAzAGUAMwAxAGEAMwBiADUAZABhADUAOQBhAGQANAAwAGEANABmADgAOQA2AGIAMwBiADYANgA2ADMAZgBjADEAYQA= --env passwordKeyFile="c:\run\my\aes.key" --env removePasswordKeyFile=Y --env customNavSettings=EnableTaskScheduler=True --env accept_eula=Y --env accept_outdated=Y --detach mcr.microsoft.com/businesscentral:10.0.17763.1282
2021-03-08T09:02:23.7420747Z _____ ___ __ _ _ _ _ _ ______ _ _
2021-03-08T09:02:23.7421106Z | __ \ /\ | \ \ / / | (_) | | | | (_) | ____| (_) |
2021-03-08T09:02:23.7421453Z | |__) | _ _ __ ______ / \ | |\ \ / /_ _| |_ __| | __ _| |_ _ ___ _ __ | |__ __ _ _| |_ _ _ __ ___
2021-03-08T09:02:23.7421799Z | _ / | | | '_ \______/ /\ \ | | \ \/ / _` | | |/ _` |/ _` | __| |/ _ \| '_ \ | __/ _` | | | | | | '__/ _ \
2021-03-08T09:02:23.7422142Z | | \ \ |_| | | | | / ____ \| | \ / (_| | | | (_| | (_| | |_| | (_) | | | | | | | (_| | | | |_| | | | __/
2021-03-08T09:02:23.7422487Z |_| \_\__,_|_| |_| /_/ \_\_| \/ \__,_|_|_|\__,_|\__,_|\__|_|\___/|_| |_| |_| \__,_|_|_|\__,_|_| \___|
2021-03-08T09:02:23.7422684Z
2021-03-08T09:02:23.7446348Z ##[error]Unexpected error while validating app. Error is: docker.exe: Error response from daemon: Conflict. The container name "/bcserver" is already in use by container "3d404bc7275245d4277f09d030c6654b91d508e8ba569c21fa152f9cb7f4d407". You have to remove (or rename) that container to be able to reuse that name.
2021-03-08T09:02:23.7452770Z See 'docker.exe run --help'.
2021-03-08T09:02:23.7452961Z ExitCode: 125
2021-03-08T09:02:23.7454905Z Commandline: docker run --volume "c:\bcartifacts.cache:c:\dl" --label nav= --env isBcSandbox=Y --label version=17.5.22499.22680 --label platform=17.0.22463.22540 --label country=AT --env artifactUrl=https://bcartifacts.azureedge.net/sandbox/17.5.22499.22680/at --env licenseFile="c:\run\my\license.flf" --name bcserver --hostname bcserver --env auth=NavUserPassword --env username="admin" --env ExitOnError=N --env locale=de-AT --env databaseServer="" --env databaseInstance="" --volume "C:\ProgramData\BcContainerHelper:C:\ProgramData\BcContainerHelper" --volume "C:\ProgramData\BcContainerHelper\Extensions\bcserver\my:C:\Run\my" --isolation process --restart unless-stopped --env filesOnly=False --memory 12G --env enableApiServices=Y --env useSSL=N --volume "c:\windows\system32\drivers\etc:C:\driversetc" --env securePassword=76492d1116743f0423413b16050a5345MgB8AEMAdwB4AC8ASABFAG4ATQBwAEkAVwArAGYAWABFAFAAMABuAEIAdAB1AGcAPQA9AHwAYwA1AGMAZAA3ADYAOAA2ADgAYwBhADcAMAAxAGQANQA5AGMANwBhAGMAOQAxADMAMwA3ADAANgBjADIAZgAzAGUAMwAxAGEAMwBiADUAZABhADUAOQBhAGQANAAwAGEANABmADgAOQA2AGIAMwBiADYANgA2ADMAZgBjADEAYQA= --env passwordKeyFile="c:\run\my\aes.key" --env removePasswordKeyFile=Y --env customNavSettings=EnableTaskScheduler=True --env accept_eula=Y --env accept_outdated=Y --detach mcr.microsoft.com/businesscentral:10.0.17763.1282
2021-03-08T09:02:23.7504722Z *** Cleanup VSTS Environment: True
2021-03-08T09:02:26.0326773Z ##[section]Finishing: Run AppSource Validation
@waldo1001 @AdminHodor Have you been able to look into the bcserver
remark?
Any chance on having this fixed in the next release?
Dear @fvet ,
The "bcserver" can be changed with the last release (v1.441).
Kind regards
Tested and approved. Thanks!
Is your feature request related to a problem? Please describe. The AppSourceValidation samples will probably work fine for single repo apps. However, when having multiple apps spread accross multiple repo's and managing your product as a suite of dependend apps (spread accross repos), it would make sense to be able to run the AppSourceValidation accross repos (similar to how the BatchCompile works).7
Not sure how to achieve this with the current samples (fix reference to the app/app.json, .previous, ...)
In the sample below, I checkedout some of our apps, but the compile step fails (makes sense)
It would need some kind of loop for the fast compile steps, as well for the dependend and previous apps.
PS: If I would have to manage a pipeline per app, it would take a lot of setup and I would be forced to store the .dependendapps separatly, whereas I would like to take them from the fast compile step instead.