I’m trying to deploy services to a Docker swarm by way of a Linux SSH target to a Swarm Manager. I’m trying to use a Docker Registry feed as input at release time to select what image to deploy.
The problem is the Docker registry feed seems to be restricted to the “Run a Docker container” step. That’s not useful in a Swarm and I don’t want to run the app I’m deploying.
Basically I just want to pick the docker image in Octopus from the registry feed at release time, combine that with any environment variables, dynamically generate / alter / pick up the right docker stack / compose file(s), and then execute a docker stack deploy against that stack over a Linux SSH connection to a Swarm manager node.
Is this possible in Octopus and if so how would I go about it? If not what other alternatives might generate similar results?
I suppose I could modify our build to create and push NuGet packages with a file inside corresponding to the registry image details but that’s an unnecessary duplicate feed at that point. Or I could have the build generate the stack file(s) as package artifacts to Octo but then that’s effectively environment specific builds in CI/CD that I’d prefer to avoid.
Or I suppose a dynamic variable could prompt the user for an image label override but they could type in a bad value etc. so that also doesn’t seem ideal.