Skip to content

Octo.exe not parsing --package=StepName:PackageName:Version command correctly #5821

@alexrolleyoctopus

Description

@alexrolleyoctopus

Prerequisites

  • I have verified the problem exists in the latest version
  • I have searched open and closed issues to make sure it isn't already reported
  • I have written a descriptive issue title
  • I have linked the original source of this report
  • I have tagged the issue appropriately (area/*, kind/bug, tag/regression?)

The bug

Octo.exe supports a --package switch which lets you specify an exact package and version by step. Currently when supplying all three options (Step Name, PackageName and Version) it ignores the version supplied and selects latest

What I expected to happen

It should respect all three provided options and select the version sepecified

Steps to reproduce

  1. Create a project in Octopus "OctoReleaseTest"
  2. Create a script step (Import_Common_Scripts) with an attached package (lpf.Octopus.Scripts.AWS in this case)
  3. Run the following:
    c:\OctopusTools>octo create-release --project="OctoCreateRelease" --releaseNumber="0.0.1-b00032" --channel="" --server=http://octopus.local/ --apiKey=API-[API-KEY] --enableServiceMessages --deployTo="test" --progress=False --package=Import_common_scripts:lpf.Octopus.Scripts.Aws:1.0.0
  4. Note that it ignores the package version and chooses "latest"
The package version for some steps was not specified. Going to try and resolve those automatically...
Finding latest package for step: Import_common_scripts
Selected 'lpf.Octopus.Scripts.Aws' version '1.0.1' for 'Import_common_scripts'

Screen capture

Annotation 2019-08-30 130059

## Affected versions

Octopus Server:

Workarounds

Specifying either only two of the three options works correctly (i.e. StepName:Version or PackageName:Version).

For example:
octo create-release --project=“OctoCreateRelease” --releaseNumber=“0.0.1-b00033" --channel=“” --server=http://octopus.local/ --apiKey=API-[API-KEY] --enableServiceMessages --deployTo=“test” --progress=False --package=lpf.Octopus.Scripts.Aws:1.0.0

Produces the correct result:

Annotation 2019-08-30 130514

Links

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature/octo-exekind/bugThis issue represents a verified problem we are committed to solving

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions