2017-10-23 5 views
0

AzureRM Web AppをTFS Release Managerに配備するときにConnectionStringを渡すのが苦労しています。私はConnectionStringを "Additional Arguments"フィールドに置き、 "Variables"セクションから正しい変数を提供しようとしました。しかし、私は次のようなエラーになっています:AzureRM Web AppをTFSに配備する際にConnectionStringを渡す方法は?

enter image description here

[error] Error: Unrecognized argument '-connectionString'. Error count: 1.

を誰かがWebアプリケーションをデプロイするためにAzureRMエンドポイントでの作業時のConnectionStringを設定する方法の経験を持っていますか?私が知る限り、AzureクラシックエンドポイントでAzure Web App Deploymentを使用すると、上記のアプローチはうまく動作します。

答えて

0

また、Azure WebApp Configurationタスクのような3者拡張を使用することもできます。

このタスクでは、VSTS/TFS変数を読み取り、それらをAppSettingsおよびConnectionStringsとしてAzure WebAppに追加します。

enter image description here

0

あなたはTFSを経由して、配備に合わせて、次のサンプルを教え込むことができます。

{ 
     "apiVersion": "2014-11-01", 
     "name": "appsettings", 
     "type": "config", 
     "dependsOn": [ 
     "[resourceId('Microsoft.Web/Sites', parameters('siteName'))]" 
     ], 
     "properties": { 
     "AppSettingKey1": "Some value", 
     "AppSettingKey2": "My second setting", 
     "AppSettingKey3": "My third setting" 
     } 
    }, 
    { 
     "apiVersion": "2014-11-01", 
     "name": "connectionstrings", 
     "type": "config", 
     "dependsOn": [ 
     "[resourceId('Microsoft.Web/Sites', parameters('siteName'))]" 
     ], 
     "properties": { 
     "ConnString1": { "value": "My custom connection string", "type": "custom" }, 
     "ConnString2": { "value": "My SQL connection string", "type": "SQLAzure" } 
     } 
    }, 

詳細

のためのサンプル hereを参照してください。
関連する問題