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: stages:
- test - test
# - release - release
variables: variables:
GIT_SSL_NO_VERIFY: "true" GIT_SSL_NO_VERIFY: "true"
@ -13,9 +13,9 @@ Test:
except: except:
- master - master
#Release: Release:
# stage: release stage: release
# script: script:
# - .\build.ps1 -Tasks 'analyze','test','release' - .\build.ps1 -Tasks 'test','release'
# only: only:
# - master - master

View file

@ -40,5 +40,17 @@ foreach($task in $Tasks){
Write-Output "Running Pester Tests..." Write-Output "Running Pester Tests..."
Run-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
}
} }
} }