move venv setup at the beginning of aws stack operation
Change-Id: I429d5443b07bea285d23cab386448705a4a10804
diff --git a/cloud-deploy-pipeline.groovy b/cloud-deploy-pipeline.groovy
index 2302462..2ceba6d 100644
--- a/cloud-deploy-pipeline.groovy
+++ b/cloud-deploy-pipeline.groovy
@@ -134,6 +134,9 @@
SALT_MASTER_URL = "http://${saltMasterHost}:6969"
} else if (STACK_TYPE == 'aws') {
+ // setup environment
+ aws.setupVirtualEnv(venv)
+
// set aws_env_vars
aws_env_vars = aws.getEnvVars(AWS_API_CREDENTIALS, AWS_STACK_REGION)
@@ -162,9 +165,6 @@
// get templates
git.checkoutGitRepository('template', STACK_TEMPLATE_URL, STACK_TEMPLATE_BRANCH, STACK_TEMPLATE_CREDENTIALS)
- // setup environment
- aws.setupVirtualEnv(venv)
-
// start stack
def stack_params = [
"ParameterKey=KeyName,ParameterValue=" + AWS_SSH_KEY,