forked from Sitecore/docker-images
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Build.ps1
35 lines (31 loc) · 1.11 KB
/
Build.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
[CmdletBinding(SupportsShouldProcess = $true)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingPlainTextForPassword", "SitecorePassword")]
param(
[Parameter(Mandatory = $false)]
[ValidateNotNullOrEmpty()]
[string]$InstallSourcePath = (Join-Path $PSScriptRoot "\packages")
,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]$SitecoreUsername
,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]$SitecorePassword
)
$ErrorActionPreference = "STOP"
$ProgressPreference = "SilentlyContinue"
# load module
Import-Module (Join-Path $PSScriptRoot "\modules\SitecoreImageBuilder") -Force
# restore any missing packages
SitecoreImageBuilder\Invoke-PackageRestore `
-Path (Join-Path $PSScriptRoot "\windows") `
-Destination $InstallSourcePath `
-SitecoreUsername $SitecoreUsername `
-SitecorePassword $SitecorePassword `
-WhatIf:$WhatIfPreference
# start the build
SitecoreImageBuilder\Invoke-Build `
-Path (Join-Path $PSScriptRoot "\windows") `
-InstallSourcePath $InstallSourcePath `
-WhatIf:$WhatIfPreference