ask user to upload files once the cloud shell has been provisioned (#127)

This commit is contained in:
Sheng Chen 2018-02-28 13:58:56 +08:00 коммит произвёл GitHub
Родитель 07301773a4
Коммит 5c2f80370e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 10 добавлений и 9 удалений

Просмотреть файл

@ -41,7 +41,7 @@
"tf-azure.files": {
"type": "string",
"default": "**/*.{rb,sh,tf,tfvars,txt,yml}",
"description": "Indicates the files that should be synchronized to Azure cloudshell using the glob pattern string, for example: **/*.{tf,txt,yml,tfvars,rb}"
"description": "Indicates the files that should be synchronized to Azure Cloud Shell using the glob pattern string, for example: **/*.{tf,txt,yml,tfvars,rb}"
},
"tf-azure.test-container": {
"type": "string",

Просмотреть файл

@ -42,14 +42,6 @@ export class CloudShell extends BaseShell {
public async runTerraformTests(testType: string, workingDirectory: string) {
if (await this.connectedToCloudShell()) {
const choice: vscode.MessageItem = await vscode.window.showInformationMessage(
"Would you like to push the terraform project files to CloudShell?",
DialogOption.OK,
DialogOption.CANCEL,
);
if (choice === DialogOption.OK) {
await vscode.commands.executeCommand("vscode-terraform-azure.push");
}
const workspaceName: string = path.basename(workingDirectory);
const setupFilesFolder: string = `${workspaceName}/.TFTesting`;
@ -163,6 +155,15 @@ export class CloudShell extends BaseShell {
this.tfTerminal.fileShareName = terminal[4];
this.tfTerminal.ResourceGroup = terminal[5];
terraformChannel.appendLine("Cloudshell terminal opened.");
const choice: vscode.MessageItem = await vscode.window.showInformationMessage(
"Would you like to push the terraform project files in current workspace to Cloud Shell?",
DialogOption.OK,
DialogOption.CANCEL,
);
if (choice === DialogOption.OK) {
await vscode.commands.executeCommand("vscode-terraform-azure.push");
}
return true;
}