Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Neil
@ITGuyOU
Could you fix the "EmailAddress" property in OutputOctopusUser.cs that is misspelled "EmailAdress"?
Rob
@ephos
@Dalmirog The project has been quiet for awhile, I wasn't sure if you were able to review my PR #316 yet? We (and I am assuming others) are having to clone and recompile the module internally for updated versions of Octopus Deploy Server which requires the newer Octopus.Client library. This isn't ideal as our preference would be to pull it from the PS Gallery. Is there anything I can do to help?
Stephen Shamakian
@StephenShamakian
@Dalmirog Any update to this? We upgraded our Octopus Server and were forced to upgrade OctoPosh to get Latest Deployments working again but now we can't clone projects anymore.
Stephen Shamakian
@StephenShamakian
@Dalmirog Also when performing a "Get-OctopusProject" to get all projects I keep getting this error "Sequence contains no elements"
KSchiss
@KSchiss
Hi all - I was recently observing a colleague adding environments to a Lifecycle phase - he has a lot of envs to add, and I was wondering if Octoposh would be able to do this for us, instead of adding them all in via the GUI? Thanks.
mkvideodj
@mkvideodj
Hello - can anyone advise me on how to use the OctoPosh Update-OctopusVariableSet function? I've imported the OctoPosh module and this function isn't listed. I'm trying to import the JSON export of a variable set from another Octopus instance. Thanks in advance
Rob
@ephos
@StephenShamakian I have a pending PR waiting review which updates the Octopus.Client dependency. At this point you can grab that code and compile it and it should work (far from ideal, I know). We're maintaining it this way internally since we use this module extensively in our CICD pipelines. I am wondering if this project is dead as there hasn't been any activity and none of the pending PR's are being reviewed and merged. I think soon we should look at possibly forking it and maintaining an updated version. I am not a C# developer primarily but given how useful this module is I would be willing to give it a try. Any input from @Dalmirog would be great though!
rickjuryxero
@rickjuryxero

getting Sequence contains no elements error. I have been trying to use octoposh after a long break doing other things. I installed latest module but have errors on both windows and pwsh that are same with some commandlet vs 2018.4.1 version such as get-octopusenvironment (Get-OctopusProject | select -First 2).Count
Get-OctopusProject : Sequence contains no elements
At line:1 char:2

  • (Get-OctopusProject | select -First 2).Count
  • ~~~~~~
    • CategoryInfo : NotSpecified: (:) [Get-OctopusProject], InvalidOperationException
    • FullyQualifiedErrorId : System.InvalidOperationException,Octoposh.Cmdlets.GetOctopusProject

(Get-OctopusMachine | select -First 2).Count
2

(Get-OctopusEnvironment | select -First 2).Count
Get-OctopusEnvironment : Sequence contains no elements
At line:1 char:2

  • (Get-OctopusEnvironment | select -First 2).Count
  • ~~~~~~
    • CategoryInfo : NotSpecified: (:) [Get-OctopusEnvironment], InvalidOperationException
    • FullyQualifiedErrorId : System.InvalidOperationException,Octoposh.Cmdlets.GetOctopusEnvironment

(Get-OctopusUser | select -First 2).Count
2

CialUnity
@CialUnity
hi
i am getting this error:

$VariableSets = Get-OctopusVariableSet -LibrarySetName * -IncludeUsage

OctopusUrl OctopusApiKey


http://octopus.xxx.io API-Dxxxxxxxxxxxxxxxxxxx
Get-OctopusVariableSet : Unable to process response from server: Error converting value "AmazonWebServicesAccount" to type 'Octopus.Client.Model.VariableType'. Path 'Variables[0].Type', line 22, position
40.. Response content: {
"Id": "variableset-LibraryVariableSets-522",
"OwnerId": "LibraryVariableSets-522",
"Versi
At line:6 char:17

  • ... VariableSets = Get-OctopusVariableSet -LibrarySetName * -IncludeUsage
  • ~~~~~~~~~~~~~~
    • CategoryInfo : NotSpecified: (:) [Get-OctopusVariableSet], OctopusDeserializationException
    • FullyQualifiedErrorId : Octopus.Client.Exceptions.OctopusDeserializationException,Octoposh.Cmdlets.GetOctopusVariableSet

PS C:\WINDOWS\system32>

any ideas?
CialUnity
@CialUnity
should i make an issue on github, no one seems to be here
Rick
@Rickenbacher
Hi,
I am trying to use Octoposh to get the latest release of my project with the powershell command and I only see empty lines returned on the call from my powershell script.
Set-OctopusConnectionInfo -Server "http://x.x.x.x/octopus" -ApiKey "API-...."
Get-OctopusRelease -ProjectName "ProjectName" -Latest 1
(returns an empty line of output...)
Is this a known issue?
KSchiss
@KSchiss
Hi all - I know that we can use Octoposh to add new environments - can we also add the newly-created Environment to an existing Lifecycle?" thanks in advance for any input!
Larry A
@larryinpdx

Hi all, I'm running into a similar issue as @danielgovier and wondering if anyone else has a workaround?
Get-OctopusDeployment -Environment "Production" returns
Get-OctopusDeployment : Nullable object must have a value.
At line:1 char:1

+ Get-OctopusDeployment -Environment "Production"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-OctopusDeployment], InvalidOperationException
    + FullyQualifiedErrorId : System.InvalidOperationException,Octoposh.Cmdlets.GetOctopusDeployment

