-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from sanderstad/development
First stable release module
- Loading branch information
Showing
8 changed files
with
156 additions
and
43 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,31 @@ | ||
# See http://www.appveyor.com/docs/appveyor-yml for many more options | ||
version: 0.1.{build} | ||
|
||
cache: | ||
- C:\ProgramData\chocolatey\bin -> appveyor.yml | ||
- C:\ProgramData\chocolatey\lib -> appveyor.yml | ||
- C:\Program Files\WindowsPowerShell\Modules\PSScriptAnalyzer -> appveyor.yml | ||
- C:\Program Files\WindowsPowerShell\Modules\Pester -> appveyor.yml | ||
- C:\Program Files\WindowsPowerShell\Modules\PSFramework -> appveyor.yml | ||
- C:\Program Files\WindowsPowerShell\Modules\dbatools -> appveyor.yml | ||
|
||
shallow_clone: true | ||
|
||
environment: | ||
environment: development | ||
version: 0.1.$(appveyor_build_number) | ||
appveyor_rdp_password: Psd@tabaseclone2018 | ||
|
||
matrix: | ||
fast_finish: true | ||
|
||
build_script: | ||
# grab appveyor lab files and needed requirements for tests in CI | ||
- ps: .\tests\appveyor\preparation.ps1 | ||
|
||
test_script: | ||
# Test with PowerShell and Pester | ||
- ps: .\tests\pester.ps1 | ||
|
||
#on_finish: | ||
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.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
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
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,58 @@ | ||
Add-AppveyorTest -Name "appveyor.prep" -Framework NUnit -FileName "appveyor.prep.ps1" -Outcome Running | ||
$sw = [system.diagnostics.stopwatch]::startNew() | ||
|
||
# Importing constants | ||
$rootPath = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent | ||
. "$rootPath\tests\constants.ps1" | ||
|
||
# Get PSScriptAnalyzer (to check warnings) | ||
Write-Host -Object "appveyor.prep: Install PSScriptAnalyzer" -ForegroundColor DarkGreen | ||
Install-Module -Name PSScriptAnalyzer -Force -SkipPublisherCheck | Out-Null | ||
|
||
# Get Pester (to run tests) | ||
Write-Host -Object "appveyor.prep: Install Pester" -ForegroundColor DarkGreen | ||
choco install pester | Out-Null | ||
|
||
# Get dbatools | ||
Write-Host -Object "appveyor.prep: Install dbatools" -ForegroundColor DarkGreen | ||
Install-Module -Name dbatools -Force | Out-Null | ||
|
||
# Get PSFramework | ||
Write-Host -Object "appveyor.prep: Install PSFramework" -ForegroundColor DarkGreen | ||
Install-Module -Name PSFramework -Force | Out-Null | ||
|
||
# Get Hyper-V-PowerShell | ||
#Write-Host -Object "appveyor.prep: Install Hyper-V-PowerShell" -ForegroundColor DarkGreen | ||
#Install-WindowsFeature -Name Hyper-V-PowerShell | Out-Null | ||
#Install-WindowsFeature RSAT-Hyper-V-Tools -IncludeAllSubFeature | Out-Null | ||
|
||
# Creating config files | ||
Write-Host -Object "appveyor.prep: Creating configurations files" -ForegroundColor DarkGreen | ||
$configPath = "C:\projects\config" | ||
|
||
$null = New-Item -Path "$configPath\hosts.json" -Force:$Force | ||
$null = New-Item -Path "$configPath\images.json" -Force:$Force | ||
$null = New-Item -Path "$configPath\clones.json" -Force:$Force | ||
|
||
# Creating folder | ||
Write-Host -Object "appveyor.prep: Creating image and clone directories" -ForegroundColor DarkGreen | ||
$imageFolder = "C:\projects\images" | ||
$null = New-Item -Path $imageFolder -ItemType Directory -Force:$Force | ||
|
||
$cloneFolder = "C:\projects\clones" | ||
$null = New-Item -Path $cloneFolder -ItemType Directory -Force:$Force | ||
|
||
# Setting configurations | ||
Write-Host -Object "appveyor.prep: Setting configurations" -ForegroundColor DarkGreen | ||
Set-PSFConfig -Module PSDatabaseClone -Name setup.status -Value $true -Validation bool | ||
Set-PSFConfig -Module PSDatabaseClone -Name informationstore.mode -Value 'File' | ||
Set-PSFConfig -Module PSDatabaseClone -Name informationstore.path -Value "$configPath" -Validation string | ||
|
||
# Registering configurations | ||
Write-Host -Object "appveyor.prep: Registering configurations" -ForegroundColor DarkGreen | ||
Get-PSFConfig -FullName psdatabaseclone.setup.status | Register-PSFConfig -Scope SystemDefault | ||
Get-PSFConfig -FullName psdatabaseclone.informationstore.mode | Register-PSFConfig -Scope SystemDefault | ||
Get-PSFConfig -FullName psdatabaseclone.informationstore.path | Register-PSFConfig -Scope SystemDefault | ||
|
||
$sw.Stop() | ||
Update-AppveyorTest -Name "appveyor.prep" -Framework NUnit -FileName "appveyor.prep.ps1" -Outcome Passed -Duration $sw.ElapsedMilliseconds |
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
This file was deleted.
Oops, something went wrong.
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
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,58 @@ | ||
Add-AppveyorTest -Name "appveyor.prep" -Framework NUnit -FileName "appveyor.prep.ps1" -Outcome Running | ||
$sw = [system.diagnostics.stopwatch]::startNew() | ||
|
||
# Importing constants | ||
$rootPath = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent | ||
. "$rootPath\tests\constants.ps1" | ||
|
||
# Get PSScriptAnalyzer (to check warnings) | ||
Write-Host -Object "appveyor.prep: Install PSScriptAnalyzer" -ForegroundColor DarkGreen | ||
Install-Module -Name PSScriptAnalyzer -Force -SkipPublisherCheck | Out-Null | ||
|
||
# Get Pester (to run tests) | ||
Write-Host -Object "appveyor.prep: Install Pester" -ForegroundColor DarkGreen | ||
choco install pester | Out-Null | ||
|
||
# Get dbatools | ||
Write-Host -Object "appveyor.prep: Install dbatools" -ForegroundColor DarkGreen | ||
Install-Module -Name dbatools | Out-Null | ||
|
||
# Get PSFramework | ||
Write-Host -Object "appveyor.prep: Install PSFramework" -ForegroundColor DarkGreen | ||
Install-Module -Name PSFramework | Out-Null | ||
|
||
# Get Hyper-V-PowerShell | ||
#Write-Host -Object "appveyor.prep: Install Hyper-V-PowerShell" -ForegroundColor DarkGreen | ||
#Install-WindowsFeature -Name Hyper-V-PowerShell | Out-Null | ||
#Install-WindowsFeature RSAT-Hyper-V-Tools -IncludeAllSubFeature | Out-Null | ||
|
||
# Creating config files | ||
Write-Host -Object "appveyor.prep: Creating configurations files" -ForegroundColor DarkGreen | ||
$configPath = "C:\projects\config" | ||
|
||
$null = New-Item -Path "$configPath\hosts.json" -Force:$Force | ||
$null = New-Item -Path "$configPath\images.json" -Force:$Force | ||
$null = New-Item -Path "$configPath\clones.json" -Force:$Force | ||
|
||
# Creating folder | ||
Write-Host -Object "appveyor.prep: Creating image and clone directories" -ForegroundColor DarkGreen | ||
$imageFolder = "C:\projects\images" | ||
$null = New-Item -Path $imageFolder -ItemType Directory -Force:$Force | ||
|
||
$cloneFolder = "C:\projects\clones" | ||
$null = New-Item -Path $cloneFolder -ItemType Directory -Force:$Force | ||
|
||
# Setting configurations | ||
Write-Host -Object "appveyor.prep: Setting configurations" -ForegroundColor DarkGreen | ||
Set-PSFConfig -Module PSDatabaseClone -Name setup.status -Value $true -Validation bool | ||
Set-PSFConfig -Module PSDatabaseClone -Name informationstore.mode -Value 'File' | ||
Set-PSFConfig -Module PSDatabaseClone -Name informationstore.path -Value "$configPath" -Validation string | ||
|
||
# Registering configurations | ||
Write-Host -Object "appveyor.prep: Registering configurations" -ForegroundColor DarkGreen | ||
Get-PSFConfig -FullName psdatabaseclone.setup.status | Register-PSFConfig -Scope SystemDefault | ||
Get-PSFConfig -FullName psdatabaseclone.informationstore.mode | Register-PSFConfig -Scope SystemDefault | ||
Get-PSFConfig -FullName psdatabaseclone.informationstore.path | Register-PSFConfig -Scope SystemDefault | ||
|
||
$sw.Stop() | ||
Update-AppveyorTest -Name "appveyor.prep" -Framework NUnit -FileName "appveyor.prep.ps1" -Outcome Passed -Duration $sw.ElapsedMilliseconds |