OctopusSkipPackage based on environment

Currently when i push a build to an environment where a package is not deployed to a machine - an error is thrown.

I would want to change this behavior by setting an OctopusSkipPackage in the variables tab tied to an environment.

example in my staging environments I

  • don’t deploy the nservicebus distributor - only for uat and production.
  • only install 1 processor service that handles all message types - in uat and production the message types are segmented.

currently to accomplish this I’m having to create a separate project to handle the differences in steps.

the UI makes this possible already since your deploy screen has skip steps. (attached image) works correctly. Fails if i do not skip the step and for the deploy-to environment does not have a machine configured.

Unfortunately Octo.exe doesn’t support these skip steps (no --skipFile= with list of packages to exclude)

so either updating Octo.exe with a --skipFile or creating an OctopusSkipPackage in the variables tab would accomplish the same thing.

skip-in-ui.jpg

Hi Leblanc,

Fails if i do not skip the step and for the deploy-to environment does not have a machine configured

Hmm, it should only log a note to say that no steps are configured, but it shouldn’t fail or throw any errors. What error are you seeing?

The OctopusSkipPackages idea sounds useful (especially because it would be persistent) - I’ve turned it into a Trello:

https://trello.com/card/define-a-variable-to-skip-steps/4e907de70880ba000079b75c/178

Paul