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?

image

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:
image

And after creating a release:

Regards,
Paul

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?

Thanks,
Ben

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).

Regards,
Paul

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.
e.g.

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

Regards,
Paul

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?

Environments:
Dev
Test
Production

Machines:
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.

Regards,
Paul