Acquire package even if step isn't going to run


I have a problem with package acquisition step running even if deploy package step isn’t going to run.
Process(2 steps):

  1. Check on tentacle if package need to be installed. (Set octopus variable in powershell script)
  2. Deploy package and execute install script

The second step is checking if the variable set in the first step is true before running. I’m using the “only run when variable expression is true” run condition in the second step.

My problem comes from the “Acquire Package” step wich is run between the first and the second step. This step acquire the package needed for the second step without checking if this step is going to be runned.

The main goal of that is to reduce the network load of unnecessary package download.

Thanks for any help you can provide and feel free to ask questions!

Hugues C.

Hi Hugues,

Thanks for getting in touch! I’m sorry you’re hitting this roadblock. Unfortunately this workaround you’ve tried won’t work, as the run condition for a step is evaluated during the execution of that step, whereas the package acquisition step is separate and is inserted immediately before the first package step. The run condition hasn’t yet had a chance to evaluate, and is only evaluated just before the step is run due to the possibility that output variables are used in the run condition.

If your package step is configured to run only for specific environments, any deployments to other environments will prevent the acquisition from occurring. However, I don’t believe this should impact your network load, as when you first deploy this package it’s acquired to the package cache. If it already exists there due to a previous deployment, it simply pulls from the cache.

Enable the setting Skip any package step that is already installed in your project which will prevent the package from being installed on any machine where the same version of the package has already been installed. This won’t affect package acquisition, however, but it may be something to consider.

Let me know what you think, and please correct me if I’ve misinterpreted what you’re after in any way. :slight_smile:

Best regards,


1 Like

Hi Kenny,

Thanks for your fast reply!

That’s what I was thinking. I just wanted to be 100% sure that there isn’t a way to not acquire packages with my run condition. I guess I will just roll with the fact that the package will be in the packages cache.

You’re right, I forgot the setting “Skip any package step that is already installed”. Maybe it could improve my deployment efficiency. I will certainly check it out.

Thanks for your solutions, they will definitely help me!

Have a great day!

Hugues C.

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