Microsoft Azure にデプロイする

This guide will help you configure Bitbucket Pipelines to automatically deploy a web application to Microsoft Azure using Git.

You may also be interested in this Bitbucket repo: Deploy to Microsoft Azure.


認証情報のセットアップ

This guide assumes that you already have a web application running on Microsoft Azure and that you have configured your deployment credentials.

Go to your repository settings and navigate to Pipelines Environment variables to add your deployment username and password as secured variables.

Deploy to Microsoft Azure App Service

It's easy to deploy to Microsoft Azure App Service using their deployment service Kudu. You just need to push to the corresponding Git repository of your environment using your deployment credentials.

You can find your Git URL from the Kudu portal. For instance, if your application lives at https://helloworld-azure-staging.azurewebsites.net/ you can simply access the Kudu information by going to https://helloworld-azure-staging.scm.azurewebsites.net/:

You can then follow the Source control info link to get the URL of the corresponding Git repository:

Now you can create your bitbucket-pipelines.yml script that will automatically deploy your staging application after running the tests:

bitbucket-pipelines.yml
image: node:4.6.0

pipelines:
  default:
    - step:
        script: # The script below will build, test and deploy the application to Microsoft Azure App Service.
          - npm install
          - npm test
          - git push https://$AZURE_LOGIN:$AZURE_PASSWORD@helloworld-azure-staging.scm.azurewebsites.net/helloworld-azure.git master



オンライン バリデーターを使用して bitbucket-pipelines.yml ファイルをチェックすることができます。

最終更新日 2018 年 3 月 9 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.