forked from kine/NVRAppDevOps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRead-ALConfiguration.ps1
94 lines (87 loc) · 3.05 KB
/
Read-ALConfiguration.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
function Read-ALConfiguration {
Param(
#Path to the repository
$Path = '.\',
#If set, scripts will work as under VSTS/TFS. If not set, it will work in "interactive" mode
$Build,
#Password which will be used for the container user - when WindowsAuthentication used, it is the domain password of the current user
$Password,
$Username = $env:USERNAME,
[ValidateSet('Windows', 'NavUserPassword')]
$Auth = 'Windows',
$Profile = 'default',
$SettingsFileName = '',
$ExcludePath = '*\Dependencies\*'
)
$SettingsScript = (Join-Path $Path 'Scripts\Settings.ps1')
if (Test-Path $SettingsScript) {
Write-Host "Running $SettingsScript ..."
. (Join-Path $Path 'Scripts\Settings.ps1')
}
$AuthParam = $Auth
Remove-Variable -Name Auth
$UsernameParam = $Username
Remove-Variable -Name Username
$PasswordParam = $Password
Remove-Variable -Name Password
Read-ALJsonConfiguration -Path $Path -SettingsFileName $SettingsFileName -Profile $Profile -ExcludePath $ExcludePath
if ($Auth -eq $null) {
$Auth = $AuthParam
}
if ($Username -eq $null) {
$Username = $UsernameParam
}
if ($Password -eq $null) {
$Password = $PasswordParam
}
if ($IncludeCSide -eq $null) {
$IncludeCSide = $true
}
if ($EnableSymbolLoading -eq $null) {
$EnableSymbolLoading = $true
}
if ($CreateTestWebServices -eq $null) {
$CreateTestWebServices = $true
}
if ($Isolation -eq $null) {
$Isolation = ''
}
if ($TestLibraryOnly -eq $null) {
$TestLibraryOnly = $false
}
$ClientPath = Get-ALDesktopClientPath -ContainerName $ContainerName
$Configuration = Get-ALConfiguration `
-ContainerName $ContainerName `
-ImageName $ImageName `
-LicenseFile $LicenseFile `
-VsixPath $VsixPath `
-Isolation $Isolation `
-PlatformVersion $AppJSON.platform `
-AppVersion $AppJSON.version `
-TestAppVersion $TestAppJSON.version `
-AppName $AppJSON.name `
-TestAppName $TestAppJSON.name `
-AppFile $AppFile `
-TestAppFile $TestAppFile `
-Publisher $AppJSON.publisher `
-TestPublisher $TestAppJSON.publisher `
-RepoPath $RepoPath `
-AppPath $AppPath `
-TestAppPath $TestAppPath `
-Build $Build `
-Password $Password `
-ClientPath $ClientPath `
-AppDownloadScript $AppDownloadScript `
-PathMap $PathMap `
-Auth $Auth `
-Username $Username `
-RAM $RAM `
-optionalParameters $optionalParameters `
-EnableSymbolLoading $EnableSymbolLoading `
-CreateTestWebServices $CreateTestWebServices `
-IncludeCSide $IncludeCSide `
-TestLibraryOnly $TestLibraryOnly `
-CustomScripts $CustomScripts `
-ArtifactUrl $ArtifactUrl
Write-Output $Configuration
}