Task successfully without right deployment target details

Hi Team,

I am Prabhjot working on Octopus Deploy. I have 2 project groups (group 1 and group 2) inside default space. I have created 2 teams one for group 1 (dev and UAT) and other for group 2(prod) and scoped them for different environments. All the environments have one deployment target.

So when adding process step in group 2 project it is showing all the deployment target roles. So even if I don’t have access to Dev env I can select that target role and when do deployment it is sucessful but will provide info like in the screenshot.

My doubt is, I should not be able to select that Dev env target role because I don’t have access to it. And secondly, it should fail with the info .

Please, clear me if I am going in a wrong direction.

Thanks,
Prabhjot

Hi Prabhjot,

Thanks for getting in touch!

Within Octopus, target roles cannot be tied to a specific environment.

This means that if you have the role dev-app, nothing stops someone from selecting that role within a step. However, if that role has only been assigned to machines within the Dev environment, and they attempt to deploy to the Prod environment, it will fail to find any targets.

The deployment info you’re seeing where the deployment runs without an error (even though it finds no targets) is based on the Deployment Targets Required setting within Project > Deployments > Settings
e.g.

I would consider reviewing your roles and removing the environment-specific parts of them (such as changing dev-app to app) as they may not be necessary. Your targets are already directly assigned to an environment, so it may be redundant to also include that environment within the role.

For example, if I had a project deploying to three environments (Dev, Test, and Prod) with one target in each environment. I would have a single target role hello-world-app that I apply to all three machines.

image

And my project deployment step would have the one role selected and it would determine which target to use based on the environment it is being deployed into.

If you have any deployment steps that you want to only run for certain environments rather than using a different role, you could use the environment condition within the step.

I hope this helps. Let me know if you want any further details on any of this.

Regards,
Paul

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.