Automatic Tenanted Deployments

I have a deployment project that needs to be able run both tenanted and non tenanted. Dev is untenanted and Test and Prod are tenanted. I’ve created an Tenant to act as my Test Environment target.

So I set the project settings as such to allow for both scenarios.

The lifecycle on this deployment has an optional Dev only Phase and a Test-Prod phase.
The test phase in set to auto deploy when a release is created, however now that the project is set to also allow untenanted deployments, this kicks off a tenanted deployment to my test environment - and a non tenanted deployment simultaneously, every time I create a release.

I don’t want a Dev deployment at this time and this is posing an issue for me because there are tenant variables that are required to run the deployment, and it’s not running on a tenant.
I’m able to get around that issue when I intentionally deploy to Dev untenanted, by using a prompted variable that is scoped to the dev environment.

How do I set the automatic Test deployments to only run as a tenanted deployment and avoid this simultaneous dev deployment that always fails because of no tenant variable value?


Hi @bneuwirth,

Thanks for getting in touch!

Are you able to confirm what version of Octopus Server you are running?

I’ve setup a test of this issue but I don’t believe I am seeing the same results.

My lifecycle:

And after creating a release:


Thanks Paul.
I’m running version 2019.12.8.

If my project is set to both tenanted and non-tenanted deployments and I have a automatic Deployment to the Test environment, it would make sense that it would trigger both a tenanted and non-tenanted deployment to test. The only problem is, that’s not the behavior I want and is causing failures due to variables as I mentioned in my original post.

Would a newer version fix this issue?


Ah, I may have misunderstood. I thought the issue was that when creating releases it was auto-deploying to the optional untenanted Dev environment.

If you have a mix of tenanted and untenanted machines in the Test environment though, then there is no way to configure it to only do tenanted.

The cleanest solution would likely be to split the Test environment machines so that you Test(Untenanted) and Test(Tenanted).


I actually don’t have any Untenanted Test targets/machines, just Dev.

I only have Dev targets for Untenanted deployments.

My lifecycle includes Test for the tenanted deployments and includes Dev for the untenanted deployments.

Is there a way to avoid all untenanted Test deployments entirely?

In that case, it should be working as you want.
If the Test environment only has tenant targets then the auto-deploy should only trigger tenant deployments.

You may need to check that the deployment targets are configured to only be included in tenanted deployments:


The problem is that I need the deployment targets to be Untenanted, but only when deploying to Dev.
Test and Prod are only Tenanted and Dev is untenanted.

Ok, I need a bit more detail on what you’re seeing and how your environment is configured as my tests aren’t replicating what you seem to be experiencing.

Can you review my scenario below and advise if this matches?


Machine-1 - Dev Environment
Machine-2 - Test Environment - Configured to Tenanted deployments only

And when I create a release, it only auto-deploys to the Test environment for the Tenant:

I need to see how this differs from what you’re seeing, if you can provide screenshots of the overview screen, like the one above, this will help too.


Hey Paul,

Sorry for the delay here things got hectic…

Let me try to simplify my question.

I have a tenanted deployment to deploy to each of my clients. When a release is created, my lifecycle automatically deploys to my Test environment. I created a tenant for my test environment and that is my only tenant with a test environment connected to it, so my auto deploy only deploys to this tenant.

I’m now using the same deployment process to deploy to a “dev” version of each client. Because the common variables are different for dev, I can’t do a tenanted deployment, so I set the project to allow for untenanted deployments and I do those dev deployments differently with prompted variables.

My issue is that for each new release that is created, I end up getting 2 automatically triggered deployments on my Test Environement.
One on the “test” tenant and one untenanted. This second one always fails because it’s missing the prompted variables that tell it where to deploy.

How can I have my lifecyle auto deploy to my Test environment - but only do a tenanted deployment so that just my actual “Test” tenant gets deployed to?

When the Test environment auto deploy triggers, what machine is being targeted by the untenanted deployment?
The only way for this to work how you want will be to identify that machine(s) and set it to Tenanted deployments only.

What do you mean by machine?
Actual machine? Or do you mean deployment target?

Yes, the deployment target.

We’re currently using one main deployment target to deploy to all our machines but I just created a new tentacle on the test machine.

Now how do I force my auto deployments to just deploy to that target/tentacle and not do an untenanted deployment?

Thanks so much for your help!

When the auto-deploy initiates, it looks for any eligible deployment targets within the Test environment. It will then check each of those machines to see whether the are tenanted or untenanted and then create a tenanted or untenanted deployment as needed.

So, for this to work as you want, you need to ensure that there are no deployment targets within the Test environment that are set to untenanted.



1 Like