-
-
Notifications
You must be signed in to change notification settings - Fork 143
Accepting a PR Admin Version
The build process for dbachecks is pretty much automated now.
The overall process is that a merge into the Development branch sets of a build in VSTS. The build
installs the PowerShell modules and versions in the RequiredModules property using
# Get the Module versions
$Modules = Get-ManifestValue -Path .\dbachecks.psd1 -PropertyName RequiredModules
$PesterVersion = $Modules.Where{$_.Get_Item('ModuleName') -eq 'Pester'}[0].Get_Item('ModuleVersion')
$PSFrameworkVersion = $Modules.Where{$_.Get_Item('ModuleName') -eq 'PSFramework'}[0].Get_Item('ModuleVersion')
$dbatoolsVersion = $Modules.Where{$_.Get_Item('ModuleName') -eq 'dbatools'}[0].Get_Item('ModuleVersion')
...............
Install-Module PSFramework -RequiredVersion $PsFrameworkVersion -Scope CurrentUser -Force
and then runs the Integration tests with
Invoke-Pester .\tests -ExcludeTag Integration,IntegrationTests
and publishes the results at
https://sqlcollaborative.visualstudio.com/dbachecks/
If the build passes, either merge another PR running the build again or merge Development into master
The merge into Master runs an automated build in VSTS
this build
- Updates the Module Version and commits the change
- Uses the certificate to sign the code
- Publishes the artifacts
it will then automatically kick of a release which will publish the module to the gallery
If the build fails
have a look at the history, if it has failed at the Pester you can click on the tests and see where it failed
You can also checkout the development branch locally and run
Invoke-Pester .\tests -ExcludeTag Integration,IntegrationTests -Show Fails
To see where the Pester Failed
Resolve the issues and commit changes or revert the PR in GitHub