I run this command on our build server:
octo.exe create-release --server http://localhost:9000 --apikey SECRET --project FieldCap --enableservicemessages --version 3.5.19.24 --deployto Test --progress --tenant Dev3519 --tenanttag FieldCap/3.5.19 --packageversion 3.5.19.24 --deploymenttimeout 03:00:00 --tenant dev
As you can see I explicitly tell it a tenanttag, a package version and even a specific tenant.
But the result of this action is:
[10:46:46]Creating Octopus Deploy release
[10:46:46]Octopus CLI, version 9.1.3
[10:46:46]
[10:46:47]Detected automation environment: "TeamCity/2022.10.2"
[10:46:47]Space name unspecified, process will run in the default space context
[10:46:47]Handshaking with Octopus Server: http://localhost:9000
[10:46:47]Handshake successful. Octopus version: 2022.4.8423; API version: 3.0.0
[10:46:47]Authenticated as: API (a service account)
[10:46:47]Found tenants: Dev3519 (Tenants-1667), Dev (Tenants-362)
[10:46:47]Found environment: Test (Environments-3)
[10:46:47]This Octopus Server supports channels
[10:46:47]Found project: FieldCap (Projects-545)
[10:46:47]Automatically selecting the best channel for this release...
[10:46:48]Building a release plan for Channel 'Default'...
[10:46:48]Finding deployment process...
[10:46:48]Finding release template...
[10:46:48]Selected the release plan for Channel 'Default' - it is a perfect match
[10:46:48]Using version number provided on command-line: 3.5.19.24
[10:46:48]Release plan for FieldCap 3.5.19.24
[10:46:48]Channel: 'Default' (this is the default channel)
[10:46:48] # Name Version Source Version rules
[10:46:48] --- ------------- ----------- ---------------- -------------------
[10:46:48] 1 Deploy Site 3.5.19.24 User specified Allow any version
[10:46:48]
[10:46:48]Creating release...
[10:46:48]Release 3.5.19.24 created successfully!
[10:46:48]Found environment: Test (Environments-3)
[10:46:48]Found tenants: Dev3519 (Tenants-1667), Dev (Tenants-362)
[10:46:49]Deploying FieldCap "3.5.19.24" to: Test for Dev3519 (Guided Failure: Not Enabled)
[10:46:49]Deploying FieldCap "3.5.19.24" to: Test for Dev (Guided Failure: Not Enabled)
[10:46:49]Only progress of the first task (Deploy) will be shown
[10:46:49]Waiting for 2 deployment(s) to complete....
As you can see, 2 deployments were created! It created it for Dev
as expected, but also for the tenant named Dev3519
.