0

我想覆盖天蓝色管道任务 AzureResourceGroupDeployment@2 中的参数,但无法使其正常工作。

我得到错误:

Parameter override: 'TypeError: Cannot read property 'type' of undefined', make sure it 
follows JavaScript Object Notation (JSON)

任务配置如下:

- task: AzureResourceGroupDeployment@2
  displayName: Validate ADF Template
  inputs:
    azureSubscription: DataPlatform Deploy SP - Staging
    resourceGroupName: $(RESOURCE_GROUP)
    deploymentMode: Validation
    csmFile: $(Pipeline.Workspace)/DataFactory_ARM/ARMTemplateForFactory.json
    csmParametersFile: $(Pipeline.Workspace)/DataFactory_ARM/ARMTemplateParametersForFactory.json
    overrideParameters: -factoryName "$(DATAFACTORY_NAME)"
      -Storage_01_RCE_accountKey "$(cedl2-key1)"
      -Storage_02_Curated_accountKey "$(curdl2-key1)"
      -Storage_03_LandingZone_connectionString "$(lnzsa-conn-string)"
      -Storage_04_AzFunction_connectionString "$(funcsa-conn-string)"
      -CT-Reload-ST_properties_CT_Customers_reload_parameters_KafkaTopic "dapl-acc-ct-customers"
      -DW_Optimove-DE_properties_pl_demandware_dim_product_parameters_env "$(ENV)"
      -DW_Optimove-DE_properties_pl_demandware_dim_account_parameters_env "$(ENV)"
      -DW_Optimove-DE_properties_pl_demandware_fact_order_parameters_env "$(ENV)"
      -DW_Optimove-DE_properties_pl_demandware_dim_product_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-DE_properties_pl_demandware_dim_account_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-DE_properties_pl_demandware_fact_order_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-IT_properties_pl_demandware_dim_product_parameters_env "$(ENV)"
      -DW_Optimove-IT_properties_pl_demandware_dim_account_parameters_env "$(ENV)"
      -DW_Optimove-IT_properties_pl_demandware_fact_order_parameters_env "$(ENV)"
      -DW_Optimove-IT_properties_pl_demandware_dim_product_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-IT_properties_pl_demandware_dim_account_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-IT_properties_pl_demandware_fact_order_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-UK_properties_pl_demandware_dim_product_parameters_env "$(ENV)"
      -DW_Optimove-UK_properties_pl_demandware_dim_account_parameters_env "$(ENV)"
      -DW_Optimove-UK_properties_pl_demandware_fact_order_parameters_env "$(ENV)"
      -DW_Optimove-UK_properties_pl_demandware_dim_product_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-UK_properties_pl_demandware_dim_account_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-UK_properties_pl_demandware_fact_order_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-RU_properties_pl_demandware_dim_product_parameters_env "$(ENV)"
      -DW_Optimove-RU_properties_pl_demandware_dim_account_parameters_env "$(ENV)"
      -DW_Optimove-RU_properties_pl_demandware_fact_order_parameters_env "$(ENV)"
      -DW_Optimove-RU_properties_pl_demandware_dim_product_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-RU_properties_pl_demandware_dim_account_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-RU_properties_pl_demandware_fact_order_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-FR_properties_pl_demandware_dim_product_parameters_env "$(ENV)"
      -DW_Optimove-FR_properties_pl_demandware_dim_account_parameters_env "$(ENV)"
      -DW_Optimove-FR_properties_pl_demandware_fact_order_parameters_env "$(ENV)"
      -DW_Optimove-FR_properties_pl_demandware_dim_product_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-FR_properties_pl_demandware_dim_account_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-FR_properties_pl_demandware_fact_order_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-JP_properties_pl_demandware_dim_product_parameters_env "$(ENV)"
      -DW_Optimove-JP_properties_pl_demandware_dim_account_parameters_env "$(ENV)"
      -DW_Optimove-JP_properties_pl_demandware_fact_order_parameters_env "$(ENV)"
      -DW_Optimove-JP_properties_pl_demandware_dim_product_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-JP_properties_pl_demandware_dim_account_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-JP_properties_pl_demandware_fact_order_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-IE_properties_pl_demandware_dim_product_parameters_env "$(ENV)"
      -DW_Optimove-IE_properties_pl_demandware_dim_account_parameters_env "$(ENV)"
      -DW_Optimove-IE_properties_pl_demandware_fact_order_parameters_env "$(ENV)"
      -DW_Optimove-IE_properties_pl_demandware_dim_product_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-IE_properties_pl_demandware_dim_account_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-IE_properties_pl_demandware_fact_order_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-ES_properties_pl_demandware_dim_product_parameters_env "$(ENV)"
      -DW_Optimove-ES_properties_pl_demandware_dim_account_parameters_env "$(ENV)"
      -DW_Optimove-ES_properties_pl_demandware_fact_order_parameters_env "$(ENV)"
      -DW_Optimove-ES_properties_pl_demandware_dim_product_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-ES_properties_pl_demandware_dim_account_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -DW_Optimove-ES_properties_pl_demandware_fact_order_parameters_cluster_id "$(DATABRICKS_CLUSTERID_DEMANDWARE)"
      -OM-API-ETL-ST_properties_OM_reload_parameters_Env "acc"

$(ENV 设置为阶段变量: ENV: acc

$(DATABRICKS_CLUSTERID_DEMANDWARE) 设置为作业变量 DATABRICKS_CLUSTERID_DEMANDWARE: 1234-123456-abcd123

我试过用“acc”替换“$(ENV)”但是。同样的错误。还尝试在第一个键之前和最后一个键之后添加单引号。

该任务的完整日志可通过 pastebin 获得,因为粘贴在这里太大了: https ://pastebin.com/gijMthx6

4

1 回答 1

0

问题是Deployment template validation failed: 'The template parameters 'DW_Optimove-DE_properties_pl_demandware_dim_product_parameters_env, ... , DW_Optimove-ES_properties_pl_demandware_fact_order_parameters_cluster_id' in the parameters file are not valid; they are not present in the original template and can therefore not be provided at deployment time. The only supported parameters for this template are 'factoryName, ADF_Pipeline_Database_connectionString, Storage_01_RCE_accountKey, Storage_02_Curated_accountKey, Storage_03_LandingZone_connectionString, Storage_04_AzFunction_connectionString,....'

错误消息指出 ARM 模板缺少这些参数。您需要检查您的 ARM 模板文件。

错误消息说 ARM 模板具有以下参数:

...
"parameters": {
  "factoryName": {
    "type": "string"
  },
  "ADF_Pipeline_Database_connectionString": {
    "type": "string"
  },
  "Storage_01_RCE_accountKey": {
    "type": "string"
  },
  "Storage_02_Curated_accountKey": {
    "type": "string"
  },
  "Storage_03_LandingZone_connectionString": {
    "type": "string"
  }
  ....
    },
    "variables": {},
    ...

您可以查看此文档票证以获取更多详细信息。

于 2021-02-18T09:26:23.073 回答