Created
January 11, 2017 14:59
-
-
Save Dalmirog-zz/879be7d99bbc657a2dfb0b215f1c5780 to your computer and use it in GitHub Desktop.
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
##CONFIG## | |
$OctoExe = "" #FULL path of the Octo.exe executable (i.e. c:\tools\octo.exe) | |
$OutputFolder = "" #Output folder where all packages are dropped | |
$BuildID = "" #<-- This should be the build ID variable that comes from Jenkins | |
$OctopusServer = "" #Octopus Server base URL | |
$OctopusAPIKey = ""#Octopus API Key | |
##PROCESS## | |
$FilterPattern = "*$BuildID.nupkg" | |
$Package = Get-ChildItem -Path $OutputFolder -Filter $FilterPattern | |
if ($Package -ne $null){ | |
.\Octo.exe push --package $Package.FullName --Server $OctopusServer --apikey $OctopusAPIKey | |
} | |
else{ | |
Write-error "No package was found in [$OutputFolder] with the pattern [$FilterPattern]" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment