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