You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/app-service/deploy-container-azure-pipelines.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,9 @@ ms.author: jefmarti
9
9
10
10
# Deploy a custom container to App Service using Azure Pipelines
11
11
12
-
Azure DevOps enables you to host, build, plan and test your code with complimentary workflows. Using Azure Pipelines as one of these workflows allows you to deploy your application with CI/CD that works with any platform and cloud. A pipeline is defined as a YAML file in the root directory of your repository.
12
+
Azure DevOps enables you to host, build, plan, and test your code with complimentary workflows. Using Azure Pipelines as one of these workflows allows you to deploy your application with CI/CD that works with any platform and cloud. A pipeline is defined as a YAML file in the root directory of your repository.
13
13
14
-
In this article, we will use Azure Pipelines to deploy a Windows container application to App Service from a Git repository in Azure DevOps. It assumes you already have a .NET application with a supporting dockerfile in Azure DevOps.
14
+
In this article, we use Azure Pipelines to deploy a Windows container application to App Service from a Git repository in Azure DevOps. It assumes you already have a .NET application with a supporting dockerfile in Azure DevOps.
15
15
16
16
## Prerequisites
17
17
@@ -20,10 +20,10 @@ In this article, we will use Azure Pipelines to deploy a Windows container appli
20
20
- A working Windows app with Dockerfile hosted on [Azure Repos](https://docs.github.com/get-started/quickstart/create-a-repo).
21
21
22
22
## 1. Add a Service Connection
23
-
Before you create your pipeline, you should first create your Service Connection since you will be asked to choose and verify your connection when creating your template. A Service Connection will allow you to connect to your registry of choice (ACR or Docker Hub) when using the task templates. When adding a new service connection, choose the Docker Registry option. The following form will ask you to choose Docker Hub or Azure Container Registry along with pertaining information. To follow along with this tutorial, use Azure Container Registry. You can create a new Service Connection following the directions [here](https://learn.microsoft.com/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml#create-new).
23
+
Before you create your pipeline, you should first create your Service Connection since you'll be asked to choose and verify your connection when creating your template. A Service Connection allows you to connect to your registry of choice (ACR or Docker Hub) when using the task templates. When adding a new service connection, choose the Docker Registry option. The following form asks you to choose Docker Hub or Azure Container Registry along with pertaining information. To follow along with this tutorial, use Azure Container Registry. You can create a new Service Connection following the directions [here](https://learn.microsoft.com/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml#create-new).
24
24
25
25
## 2. Secure your secrets
26
-
Since we are using sensitive information that you don’t want others to access, we will use variables to protect our information. Create a variable by following the directions [here](https://learn.microsoft.com/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#secret-variables).
26
+
Since we're using sensitive information that you don’t want others to access, we use variables to protect our information. Create a variable by following the directions [here](https://learn.microsoft.com/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#secret-variables).
27
27
28
28
To add a Variable, you click the **Variables** button next to the Save button in the top-right of the editing view for your pipeline. Select the **New Variable** button and enter your information. Add the variables below with your own secrets appropriate from each resource.
29
29
@@ -36,12 +36,12 @@ To add a Variable, you click the **Variables** button next to the Save button in
36
36
Once your repository is created with your .NET application and supporting dockerfile, you can create your pipeline following these steps.
37
37
38
38
1. Navigate to **Pipelines** on the left menu bar and click on the **Create pipeline** button
39
-
1. On the next screen, select **Azure Repos Git** as your repository option and select the repository where you code is
40
-
1. Under the Configure tab choose the **Starter Pipeline** option
39
+
1. On the next screen, select **Azure Repos Git** as your repository option and select the repository where your code is
40
+
1. Under the Configure tab, choose the **Starter Pipeline** option
41
41
1. Under the next Review tab, click the **Save** button
42
42
43
43
## 4. Build and push image to Azure container registry
44
-
After your pipeline is created and saved, you will need to edit the pipeline to run the steps for building the container, pushing to a registry, and deploying the image to App Service. To start, navigate to the **Pipelines** menu, choose your pipeline that you just created and click the **Edit** button.
44
+
After your pipeline is created and saved, you'll need to edit the pipeline to run the steps for building the container, pushing to a registry, and deploying the image to App Service. To start, navigate to the **Pipelines** menu, choose your pipeline that you created and click the **Edit** button.
45
45
46
46
First, you need to add the docker task so you can build the image. Add the following code and replace the Dockerfile: app/Dockerfile with the path to your Dockerfile.
47
47
@@ -78,7 +78,7 @@ trigger:
78
78
```
79
79
80
80
## 5. Add the App Service deploy task
81
-
Next, you’ll need to setup the deploy task. This will require your subscription name, application name, and container registry. Add a new stage to the yaml file by pasting the code below.
81
+
Next, you need to set up the deploy task. This requires your subscription name, application name, and container registry. Add a new stage to the yaml file by pasting the code below.
82
82
83
83
```yaml
84
84
- stage: Deploy
@@ -113,7 +113,7 @@ Once you have those filled out, click the **Add** button to add the task below:
113
113
DockerRepository: 'dotnetframework:12'
114
114
```
115
115
116
-
After you’ve added the task the pipeline is ready to run. Click the **Validate and save** button and run the pipeline. The pipeline will go through the steps to build and push the Windows container image to Azure Container Registry and deploy the image to App Service.
116
+
After you’ve added the task the pipeline is ready to run. Click the **Validate and save** button and run the pipeline. The pipeline goes through the steps to build and push the Windows container image to Azure Container Registry and deploy the image to App Service.
0 commit comments