Pipelines/Local-Pipeline.ps1
Param( [Parameter(Mandatory=$false)] [string] $version = "local", [Parameter(Mandatory=$true)] [string] $settingsFile, [Parameter(Mandatory=$true)] [string] $licenseFile, [string] $newContainerName = "", [string] $login = "admin", [string] $password = "123qweasD" ) $ciFolder = (Get-Item (Join-Path $PSScriptRoot "..")).FullName $baseFolder = (Get-Item (Join-Path $ciFolder "..")).FullName . (Join-Path $PSScriptRoot "Read-Settings.ps1") -environment 'Local' -version $version -settingsFile $settingsFile . (Join-Path $PSScriptRoot "Install-BcContainerHelper.ps1") -bcContainerHelperVersion $bcContainerHelperVersion -genericImageName $genericImageName # SO >> if ($restoreDbFromBackupUrl -ne "") { $NewBcContainer = { Param([Hashtable]$parameters) $parameters += @{ "bakFile" = $restoreDbFromBackupUrl } New-BcContainer @parameters; Invoke-ScriptInBcContainer $parameters.ContainerName -scriptblock { $progressPreference = 'SilentlyContinue' } } } # SO << if ($newContainerName -ne "") { $containerName = $newContainerName } $securePassword = ConvertTo-SecureString -String $password -AsPlainText -Force $credential = New-Object pscredential $login, $securePassword $allTestResults = "testresults*.xml" $testResultsFile = Join-Path $baseFolder "TestResults.xml" $testResultsFiles = Join-Path $baseFolder $allTestResults if (Test-Path $testResultsFiles) { Remove-Item $testResultsFiles -Force } Write-Host -ForegroundColor Yellow @' ====================================== PARAMETERS ========================================= '@ Write-Host -NoNewLine -ForegroundColor Yellow "Container name: "; Write-Host $containerName Write-Host -NoNewLine -ForegroundColor Yellow "Instance name: "; Write-Host "BC" Write-Host -NoNewLine -ForegroundColor Yellow "BC Login: "; Write-Host $login Write-Host -NoNewLine -ForegroundColor Yellow "BC Password: "; Write-Host $password Write-Host -NoNewLine -ForegroundColor Yellow "BC Authentication: "; Write-Host "UserPassword" Write-Host -NoNewLine -ForegroundColor Yellow "BC Artifact URL: "; Write-Host $artifact Write-Host -NoNewLine -ForegroundColor Yellow "License File: "; Write-Host $licenseFile if ($restoreDbFromBackupUrl -ne "") { Write-Host -NoNewLine -ForegroundColor Yellow "Database backup: "; Write-Host $restoreDbFromBackupUrl } Write-Host -ForegroundColor Yellow @' =========================================================================================== '@ Run-AlPipeline ` -pipelineName $pipelineName ` -containerName $containerName ` -imageName $imageName ` -artifact $artifact.replace('{INSIDERSASTOKEN}',$insiderSasToken) ` -memoryLimit $memoryLimit ` -baseFolder $baseFolder ` -licenseFile $licenseFile ` -installApps $installApps ` -appFolders $appFolders ` -testFolders $testFolders ` -testResultsFile $testResultsFile ` -testResultsFormat 'JUnit' ` -installTestRunner:$installTestRunner ` -installTestFramework:$installTestFramework ` -installTestLibraries:$installTestLibraries ` -installPerformanceToolkit:$installPerformanceToolkit ` -credential $credential ` -doNotRunTests ` -useDevEndpoint ` -keepContainer ` -NewBcContainer $NewBcContainer #-updateLaunchJson "Local Sandbox" ` |