stale only if more than zero computes

Change-Id: Ibcbc1cd4382806f49b1af0cffb303584512fc1b1
diff --git a/cloud-deploy-pipeline.groovy b/cloud-deploy-pipeline.groovy
index 623a45d..8e0b9ca 100644
--- a/cloud-deploy-pipeline.groovy
+++ b/cloud-deploy-pipeline.groovy
@@ -218,23 +218,24 @@
                 }
 
                 stage('Scale Kubernetes computes') {
-                    if (STACK_TYPE == 'aws') {
-                        // configure aws
-                        def venv_path = 'aws_venv'
-                        def env_vars = aws.getEnvVars(AWS_API_CREDENTIALS, AWS_STACK_REGION)
+                    if (STACK_COMPUTE_COUNT > 0) {
+                        if (STACK_TYPE == 'aws') {
+                            // configure aws
+                            def venv_path = 'aws_venv'
+                            def env_vars = aws.getEnvVars(AWS_API_CREDENTIALS, AWS_STACK_REGION)
 
-                        // get stack info
-                        def scaling_group = aws.getOutputs(venv_path, env_vars, STACK_NAME, 'ComputesScalingGroup')
+                            // get stack info
+                            def scaling_group = aws.getOutputs(venv_path, env_vars, STACK_NAME, 'ComputesScalingGroup')
 
-                        //update autoscaling group
-                        aws.updateAutoscalingGroup(venv_path, env_vars, scaling_group, ["--desired-capacity " + STACK_COMPUTE_COUNT])
+                            //update autoscaling group
+                            aws.updateAutoscalingGroup(venv_path, env_vars, scaling_group, ["--desired-capacity " + STACK_COMPUTE_COUNT])
 
-                        // wait for computes to boot up
-                        sleep(120)
+                            // wait for computes to boot up
+                            sleep(120)
+                        }
+
+                        orchestrate.installKubernetesCompute(saltMaster)
                     }
-
-                    orchestrate.installKubernetesCompute(saltMaster)
-
                 }
 
                 if (common.checkContains('STACK_INSTALL', 'contrail')) {