Creating releases blind but needing specific package versions

Hi all,

I have three projects that are dependent on each other. The problem is that each project does not know which version of the other projects to use.

My Octopus deployment uses all three packages and currently when I call create-release it simply uses the “latest” from each.

Each Project’s build does not know anything about the other Project’s build so they have different versions.

All packages are pushed to Octopus Package library.

The problem is that each Project only know’s it’s own version. The version to use from other Project’s is unknown.

I want to specify which version of each Project’s package gets delivered to the tentacle from the build of any Project.

Thanks for looking
Carlo

Hi Carlo,
After going over your ticket with a few other developers we are a little confused as to exactly what you are trying to achieve.
You can specify what version of your package is used in each release on the create release page. If you have builds that have sensitive dependencies between packages then we would advise against using automatic release creation (i’m not sure if that’s what is happening in your case) and instead manually create the release based on the packages you want each deployment step to use. You can get the list of available packages, as per the previous ticket you posted, which hopefully clarifies how you might be able to create the releases programatically.
If, given the answer to your previous ticket regarding getting a list of packages, you still need further help with this request, could you please clarify exactly what scenario you are trying to support and what part of it you are having problems with.
I hope we can get you back on track to deploying soon.
Thanks,
Robert

Hi Rob,

Let me clarify my situation with an example

We have three teams in the one project. Each team produces a package and its “version” is for example “1.2.3-b34c-JIRAID-1234-some-desc”.

Team1 and Team2 are working on the same feature while Team3 is not. Team1 is finished with the feature and want to test before merging to master, they know Team3 is not working on the feature so they take their latest package from their master branch. They also need to take Team2’s package from the feature branch.

When octo.exe create-release is call, Octopus by default takes the latest packages. This is fine if everyone is working on the same branch. But Team1 wants Team2’s feature branch package and Team3’s master branch package, not necessarily the latest packages.

One way to solve this is to move all three team’s to work in the same repository, the same build, the same package. But is this “best practises?”

What I am really getting is this normal? Could I be doing this better?

Hi Carlo,
It sounds like you are just asking how to define the packages used in a release via the octo.exe create-release command, is this correct?
If so then as you can see in our documentation you can pass the --package parameter to define what packages are used for the various steps.

So in your case Team1, having just completed PackageA v2.0 wants to test their changes but use the packages used by Team2 and Team3, named PackageB v1.0 and PackageC v1.0 respectively. Lets assume the packages are deployed in StepA, StepB and StepC.
Now, having uploaded PackageA v2.0 to Octopus Deploy, Team1 can now execute

octo create-release --project HelloWorld --package StepA:2.0 --package StepB:1.0 --package StepC:1.0 --server http://....

The release should then use the version 2.0 of PackageA, but the previous version of the other packages.
Does this make sense?
Let me know if this still doesn’t answer your question. We try to ensure our documentation explains best how to use this software so sometimes the answers are already there.
Thanks again,
Rob

Hi Rob,

Would Channels help address this?

Regards
Carlo

Hi Carlo,
You can indeed use channels if you don’t want to have to define the specific packages that are used for your Team1 releases.

Following the examples shown in our channels walkthrough, you can create a channel that would be used by Team1 which includes package rules that limit PackageB and PackageC to 1.0 while still allowing PackageA to use latest builds in 2.x. (Keep in mind that using this approach you will not be able to use automatic release creation due to the complexity in determining which release for which channel should be created automatically). You can then use the octo create-release command and provide the --channel=<Team1Channel> parameter to have it use the newly created channel. It should then determine, based on your defined rules, which packages meet the requirements.

Let me know if you run into any further difficulties.
Cheers,
Rob

Thanks Rob