diff --git a/azure/azuredeploy.json b/azure/azuredeploy.json index 8c8e1094..f5c96c0b 100644 --- a/azure/azuredeploy.json +++ b/azure/azuredeploy.json @@ -6,6 +6,12 @@ "defaultValue": "citustestcluster", "type": "string" }, + "git_username": { + "type": "securestring" + }, + "git_token": { + "type": "securestring" + }, "adminUsername": { "type": "string", "defaultValue": "pguser", @@ -165,7 +171,7 @@ "name": "[variables('ppgName')]", "location": "[parameters('location')]", "properties": { - + } }, { @@ -384,10 +390,10 @@ "type": "CustomScript", "typeHandlerVersion": "2.0", "settings": { - "commandToExecute": "[concat('sh init.sh ', copyIndex(), ' ', variables('numberOfInstances'), ' ', variables('storageAcctName'), ' ', listKeys(variables('storageAcctName'),'2017-10-01').keys[0].value, ' ', parameters('branchName'))]", + "commandToExecute": "[concat('sh init.sh ', copyIndex(), ' ', variables('numberOfInstances'), ' ', variables('storageAcctName'), ' ', listKeys(variables('storageAcctName'),'2017-10-01').keys[0].value, ' ', parameters('branchName'), ' ', parameters('git_username'), ' ', parameters('git_token'))]", "fileUris": [ "https://raw.githubusercontent.com/citusdata/test-automation/master/azure/init.sh", - "https://raw.githubusercontent.com/citusdata/test-automation/master/hammerdb/cache_git_creds.sh" + "https://raw.githubusercontent.com/citusdata/test-automation/valgrind-merge/hammerdb/cache_git_creds.sh" ] } }, diff --git a/azure/create-cluster.sh b/azure/create-cluster.sh index ea6d9410..cf0e895a 100755 --- a/azure/create-cluster.sh +++ b/azure/create-cluster.sh @@ -35,7 +35,7 @@ echo "waiting a long time to create cluster, this might take up to 30 mins depen export BRANCH="valgrind-merge" # below is the default create cluster command -CREATE_CLUSTER_COMMAND=(az group deployment create -g ${rg} --template-file azuredeploy.json --parameters @azuredeploy.parameters.json --parameters sshPublicKey="${public_key}" branchName="$BRANCH") +CREATE_CLUSTER_COMMAND=(az group deployment create -g ${rg} --template-file azuredeploy.json --parameters @azuredeploy.parameters.json --parameters sshPublicKey="${public_key}" branchName="$BRANCH" git_username="${GIT_USERNAME}" git_token="${GIT_TOKEN}") # if VALGRIND_TEST variable is not exported, set it to 0 is_valgrind_test=${VALGRIND_TEST:=0} diff --git a/azure/init.sh b/azure/init.sh index 2acff9c4..74bd2842 100644 --- a/azure/init.sh +++ b/azure/init.sh @@ -167,5 +167,8 @@ find_private_ips() { find_private_ips "$@" +export GIT_USERNAME=$6 +export GIT_TOKEN=$7 + # cache git credentials so that we can clone a private repository with caching enabled ./cache_git_creds.sh