2017-07-20 11 views
0

私は、powershellスクリプトを使用して晴れのWebアプリケーションを作成しようとしています。私は問題なく作成することができます。しかし、私はpowershellスクリプトを使って展開するためにプライベートrepo(bitbucket)を使用しようとします。私はエラーが発生している、これは何が起こるかです。Azure Powershellは、Bitbucketプライベートレポから展開したWebアプリケーションを作成します。

Set-AzureRmResource : The pipeline has been stopped. 
At line:30 char:1 
+ Set-AzureRmResource -PropertyObject $PropertiesObject -ResourceGroupN ... 
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : CloseError: (:) [Set-AzureRmResource], PipelineStoppedException 
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.SetAzureResourceCmdlet 
Set-AzureRmResource : {"Message":"An error has occurred."} 
At line:30 char:1 
+ Set-AzureRmResource -PropertyObject $PropertiesObject -ResourceGroupN ... 
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : CloseError: (:) [Set-AzureRmResource], ErrorResponseMessageException 
    + FullyQualifiedErrorId : 
InternalServerError,Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.SetAzureResourceCmdlet 

上記のエラーは、リモートリポジトリからコードをデプロイするためのポイントに達したときに発生します。 は今、私は私がマイクロソフトからthisチュートリアルを参照して、それはgithubのためにある

$gitrepo="https://[email protected]/companyName/xx-x-demo.git" 
$webappname="mywebapp$(Get-Random)" 
$location="Southeast Asia" 

# Create a resource group. 
New-AzureRmResourceGroup -Name myResourceGroup -Location $location 

# Create an App Service plan in Free tier. 
New-AzureRmAppServicePlan -Name $webappname -Location $location ` 
-ResourceGroupName myResourceGroup -Tier Free 

# Create a web app. 

New-AzureRmWebApp -Name $webappname -Location $location -AppServicePlan $webappname ` 
-ResourceGroupName myResourceGroup 

# SET Bitbucket 
$PropertiesObject = @{ 
    token= 'xxxxxxxxx-xxxxxx='; 
    tokenSecret= 'xxxxxxxxxx'; 
    refreshToken= 'xxxxxxxxxxxx'; 
} 

Set-AzureRmResource -PropertyObject $PropertiesObject -ResourceId /providers/Microsoft.Web/sourcecontrols/Bitbucket -ApiVersion 2015-08-01 -Force 

# Configure Bitbucket deployment from your Bitbucket repo and deploy once. 
$PropertiesObject = @{ 
    repoUrl = "$gitrepo"; 
    branch = "master"; 
} 

Set-AzureRmResource -PropertyObject $PropertiesObject -ResourceGroupName myResourceGroup ` 
-ResourceType Microsoft.Web/sites/sourcecontrols -ResourceName $webappname/web ` 
-ApiVersion 2015-08-01 -Force 

をやってきたものを表示します。私が含まれているトークンは、bitbucketからのカール要求で生成されます。ここでは、私が行ったリクエストです

そして私はスクリプトで使ったアクセストークンとリフレッシュトークンを返します。と私はスクリプトで使用されている秘密は、client_secretです。

私はthisという質問をしましたが、助けがありませんでした。

私は私がスクリプトを使って送信していたトークンが有効

+0

デプロイ時にアプリケーションに制限がある可能性があります。エラーの詳細なロギングの詳細を取得できますか? – BKSpurgeon

+0

@BKSpurgeon私はgithub public repoを使用して正常に展開できます。つまり、制限はないと思います(私はそう思います)。このエラーの詳細なログを取得することはできません。冗長になる方法があれば、どうすればいいのか教えてください。 –

+0

有望に見えるhttps://docs.microsoft.com/en-us/azure/app-service-web/web-sites-dotnet-troubleshoot-visual-studio – BKSpurgeon

答えて

0

OKですので、私はビットバケットのための解決策を見つけることができませんでしたので、私は私のアプローチを変え検索グーグルの多くの後にすることを確信しています。今、私は新しく作成されたWebアプリケーションにFTPを使用してコードを配布しています。一部の人が動かなくなった場合はlinkとなります。誰かを助けることを願っています。

関連する問題