Skip to content

Commit e9a003a

Browse files
committed
final formatting
1 parent 94953a4 commit e9a003a

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

docs/extend/develop/add-build-task.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ customer-intent: As a developer, I want to create custom build and release tasks
1919

2020
This guide walks you through creating, testing, and publishing custom build or release tasks as Azure DevOps extensions. Custom pipeline tasks let you extend Azure DevOps with specialized functionality tailored to your team's workflows, from simple utilities to complex integrations with external systems.
2121

22-
You learn how to:
22+
Learn how to do the following tasks:
2323
- Set up the development environment and project structure
2424
- Create task logic using TypeScript and the Azure Pipelines Task Library
2525
- Implement comprehensive unit testing with mock frameworks
@@ -96,8 +96,8 @@ Create the basic project structure and install required dependencies:
9696
9797
The `package.json` file gets created with default settings. The `--yes` flag accepts all default options automatically.
9898

99-
> [!TIP]
100-
> Azure Pipelines agents expect task folders to include node modules. Copy `node_modules` to your `buildandreleasetask` folder. To manage VSIX file size (50-MB limit), consider running `npm install --production` or `npm prune --production` before packaging.
99+
> [!TIP]
100+
> Azure Pipelines agents expect task folders to include node modules. Copy `node_modules` to your `buildandreleasetask` folder. To manage VSIX file size (50-MB limit), consider running `npm install --production` or `npm prune --production` before packaging.
101101
102102
2. Install the Azure Pipelines Task Library:
103103

@@ -346,12 +346,12 @@ Before packaging, test your task to ensure it works correctly:
346346

347347
This action should trigger the error handling path in your code.
348348

349-
> [!TIP]
350-
> For information about task runners and Node.js versions, see [Node runner update guidance](https://devblogs.microsoft.com/devops/node-runner-update-guidance-for-azure-pipelines-task-authors/#upcoming-changes).
349+
> [!TIP]
350+
> For information about task runners and Node.js versions, see [Node runner update guidance](https://devblogs.microsoft.com/devops/node-runner-update-guidance-for-azure-pipelines-task-authors/#upcoming-changes).
351351
352352
For more information, see the [Build/release task reference](./integrate-build-task.md).
353353

354-
## Step 2: Implement comprehensive unit testing
354+
## 2. Implement comprehensive unit testing
355355

356356
Testing your task thoroughly ensures reliability and helps catch issues before deployment to production pipelines.
357357

@@ -527,8 +527,8 @@ The extension manifest (`vss-extension.json`) contains all information about you
527527
1. Create an images folder with an `extension-icon.png` file
528528
2. Create `vss-extension.json` in your extension's root directory (not in the task folder):
529529

530-
```json
531-
{
530+
```json
531+
{
532532
"manifestVersion": 1,
533533
"id": "my-custom-tasks",
534534
"name": "My Custom Tasks",
@@ -563,8 +563,8 @@ The extension manifest (`vss-extension.json`) contains all information about you
563563
}
564564
}
565565
]
566-
}
567-
```
566+
}
567+
```
568568

569569
#### Key manifest properties
570570

@@ -661,7 +661,7 @@ After sharing, install the extension to your Azure DevOps organization:
661661

662662
<a name="packagetask"></a>
663663

664-
## Step 3: Package and publish your extension
664+
## 3. Package and publish your extension
665665

666666
### Verify your extension
667667

@@ -683,13 +683,12 @@ After installation, verify your task works correctly:
683683

684684
<a name="createbuildrelease"></a>
685685

686-
## Step 4: Automate extension publishing with CI/CD
686+
## 4. Automate extension publishing with CI/CD
687687

688688
To maintain your custom task effectively, create automated build and release pipelines that handle testing, packaging, and publishing.
689689

690690
### Prerequisites for automation
691691

692-
- **Azure DevOps project**: [Create a project](../../organizations/projects/create-project.md?tabs=preview-page) if needed
693692
- **Azure DevOps Extension Tasks**: [Install the extension](https://marketplace.visualstudio.com/items?itemName=ms-devlabs.vsts-developer-tools-build-tasks) for free
694693
- **Variable group**: Create a [pipeline library variable group](../../pipelines/library/variable-groups.md?tabs=classic) with these variables:
695694
- `publisherId`: Your marketplace publisher ID
@@ -881,6 +880,8 @@ Add test scripts to your `package.json`:
881880
- **Security**: Use service connections instead of hardcoded credentials
882881
- **Monitoring**: Set up alerts for failed deployments
883882

883+
For classic build pipelines, follow these steps to set up extension packaging and publishing:
884+
884885
1. Add the `Bash` task to compile the TypeScript into JavaScript.
885886
1. To query the existing version, add the **Query Extension Version** task using the following inputs:
886887
- Connect to: Visual Studio Marketplace
@@ -942,11 +943,11 @@ Install your shared extension in a few steps:
942943

943944
1. Go to **Organization settings** and select **Extensions**.
944945

945-
2. Locate your extension in the **Extensions Shared With Me** section
946+
2. Locate your extension in the **Extensions Shared With Me** section:
946947
- Select the extension link
947948
- Select **Get it free** or **Install**
948949

949-
3. Check that the extension appears in your **Installed** extensions list
950+
3. Check that the extension appears in your **Installed** extensions list:
950951
- Confirm it's available in your pipeline task library
951952

952953
> [!NOTE]

0 commit comments

Comments
 (0)