Hosted worker, Azure CLI version update?

Both az CLI (2.0.50) and Azure Powershell installed on the hosted worker are old. The PowerShell commandlets are soon EOL and az CLI is not always working against the current Azure APIs.

We would like to continue using the hosted worker but have had several problems setting up a new build pipeline. For example, 2.0.50 az CLI is missing commands that force us to redeploy Azure Application Gateway (really slow) when only a quick reconfig should be needed. Also, batch uploads to Azure Storage with az CLI do not work because the old CLI is referring to preview roles that do not exist anymore.

Is there a way to update the pre-installed az CLI on the hosted workers when a build process starts?

Or would you be willing to provide a new hosted worker with more recent tooling?

Hi @jussi.mattila,

Thanks for reaching out.

Your best bet here is to use execution containers when defining the step. You can read more about that here: https://octopus.com/docs/deployment-process/execution-containers-for-workers

If you want to watch it, here is a video from one of our developers giving a talk on Worker Images: https://www.youtube.com/watch?v=z0jjUV1DWLo

He discusses this point in particular a bit toward the end of the video, I believe.

Please let me know if that answers your question or if we need to dig in a bit more.

Thanks,
Jeremy

Hi @jeremy.miller,

Thanks for your quick reply! I don’t know how we managed to not notice execution containers, but we will try them tomorrow and report back afterwards.

1 Like

Hi @jussi.mattila,

You’re very welcome!

I look forward to hearing your results.

Best,
Jeremy

Execution containers are working great for us. Thank you for pushing us in the correct direction! :slight_smile:

1 Like

Hi @jussi.mattila,

You’re very welcome!

Thanks for letting me know they’re working out for you.

I hope you have a great rest of your week.

Best,
Jeremy

Good information thanks for sharing

1 Like