Quickstart - Use Azure Pipelines to build and publish a Node.js package
TFS 2018
You can use an Azure DevOps pipeline to build, deploy, and test JavaScript apps.
This quickstart walks through how to use a pipeline to create a Node.js package with Node Package Manager (npm) and publish a pipeline artifact.
Fork the following repo at GitHub.
https://github.com/Azure-Samples/js-e2e-express-server
After you have the sample code in your own repository, create your first pipeline and select the Empty process template.
Select Process under the Tasks tab in the pipeline editor and change the properties as follows:
- Agent queue:
Hosted Ubuntu Latest
- Agent queue:
Add the following tasks to the pipeline in the specified order:
npm
- Command:
install
- Command:
npm
- Display name:
npm test
- Command:
custom
- Command and arguments:
test
- Display name:
Publish Test Results
- Leave all the default values for properties
Archive Files
- Root folder or file to archive:
$(System.DefaultWorkingDirectory)
- Prepend root folder name to archive paths: Unchecked
- Root folder or file to archive:
Publish Build Artifacts
- Leave all the default values for properties
Save the pipeline and queue a build to see it in action.
Next steps
Congratulations, you've successfully completed this quickstart!