whereas Get-OctopusDeployment -Environment "QA" works fine, and if I specify specific project(s) in "Production", Get-OctopusDeployment works fine...Any ideas?

xiaohundan88
@xiaohundan88

I'm having issue removing Library Variable Set. I'm getting below message:

PS C:\projects\Scripts\Octo> $myLVS = Get-OctopusVariableSet -LibrarySetName 'SngTestLibVarSetB'

PS C:\projects\Scripts\Octo> Remove-OctopusResource -Resource $myLVS.Resource
Dunno what to delete

PS C:\projects\Scripts\Octo> $myLVS

ProjectName            : 
LibraryVariableSetName : SngTestLibVarSetB
ID                     : variableset-LibraryVariableSets-9
Variables              : {}
Usage                  : {}
LastModifiedOn         : 1/01/0001 12:00:00 AM
LastModifiedBy         : 
Resource               : Octopus.Client.Model.VariableSetResource

PS C:\projects\Scripts\Octo> Get-OctopusVariableSet -LibrarySetName 'SngTestLibVarSetB' | Remove-OctopusResource
Dunno what to delete

Reading [https://github.com/Dalmirog/OctoPosh/blob/master/Octoposh/Cmdlets/RemoveOctopusResource.cs], it seems that Remove-OctopusResource supports

 case "Octopus.Client.Model.LibraryVariableSetResource":
                            var libraryVariableSet = (LibraryVariableSetResource)r;
                            _connection.Repository.LibraryVariableSets.Delete(libraryVariableSet);
                            WriteObject(true,true);
                            break;

Where $myLVS.Resource is type Octopus.Client.Model.VariableSetResource

PS C:\projects\Scripts\Octo> $myLVS


ProjectName            : 
LibraryVariableSetName : SngTestLibVarSetB
ID                     : variableset-LibraryVariableSets-9
Variables              : {}
Usage                  : {}
LastModifiedOn         : 1/01/0001 12:00:00 AM
LastModifiedBy         : 
Resource               : Octopus.Client.Model.VariableSetResource
pmcevoy
@pmcevoy
Hi there.. I'm trying to use Octoposh inside an AWS lambda and ran into an issue: the .psd1 for the module says that the RootModule is OctoPosh.dll - however I think that AWS lambda is running on a linux host that has case sensitive filesystem. Locally I updated the module to use Octoposh.dll and got further along...
(v 0.6.11)
Nick Moore
@holynakamoto
```
octopus-cmdlets> Find-Module -Name Octoposh
WARNING: Unable to resolve package source 'https://www.powershellgallery.com/api/v2'.
PackageManagement\Find-Package : No match was found for the specified search criteria and module name 'Octoposh'. Try Get-PSRepository to see all available registered module repositories.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1397 char:3
+         PackageManagement\Find-Package @PSBoundParameters | Microsoft ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power...ets.FindPackage:FindPackage) [Find-Package], Exception
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.FindPackage

octopus-cmdlets> Get-PSRepository

Name                      InstallationPolicy   SourceLocation
----                      ------------------   --------------
PSGallery                 Untrusted            https://www.powershellgallery.com/api/v2


octopus-cmdlets>
telnin
@telnin

Using Octoposh 0.6.11
Want to add a variable to a list of projects:

$variableset = Get-OctopusVariableSet -Projectname $projectName -ResourceOnly
$newvariable = New-Object Octopus.Client.Model.VariableResource
$scope = New-Object Octopus.Platform.Model.ScopeSpecification

New-Object : Cannot find type [Octopus.Platform.Model.ScopeSpecification]: verify that the assembly containing this
type is loaded.

$newvariable.Name = "newVariable"
$newvariable.Value = "Value"
$newvariable.IsEditable = $true
$newvariable.IsSensitive = $false
$newvariable.Prompt = $null # make this = to $null if you dont want a prompt for this variable
$newvariable.Scope = $null
$variableset.Variables.Add($newvariable)
Update-OctopusResource -Resource $variableset -Force

Looks like I need to load some other Octopus Dlls?
Justin Newman
@justin-newman

Using Octoposh 0.6.11
Hi, I'm having an issue when getting the variables for a certain project. The only thing that seems to be different about this project is that there is a runbook attached to it.

Get-OctopusVariableSet : Unable to process response from server: Could not convert string 'ProcessOwner' to
dictionary key type 'Octopus.Client.Model.ScopeField'. Create a TypeConverter to convert from the string to the key type object. Path 'Variables[24].Scope.ProcessOwner', line 360, position 23.. Response content: {
"Id": "variableset-Projects-10",
"OwnerId": "Projects-10",
"Version": 39,
"Variables": [

Michael Wray
@dethmourne

Hi all - I'm trying to wipe out all the projects on my dev box, but when I use the provided examples for deleting all projects in a project group it fails - any suggestions?

Get-OctopusProjectGroup -name "MyProjectGroup" gives me an object with the projects in it, so I know I'm reading the projects correctly, but piping that to Get-OctopusProject gives "Parameter set cannot be resolved using the specified named parameters." and trying to expand the projects like Remove-OctopusResource suggests gives an error about it being type string

Aha, found a solution - for anybody else who ends up here use: Get-OctopusProject -ProjectGroupName "MyProjectGroup" | Remove-OctopusResource