private async updateScmType()

in src/configure/configure.ts [459:492]


    private async updateScmType(queuedPipeline: Build): Promise<void> {
        try {
            if(!this.inputs.targetResource.resource) {
                return;
            }
            // update SCM type
            this.appServiceClient.updateScmType(this.inputs.targetResource.resource.id);

            let buildDefinitionUrl = AzureDevOpsHelper.getOldFormatBuildDefinitionUrl(this.inputs.organizationName, this.inputs.project.id, queuedPipeline.definition.id);
            let buildUrl = AzureDevOpsHelper.getOldFormatBuildUrl(this.inputs.organizationName, this.inputs.project.id, queuedPipeline.id);

            // update metadata of app service to store information about the pipeline deploying to web app.
            let metadata = await this.appServiceClient.getAppServiceMetadata(this.inputs.targetResource.resource.id);
            metadata["properties"] = metadata["properties"] ? metadata["properties"] : {};
            metadata["properties"]["VSTSRM_ProjectId"] = this.inputs.project.id;
            metadata["properties"]["VSTSRM_AccountId"] = await this.organizationsClient.getOrganizationIdFromName(this.inputs.organizationName);
            metadata["properties"]["VSTSRM_BuildDefinitionId"] = queuedPipeline.definition.id.toString();
            metadata["properties"]["VSTSRM_BuildDefinitionWebAccessUrl"] = buildDefinitionUrl;
            metadata["properties"]["VSTSRM_ConfiguredCDEndPoint"] = '';
            metadata["properties"]["VSTSRM_ReleaseDefinitionId"] = '';

            this.appServiceClient.updateAppServiceMetadata(this.inputs.targetResource.resource.id, metadata);

            // send a deployment log with information about the setup pipeline and links.
            this.appServiceClient.publishDeploymentToAppService(
                this.inputs.targetResource.resource.id,
                buildDefinitionUrl,
                buildDefinitionUrl,
                buildUrl);
        }
        catch (error) {
            telemetryHelper.logError(Layer, TracePoints.PostDeploymentActionFailed, error);
        }
    }