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
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,28 +19,28 @@ In this article, we use Azure Pipelines to deploy a Windows container applicatio
19
19
- An Azure DevOps organization. [Create one for free](/azure/devops/pipelines/get-started/pipelines-sign-up).
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
-
## 1. Add a Service Connection
22
+
## Add a Service Connection
23
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
-
## 2. Secure your secrets
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).
25
+
## Secure your secrets
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.
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
39
1. On the next screen, select **Azure Repos Git** as your repository option and select the repository where your code is
40
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
-
## 4. Build and push image to Azure container registry
43
+
## Build and push image to Azure container registry
44
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.
@@ -77,7 +77,7 @@ trigger:
77
77
$(tag)
78
78
```
79
79
80
-
## 5. Add the App Service deploy task
80
+
## Add the App Service deploy task
81
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
@@ -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 goes 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