Execute deployment target in a container

Is it possible to execute a step using a target role on a container? We have a target role setup that points to a Cloud Region which we use to control if a step gets deployed into an environment (Primary Lower or Primary Upper)

We use this target role in our steps like so:

The problem is this doesnt allow us to execute in a container. The option to 'Run on a worker on behalf of each deployment target" doesnt solve our needs either as it forces us to choose a Worker Pool but we rely on the target role to pick the appropriate cloud region (which is connected to the appropriate worker pool).

So the abstract is: Target Role -> Cloud Region (Which environment is passed?) -> Worker Pool.

For clarity sake this is an example of our Cloud Region (Primary Lower) which points to our Worker Pool based on the environment.

Hi Shane,

Thanks for getting in touch!

I can only think of two options for this scenario.

The first would be to configure multiple almost identical steps but with a different worker pool configured in each. And then link the step to a specific environment(s). Then when your deployment runs the step would use the correct worker pool based on which environment it is running in and the other step would be skipped.

The other option would be to use the Runs on a worker from a pool selected via a variable option.
e.g.

I believe this would allow you to have a single step that picks the correct worker pool based on an environment scoped variable.

This second option isn’t one I’ve noticed before, so, it may be something that was added in our latest version (2020.6.0). If it isn’t available in your version then it may be necessary to temporarily configure multiple steps until this version is released and you’re able to upgrade.

Regards,
Paul

Thanks, we are currently on 2019.12.1 preparing for 2020.6 so we will look at your suggestions when the release is available.

1 Like

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