Release to internal Nuget test

This commit is contained in:
Stephen Maunder 2017-12-31 20:07:11 +00:00
parent 420c59722b
commit e73e0be549
2 changed files with 19 additions and 7 deletions

View file

@ -1,6 +1,6 @@
stages:
- test
# - release
- release
variables:
GIT_SSL_NO_VERIFY: "true"
@ -13,9 +13,9 @@ Test:
except:
- master
#Release:
# stage: release
# script:
# - .\build.ps1 -Tasks 'analyze','test','release'
# only:
# - master
Release:
stage: release
script:
- .\build.ps1 -Tasks 'test','release'
only:
- master

View file

@ -40,5 +40,17 @@ foreach($task in $Tasks){
Write-Output "Running Pester Tests..."
Run-Tests
}
"release" {
Register-PSRepository -Name InternalPowerShellModules `
-SourceLocation http://192.168.1.155:81/nuget/DIPowerShell `
-PackageManagementProvider NuGet `
-PublishLocation http://192.168.1.155:81/nuget/DIPowerShell `
-InstallationPolicy Trusted
Write-Output "Registerting Module"
Import-Module $env:CI_PROJECT_PATH\SnipeitPS\SnipeitPS.psd1 -ErrorAction Stop
Publish-Module -Name SnipeitPS -Repository InternalPowerShellModules -NuGetApiKey 123456789
}
}
}