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
Once you have the sample code in your own repository, create a pipeline in your Azure DevOps project by using the instructions in [Create your first pipeline](../../create-first-pipeline.md).
36
36
37
-
Select the **ASP.NET** template. This choice automatically adds the *azure-pipelines.yml* file with the tasks required to build the code to the sample repository. The template includes the VSTest@2 task to run tests. The sample repository doesn't contain tests, so you can remove the VSTest@2 task from the pipeline.
37
+
Select the **ASP.NET** template. This choice automatically adds the *azure-pipelines.yml* file with the tasks required to build the code to the sample repository. The template includes the VSTest@3 task to run tests. The sample repository doesn't contain tests, so you can remove the VSTest@3 task from the pipeline.
38
38
39
39
Your pipeline should look like the following example:
This is a step-by-step guide on common ways to customize your pipeline.
18
+
This article is a step-by-step guide on common ways to customize your pipeline.
19
19
20
20
## Prerequisite
21
21
@@ -25,7 +25,7 @@ Follow instructions in [Create your first pipeline](create-first-pipeline.md) to
25
25
26
26
A pipeline is defined using a YAML file in your repo. Usually, this file is named `azure-pipelines.yml` and is located at the root of your repo.
27
27
28
-
Navigate to the **Pipelines** page in Azure Pipelines, select the pipeline you created, and choose**Edit** in the context menu of the pipeline to open the YAML editor for the pipeline.
28
+
Go to the **Pipelines** page in Azure Pipelines, select the pipeline you created, and select**Edit** in the context menu of the pipeline to open the YAML editor.
29
29
30
30
> [!NOTE]
31
31
> For instructions on how to view and manage your pipelines in the Azure DevOps portal, see [View and manage your pipelines](create-first-pipeline.md#view-and-manage-your-pipelines).
@@ -56,7 +56,7 @@ Examine the contents of the YAML file.
56
56
> The contents of your YAML file may be different depending on the sample repo you started with, or upgrades made in Azure Pipelines.
57
57
58
58
59
-
This pipeline runs whenever your team pushes a change to the main branch of your repo or creates a pull request. It runs on a Microsoft-hosted Linux machine. The pipeline process has a single step, which is to run the Maven task.
59
+
The pipeline runs whenever your team pushes a change to the main branch of the repo or creates a pull request. It runs on a Microsoft-hosted Linux machine. The pipeline process has a single step, which is to run the Maven task.
60
60
61
61
## Change the platform to build on
62
62
@@ -71,7 +71,7 @@ You can build your project on [Microsoft-hosted agents](../pipelines/agents/host
71
71
vmImage: "ubuntu-latest"
72
72
```
73
73
74
-
* To choose a different platform like Windows or Mac, change the `vmImage` value:
74
+
* To switch to a different platform like Windows or Mac, change the `vmImage` value:
75
75
76
76
```yaml
77
77
pool:
@@ -94,12 +94,11 @@ You can add more **scripts** or **tasks** as steps to your pipeline. A task is a
94
94
* Add the following snippet to the end of your YAML file.
summaryFileLocation: "$(System.DefaultWorkingDirectory)/**/site/jacoco/jacoco.xml" # Path to summary files
100
+
reportDirectory: "$(System.DefaultWorkingDirectory)/**/site/jacoco" # Path to report directory
101
+
failIfCoverageEmpty: true # Fail if code coverage results are missing
103
102
```
104
103
105
104
* Select **Save** and then confirm the changes.
@@ -249,7 +248,7 @@ From the **Pipeline settings** pane you can configure the following settings.
249
248
* **Paused** pipelines allow run requests to be processed, but those requests are queued without actually starting. When new request processing is enabled, run processing resumes starting with the first request in the queue.
250
249
* **Disabled** pipelines prevent users from starting new runs. All triggers are also disabled while this setting is applied. All build policies using a disabled pipeline will show "Unable to queue Build" message next to the build policy in the PR overview window and the status of the build policy will be broken.
251
250
* **YAML file path** - If you ever need to direct your pipeline to use a different YAML file, you can specify the path to that file. This setting can also be useful if you need to move/rename your YAML file.
252
-
* **Automatically link work items included in this run** - The changes associated with a given pipeline run may have work items associated with them. Select this option to link those work items to the run. When **Automatically link work items included in this run** is selected, you must specify either a specific branch, or `*` for all branches, which is the default. If you specify a branch, work items are only associated with runs of that branch. If you specify `*`, work items are associated for all runs.
251
+
* **Automatically link work items included in this run** - The changes associated with a given pipeline run might have work items associated with them. Select this option to link those work items to the run. When **Automatically link work items included in this run** is selected, you must specify either a specific branch, or `*` for all branches, which is the default. If you specify a branch, work items are only associated with runs of that branch. If you specify `*`, work items are associated for all runs.
253
252
254
253
:::image type="content" source="media/customize-pipeline/link-work-items.png" alt-text="Screenshot of setting to automatically link work items included in this run.":::
255
254
@@ -267,7 +266,7 @@ To support security of your pipeline operations, you can add users to a built-in
267
266
268
267
::: moniker range="azure-devops"
269
268
270
-
YAML pipelines don't have a [Create work item on failure](build/options.md#create-a-work-item-on-failure) setting like classic build pipelines. Classic build pipelines are single stage, and **Create work item on failure** applies to the whole pipeline. YAML pipelines can be multi-stage, and a pipeline level setting may not be appropriate. To implement **Create work item on failure** in a YAML pipeline, you can use methods such as the [Work Items - Create](/rest/api/azure/devops/wit/work-items/create) REST API call or the Azure DevOps CLI [az boards work-item create](/cli/azure/boards/work-item#az-boards-work-item-create) command at the desired point in your pipeline.
269
+
YAML pipelines don't have a [Create work item on failure](build/options.md#create-a-work-item-on-failure) setting like classic build pipelines. Classic build pipelines are single stage, and **Create work item on failure** applies to the whole pipeline. YAML pipelines can be multi-stage, and a pipeline level setting may not be appropriate. To implement **Create work item on failure** in a YAML pipeline, you can use methods such as the [Work Items - Create](/rest/api/azure/devops/wit/work-items/create) REST API call, or the Azure DevOps CLI [az boards work-item create](/cli/azure/boards/work-item#az-boards-work-item-create) command at the desired point in your pipeline.
271
270
272
271
The following example has two jobs. The first job represents the work of the pipeline, but if it fails, the second job runs, and creates a bug in the same project as the pipeline.
Copy file name to clipboardExpand all lines: docs/pipelines/ecosystems/customize-python.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Customize Python pipelines
3
3
description: See how to use Azure Pipelines to customize, build, test, package, and deliver Python apps and code.
4
4
ms.topic: conceptual
5
5
ms.custom: devx-track-python
6
-
ms.date: 07/12/2024
6
+
ms.date: 06/09/2025
7
7
monikerRange: '<= azure-devops'
8
8
---
9
9
@@ -12,7 +12,7 @@ monikerRange: '<= azure-devops'
12
12
This article describes how to customize building, testing, packaging, and delivering Python apps and code in Azure Pipelines. To create your first pipeline with Python, see the [Python quickstart](python.md).
13
13
14
14
::: moniker range=">=azure-devops"
15
-
With [Microsoft-hosted agents](../agents/hosted.md) in Azure Pipelines, you can build your Python apps without having to set up your own infrastructure. Tools that you commonly use to build, test, and run Python apps, including `pip`, are preinstalled.
15
+
With [Microsoft-hosted agents](../agents/hosted.md) in Azure Pipelines, you can build Python apps without setting up your own infrastructure. Tools that you commonly use to build, test, and run Python apps, including `pip`, are preinstalled.
16
16
17
17
You might need to [request the free grant of parallel jobs](https://aka.ms/azpipelines-parallelism-request) or purchase a [parallel job](../licensing/concurrent-jobs.md) to run your pipelines.
To authenticate with `twine`, use the [Python twine upload authenticate task](/azure/devops/pipelines/tasks/reference/twine-authenticate-v1) to store authentication credentials in the `PYPIRC_PATH` environment variable.
199
+
Authenticate with `twine` by using the [Python twine upload authenticate task](/azure/devops/pipelines/tasks/reference/twine-authenticate-v1) to store authentication credentials in the `PYPIRC_PATH` environment variable.
200
200
201
201
```yaml
202
-
- task: TwineAuthenticate@0
202
+
- task: TwineAuthenticate@1
203
203
inputs:
204
204
artifactFeed: '<Azure Artifacts feed name>'
205
205
pythonUploadServiceConnection: '<twine service connection from external organization>'
0 commit comments