Pregunta

I have a task that needs to run in QA and prod, but not dev. The task is to stop a clustered application. The problem is that the dev servers aren’t clustered and the task to stop the cluster fails on these servers. Is there a way to handle this?

¿Fue útil?

Solución

We used to have that issue as well. When the task ran to stop the cluster, it would fail in dev:

The system cannot find the path specified C:\Windows\Sysnative\Cluster.exe /cluster:server resource "Company Name Product" /offline

To get this to work, we can move the cluster commands to variables instead of directly in the task. That way we can have the dev version of stopping the cluster just do a no-op: cmd /exit. The QA version will run the real cluster stop command.

Task:

enter image description here

Dev Server Variable Group:

enter image description here

QA Server Variable Group:

enter image description here

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top