Octopus Deploy Channel maven Version Rule failing

(siddharth) #1

Hi Team,

Getting error when using Channel based rule (maven feeds)
Channel Rule -Rule-Version-2 is [1.2,1.3) in the Project GIUI-STATIC-BLOB-SNAPSHOT. It has two process in which GIUIStatic-Azure-Blob-CIT is restricted to use Rule-Version-2 channel rule.

My version in using create Release is 1.2.0-giuistatic-SNAPSHOT which I think falls in rule. Why it is failing with below error? Please advise as I’m blocked.
Command used-

/opt/Programs/OctoPack/Octo create-release --project GIUI-STATIC-BLOB-SNAPSHOT --version 1.2.0-giuistatic-SNAPSHOT --package giuistatic:1.2.0-SNAPSHOT --server http://od.landggi.com --apiKey ${OD_KEY} --deployto=CIT --progress --channel=Rule-Version-2

Error below-

Using version number provided on command-line: 1.2.0-giuistatic-SNAPSHOT
Release plan for GIUI-STATIC-BLOB-SNAPSHOT 1.2.0-giuistatic-SNAPSHOT
Channel: 'Rule-Version-2'
  #   Name                        Package Name         Version                      Source             Version rules          
  --- --------------------------- -------------------- ---------------------------- ------------------ -----------------------
  1   GIUIStatic-Azure-Blob       Azure-PoSH-Helpers   1.0.2                        Latest available   Allow any version      
  2   GIUIStatic-Azure-Blob       giuistatic           2.0.28-giuistatic-SNAPSHOT   Latest available   Allow any version      
  3   GIUIStatic-Azure-Blob-CIT   Azure-PoSH-Helpers   1.0.2                        Latest available   Allow any version      
  4   GIUIStatic-Azure-Blob-CIT   giuistatic           ERROR                        Cannot resolve     Range: FAIL Tag: FAIL  

Package versions could not be resolved for one or more of the package packageSteps in this release. See the errors above for details. Either ensure the latest version of the package can be automatically resolved, or set the version to use specifically by using the --package argument.
Exit code: -1
Build step 'Execute shell' marked build as failure
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any

Thanks,
Siddharth

(Daniel Fischer) #5

Hi Siddharth,

Thanks for getting in touch! I may have an idea of what is going on here. You noted your version rules above as [1.2,1.3). However, you are also using a pre-release tag in your package. A package with a pre-release tag is regarded as being an earlier version, so MyPackage.1.2.0-pre-release is technically an earlier version than the [1.2] version rule will recognise.

You will either need to adjust your version rule, or consider not using the pre-release tag in your package version. If the -giuistatic-SNAPSHOT pre-release tag is not relevant to the channel version rule and just a string for identification, you might consider using the metadata tag + on your package instead of -.

For example:

giuistatic.2.0.28+giuistatic-SNAPSHOT

#9 in the SemVer documentation covers per-release tags in your versioning, and #10 below it covers metadata tags.

Does this help?

Let me know if you have any further thoughts or questions on this.

Best regards,

(system) closed #6

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.