<commit_before>{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "siteName": {
            "type": "string",
            "metadata": {
                "description": "Name of azure web app"
            }
        },
        "servicePlanTier": {
            "type": "string",
            "allowedValues": [
                "Basic",
                "Standard"
            ],
            "defaultValue": "Basic",
            "metadata": {
                "description": "Tier for Service Plan"
            }
        },
        "servicePlanSku": {
            "type": "string",
            "allowedValues": [
                "B1",
                "B2",
                "B3",
                "S1",
                "S2",
                "S3"
            ],
            "defaultValue": "S2",
            "metadata": {
                "description": "Size for Service Plan"
            }
        },
        "administratorLogin": {
            "type": "string",
            "minLength": 1,
            "metadata": {
                "description": "Database administrator login name"
            }
        },
        "administratorLoginPassword": {
            "type": "securestring",
            "minLength": 8,
            "metadata": {
                "description": "<PASSWORD> administrator password"
            }
        },
        "databaseSkuCapacity": {
            "type": "int",
            "defaultValue": 2,
            "allowedValues": [
                2,
                4,
                8,
                16,
                32
            ],
            "metadata": {
                "description": "Azure database for MySQL compute capacity in vCores (2,4,8,16,32)"
            }
        },
        "databaseSkuName": {
            "type": "string",
            "defaultValue": "GP_Gen5_2",
            "allowedValues": [
                "GP_Gen5_2",
                "GP_Gen5_4",
                "GP_Gen5_8",
                "GP_Gen5_16",
                "GP_Gen5_32",
                "MO_Gen5_2",
                "MO_Gen5_4",
                "MO_Gen5_8",
                "MO_Gen5_16"
            ],
            "metadata": {
                "description": "Azure database for MySQL sku name "
            }
        },
        "databaseSkuSizeMB": {
            "type": "int",
            "allowedValues": [
                102400,
                51200
            ],
            "defaultValue": 51200,
            "metadata": {
                "description": "Azure database for MySQL Sku Size "
            }
        },
        "databaseSkuTier": {
            "type": "string",
            "defaultValue": "GeneralPurpose",
            "allowedValues": [
                "GeneralPurpose",
                "MemoryOptimized"
            ],
            "metadata": {
                "description": "Azure database for MySQL pricing tier"
            }
        },
        "mysqlVersion": {
            "type": "string",
            "allowedValues": [
                "5.6",
                "5.7"
            ],
            "defaultValue": "5.7",
            "metadata": {
                "description": "MySQL version"
            }
        },
        "location": {
            "type": "string",
            "defaultValue": "[resourceGroup().location]",
            "metadata": {
                "description": "Location for all the resources"
            }
        },
        "databaseSkuFamily": {
            "type": "string",
            "defaultValue": "Gen5",
            "metadata": {
                "description": "Azure database for MySQL sku family"
            }
        }
    },
    "variables": {
        "databaseName": "[concat(parameters('siteName'), 'database')]",
        "serverName": "[concat(parameters('siteName'), 'mysqlserver')]",
        "jdbcSonarUserName": "[concat(parameters('administratorLogin'),'@',variables('serverName'))]",
        "hostingPlanName": "[concat(parameters('siteName'), 'serviceplan')]"
    },
    "resources": [
        {
            "comments": "This is the Linux web app with the Sonarquebe Docker image and the DB",
            "type": "Microsoft.Web/sites",
            "name": "[parameters('siteName')]",
            "apiVersion": "2018-02-01",
            "location": "[parameters('location')]",
            "dependsOn": [
                "[variables('hostingPlanName')]",
                "[variables('databaseName')]"
            ],
            "properties": {
                "siteConfig": {
                    "linuxFxVersion": "DOCKER|SONARQUBE"
                },
                "name": "[parameters('siteName')]",
                "serverFarmId": "[variables('hostingPlanName')]",
                "hostingEnvironment": ""
            },
            "resources": [
                {
                    "name": "appsettings",
                    "type": "config",
                    "apiVersion": "2018-02-01",
                    "comments": "This are the generated settings for the Sonar jdbc connectionstring",
                    "dependsOn": [
                        "[resourceId('Microsoft.Web/sites', parameters('siteName'))]"
                    ],
                    "tags": {
                        "displayName": "SonarappSettings"
                    },
                    "properties": {
                        "SONARQUBE_JDBC_URL": "[concat('jdbc:mysql://',  reference(resourceId('Microsoft.DBforMySQL/servers',variables('serverName'))).fullyQualifiedDomainName , ':3306/',variables('databaseName'),'?verifyServerCertificate=true&useSSL=true&requireSSL=false&useUnicode=true&characterEncoding=utf8')]",
                        "SONARQUBE_JDBC_USERNAME": "[variables('jdbcSonarUserName')]",
                        "SONARQUBE_JDBC_PASSWORD": "[parameters('administratorLoginPassword')]"
                    }
                }
            ]
        },
        {
            "apiVersion": "2017-08-01",
            "name": "[variables('hostingPlanName')]",
            "type": "Microsoft.Web/serverfarms",
            "location": "[resourceGroup().location]",
            "properties": {
                "name": "[variables('hostingPlanName')]",
                "workerSizeId": "1",
                "reserved": true,
                "numberOfWorkers": "1",
                "hostingEnvironment": ""
            },
            "sku": {
                "Tier": "[parameters('servicePlanTier')]",
                "Name": "[parameters('servicePlanSku')]"
            },
            "kind": "linux"
        },
        {
            "apiVersion": "2017-12-01",
            "kind": "",
            "location": "[resourceGroup().location]",
            "name": "[variables('serverName')]",
            "type": "Microsoft.DBforMySQL/servers",
            "sku": {
                "name": "[parameters('databaseSkuName')]",
                "tier": "[parameters('databaseSkuTier')]",
                "capacity": "[parameters('databaseSkuCapacity')]",
                "size": "[parameters('databaseSkuSizeMB')]",
                "family": "[parameters('databaseSkuFamily')]"
            },
            "properties": {
                "version": "[parameters('mysqlVersion')]",
                "administratorLogin": "[parameters('administratorLogin')]",
                "administratorLoginPassword": "[parameters('administratorLoginPassword')]",
                "storageMB": "[parameters('databaseSkuSizeMB')]"
            },
            "resources": [
                {
                    "type": "firewallrules",
                    "apiVersion": "2017-12-01",
                    "dependsOn": [
                        "[concat('Microsoft.DBforMySQL/servers/', variables('serverName'))]"
                    ],
                    "location": "[resourceGroup().location]",
                    "name": "[concat(variables('serverName'),'firewall')]",
                    "properties": {
                        "startIpAddress": "0.0.0.0",
                        "endIpAddress": "255.255.255.255"
                    }
                },
                {
                    "name": "[variables('databaseName')]",
                    "type": "databases",
                    "apiVersion": "2017-12-01",
                    "properties": {
                        "charset": "utf8",
                        "collation": "utf8_general_ci"
                    },
                    "dependsOn": [
                        "[concat('Microsoft.DBforMySQL/servers/', variables('serverName'))]"
                    ]
                }
            ]<commit_msg>Allowing serial execution of resources<commit_after>{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "siteName": {
            "type": "string",
            "metadata": {
                "description": "Name of azure web app"
            }
        },
        "servicePlanTier": {
            "type": "string",
            "allowedValues": [
                "Basic",
                "Standard"
            ],
            "defaultValue": "Basic",
            "metadata": {
                "description": "Tier for Service Plan"
            }
        },
        "servicePlanSku": {
            "type": "string",
            "allowedValues": [
                "B1",
                "B2",
                "B3",
                "S1",
                "S2",
                "S3"
            ],
            "defaultValue": "S2",
            "metadata": {
                "description": "Size for Service Plan"
            }
        },
        "administratorLogin": {
            "type": "string",
            "minLength": 1,
            "metadata": {
                "description": "Database administrator login name"
            }
        },
        "administratorLoginPassword": {
            "type": "securestring",
            "minLength": 8,
            "metadata": {
                "description": "Database administrator password"
            }
        },
        "databaseSkuCapacity": {
            "type": "int",
            "defaultValue": 2,
            "allowedValues": [
                2,
                4,
                8,
                16,
                32
            ],
            "metadata": {
                "description": "Azure database for MySQL compute capacity in vCores (2,4,8,16,32)"
            }
        },
        "databaseSkuName": {
            "type": "string",
            "defaultValue": "GP_Gen5_2",
            "allowedValues": [
                "GP_Gen5_2",
                "GP_Gen5_4",
                "GP_Gen5_8",
                "GP_Gen5_16",
                "GP_Gen5_32",
                "MO_Gen5_2",
                "MO_Gen5_4",
                "MO_Gen5_8",
                "MO_Gen5_16"
            ],
            "metadata": {
                "description": "Azure database for MySQL sku name "
            }
        },
        "databaseSkuSizeMB": {
            "type": "int",
            "allowedValues": [
                102400,
                51200
            ],
            "defaultValue": 51200,
            "metadata": {
                "description": "Azure database for MySQL Sku Size "
            }
        },
        "databaseSkuTier": {
            "type": "string",
            "defaultValue": "GeneralPurpose",
            "allowedValues": [
                "GeneralPurpose",
                "MemoryOptimized"
            ],
            "metadata": {
                "description": "Azure database for MySQL pricing tier"
            }
        },
        "mysqlVersion": {
            "type": "string",
            "allowedValues": [
                "5.6",
                "5.7"
            ],
            "defaultValue": "5.7",
            "metadata": {
                "description": "MySQL version"
            }
        },
        "location": {
            "type": "string",
            "defaultValue": "[resourceGroup().location]",
            "metadata": {
                "description": "Location for all the resources"
            }
        },
        "databaseSkuFamily": {
            "type": "string",
            "defaultValue": "Gen5",
            "metadata": {
                "description": "Azure database for MySQL sku family"
            }
        }
    },
    "variables": {
        "databaseName": "[concat(parameters('siteName'), 'database')]",
        "serverName": "[concat(parameters('siteName'), 'mysqlserver')]",
        "jdbcSonarUserName": "[concat(parameters('administratorLogin'),'@',variables('serverName'))]",
        "hostingPlanName": "[concat(parameters('siteName'), 'serviceplan')]",
        "firewallrule": "[concat(variables('serverName'),'firewall')]"
    },
    "resources": [
        {
            "comments": "This is the Linux web app with the Sonarquebe Docker image and the DB",
            "type": "Microsoft.Web/sites",
            "name": "[parameters('siteName')]",
            "apiVersion": "2018-02-01",
            "location": "[parameters('location')]",
            "dependsOn": [
                "[variables('hostingPlanName')]",
                "[variables('databaseName')]"
            ],
            "properties": {
                "siteConfig": {
                    "linuxFxVersion": "DOCKER|SONARQUBE"
                },
                "name": "[parameters('siteName')]",
                "serverFarmId": "[variables('hostingPlanName')]",
                "hostingEnvironment": ""
            },
            "resources": [
                {
                    "name": "appsettings",
                    "type": "config",
                    "apiVersion": "2018-02-01",
                    "comments": "This are the generated settings for the Sonar jdbc connectionstring",
                    "dependsOn": [
                        "[resourceId('Microsoft.Web/sites', parameters('siteName'))]"
                    ],
                    "tags": {
                        "displayName": "SonarappSettings"
                    },
                    "properties": {
                        "SONARQUBE_JDBC_URL": "[concat('jdbc:mysql://',  reference(resourceId('Microsoft.DBforMySQL/servers',variables('serverName'))).fullyQualifiedDomainName , ':3306/',variables('databaseName'),'?verifyServerCertificate=true&useSSL=true&requireSSL=false&useUnicode=true&characterEncoding=utf8')]",
                        "SONARQUBE_JDBC_USERNAME": "[variables('jdbcSonarUserName')]",
                        "SONARQUBE_JDBC_PASSWORD": "[parameters('administratorLoginPassword')]"
                    }
                }
            ]
        },
        {
            "apiVersion": "2017-08-01",
            "name": "[variables('hostingPlanName')]",
            "type": "Microsoft.Web/serverfarms",
            "location": "[resourceGroup().location]",
            "properties": {
                "name": "[variables('hostingPlanName')]",
                "workerSizeId": "1",
                "reserved": true,
                "numberOfWorkers": "1",
                "hostingEnvironment": ""
            },
            "sku": {
                "Tier": "[parameters('servicePlanTier')]",
                "Name": "[parameters('servicePlanSku')]"
            },
            "kind": "linux"
        },
        {
            "apiVersion": "2017-12-01",
            "kind": "",
            "location": "[resourceGroup().location]",
            "name": "[variables('serverName')]",
            "type": "Microsoft.DBforMySQL/servers",
            "sku": {
                "name": "[parameters('databaseSkuName')]",
                "tier": "[parameters('databaseSkuTier')]",
                "capacity": "[parameters('databaseSkuCapacity')]",
                "size": "[parameters('databaseSkuSizeMB')]",
                "family": "[parameters('databaseSkuFamily')]"
            },
            "properties": {
                "version": "[parameters('mysqlVersion')]",
                "administratorLogin": "[parameters('administratorLogin')]",
                "administratorLoginPassword": "[parameters('administratorLoginPassword')]",
                "storageMB": "[parameters('databaseSkuSizeMB')]"
            },
            "resources": [
                {
                    "type": "firewallrules",
                    "apiVersion": "2017-12-01",
                    "dependsOn": [
                        "[concat('Microsoft.DBforMySQL/servers/', variables('serverName'))]"
                    ],
                    "location": "[resourceGroup().location]",
                    "name": "[variables('firewallrule')]",
                    "properties": {
                        "startIpAddress": "0.0.0.0",
                        "endIpAddress": "255.255.255.255"
                    }
                },
                {
                    "name": "[variables('databaseName')]",
                    "type": "databases",
                    "apiVersion": "2017-12-01",
                    "properties": {
                        "charset": "utf8",
                        "collation": "utf8_general_ci"
                    },
                    "dependsOn": [
                        "[concat('Microsoft.DBforMySQL/servers/', variables('serverName'))]",
                        "[resourceId('Microsoft.DBforMySQL/servers/firewallRules', variables('serverName'), variables('firewallrule'))]"
                    ]
                }
            ]
{'fraction_non_alphanumeric': 0.14669256254998286, 'fraction_numerical': 0.017708214326516623, 'mean_word_length': 1.2852108079885132, 'pattern_counts': {'":': 291, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '819057', 'n_tokens_mistral': 4663, 'n_tokens_neox': 4263, 'n_words': 707}