Skip to content

Accepting a PR Admin Version

Michał Poręba edited this page Apr 4, 2018 · 1 revision

Accepting a PR

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/

image

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

image

it will then automatically kick of a release which will publish the module to the gallery

image

If the build fails

image

have a look at the history, if it has failed at the Pester you can click on the tests and see where it failed

image

You can also checkout the development branch locally and run

Invoke-Pester .\tests -ExcludeTag Integration,IntegrationTests -Show Fails

To see where the Pester Failed

image

Resolve the issues and commit changes or revert the PR in GitHub

Clone this wiki locally