Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AzureResourceGroupDeploymentTask: Improving error log to point to Deployment logs in Ibiza Portal #11853

Merged
merged 18 commits into from
Dec 5, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,6 @@
"loc.messages.ResourceGroupNameNotProvided": "Resource Group name should be provided",
"loc.messages.LocationNotProvided": "Location is required for deployment",
"loc.messages.ARMServiceConnectionScope": "ARM Service Conection deployment scope - %s",
"loc.messages.CompleteDeploymentModeNotSupported": "Deployment mode 'Complete' is not supported for deployment at '%s' scope"
"loc.messages.CompleteDeploymentModeNotSupported": "Deployment mode 'Complete' is not supported for deployment at '%s' scope",
"loc.messages.FindMoreDeploymentDetailsAzurePortal": "Find more details about the Azure deployment at: %s"
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export class DeploymentScopeBase {
return this.waitAndPerformAzureDeployment(retryCount);
}
utils.writeDeploymentErrors(this.taskParameters, error);
tl.error(tl.loc("FindMoreDeploymentDetailsAzurePortal", this.getAzurePortalDeploymentURL()));
return reject(tl.loc("CreateTemplateDeploymentFailed"));
}
if (result && result["properties"] && result["properties"]["outputs"] && utils.isNonEmpty(this.taskParameters.deploymentOutputs)) {
Expand All @@ -68,6 +69,14 @@ export class DeploymentScopeBase {
}
}

private getAzurePortalDeploymentURL() {
let portalUrl = this.taskParameters.endpointPortalUrl ? this.taskParameters.endpointPortalUrl : "https://portal.azure.com";
issacnitin marked this conversation as resolved.
Show resolved Hide resolved
portalUrl += "/#blade/HubsExtension/DeploymentDetailsBlade/overview/id/";

let subscriptionSpecificURL = "/subscriptions/" + this.taskParameters.subscriptionId + "/resourceGroups/" + this.taskParameters.resourceGroupName + "/providers/Microsoft.Resources/deployments/" + this.taskParameters.deploymentName;
issacnitin marked this conversation as resolved.
Show resolved Hide resolved
return portalUrl + subscriptionSpecificURL.replace(/\//g, '%2F');
issacnitin marked this conversation as resolved.
Show resolved Hide resolved
}

protected validateDeployment(): Promise<void> {
return new Promise<void>((resolve, reject) => {
console.log(tl.loc("StartingValidation"));
Expand Down
5 changes: 3 additions & 2 deletions Tasks/AzureResourceManagerTemplateDeploymentV3/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"version": {
issacnitin marked this conversation as resolved.
Show resolved Hide resolved
"Major": 3,
"Minor": 1,
"Patch": 4
"Patch": 5
},
"preview": "true",
"demands": [],
Expand Down Expand Up @@ -301,6 +301,7 @@
"ResourceGroupNameNotProvided": "Resource Group name should be provided",
"LocationNotProvided": "Location is required for deployment",
"ARMServiceConnectionScope": "ARM Service Conection deployment scope - %s",
"CompleteDeploymentModeNotSupported": "Deployment mode 'Complete' is not supported for deployment at '%s' scope"
"CompleteDeploymentModeNotSupported": "Deployment mode 'Complete' is not supported for deployment at '%s' scope",
"FindMoreDeploymentDetailsAzurePortal": "Find more details about your deployment at: %s"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"version": {
"Major": 3,
"Minor": 1,
"Patch": 4
"Patch": 5
},
"preview": "true",
"demands": [],
Expand Down Expand Up @@ -301,6 +301,7 @@
"ResourceGroupNameNotProvided": "ms-resource:loc.messages.ResourceGroupNameNotProvided",
"LocationNotProvided": "ms-resource:loc.messages.LocationNotProvided",
"ARMServiceConnectionScope": "ms-resource:loc.messages.ARMServiceConnectionScope",
"CompleteDeploymentModeNotSupported": "ms-resource:loc.messages.CompleteDeploymentModeNotSupported"
"CompleteDeploymentModeNotSupported": "ms-resource:loc.messages.CompleteDeploymentModeNotSupported",
"FindMoreDeploymentDetailsAzurePortal": "ms-resource:loc.messages.FindMoreDeploymentDetailsAzurePortal"
}
}