-
Notifications
You must be signed in to change notification settings - Fork 630
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e24ffd
commit 3b801e7
Showing
3 changed files
with
49 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Param( | ||
[Parameter(ParameterSetName="ALGo")] | ||
[Hashtable]$parameters, | ||
[Parameter(ParameterSetName="Manual")] | ||
[string]$containerName | ||
) | ||
|
||
function Get-NavDefaultCompanyName | ||
{ | ||
return "CRONUS International Ltd." | ||
} | ||
|
||
if ($PSCmdlet.ParameterSetName -eq 'ALGo') { | ||
$containerName = $parameters.ContainerName | ||
} | ||
|
||
# Get the repoversion | ||
Import-Module "$PSScriptRoot\EnlistmentHelperFunctions.psm1" | ||
|
||
$installedApps = Get-BcContainerAppInfo -containerName $parameters.ContainerName -tenantSpecificProperties -sort DependenciesLast | ||
$appsToBeUnPublished = (Get-ConfigValue -ConfigType "BuildConfig" -Key "AppsNotToBePublished") | ||
$installedApps | ForEach-Object { | ||
if ($_.Name -in $appsToBeUnPublished) { | ||
Write-Host "Unpublishing $($_.Name)" | ||
Unpublish-BcContainerApp -containerName $parameters.ContainerName -name $_.Name -unInstall -doNotSaveData -doNotSaveSchema -force | ||
} | ||
} | ||
|
||
try { | ||
$repoVersion = Get-ConfigValue -ConfigType "AL-GO" -Key "RepoVersion" | ||
$DemoDataType = "EXTENDED" | ||
|
||
Write-Host "Initializing company" | ||
Invoke-NavContainerCodeunit -Codeunitid 2 -containerName $containerName -CompanyName (Get-NavDefaultCompanyName) | ||
|
||
Write-Host "Importing configuration package" | ||
Invoke-NavContainerCodeunit -Codeunitid 8620 -containerName $containerName -CompanyName (Get-NavDefaultCompanyName) -MethodName "ImportAndApplyRapidStartPackage" -Argument "C:\ConfigurationPackages\NAV$($repoVersion).W1.ENU.$($DemoDataType).rapidstart" | ||
} catch { | ||
Write-Host "Error while importing configuration package" | ||
Write-Host $_.Exception.Message | ||
Write-Host $_.Exception.StackTrace | ||
exit 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
Build/projects/1st Party Apps Tests (W1)/.AL-Go/ImportTestDataInBcContainer.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Param( | ||
[Hashtable]$parameters | ||
) | ||
|
||
$script = Join-Path $PSScriptRoot "../../../scripts/ImportTestDataInBcContainer.ps1" -Resolve | ||
. $script -parameters $parameters |