Skip to content

A collection of common Azure Pipeline tasks to be used across out projects

Notifications You must be signed in to change notification settings

andrea-putzu/azure-pipeline-templates

 
 

Repository files navigation

azure-pipeline-templates

A collection of common Azure Pipeline tasks to be used across out projects

Usage

Templates are meant to be included into a project pipeline. Please refer to this guide for examples.

Best practices

  • Always include templates in your pipeline specifying the reference tag, so a new template version can never break your CI/CD workflow.
  • When writing templates, make little-to-no use of default values. Instead, pretend the host pipeline to provide them.

Available templates

Devops

Development

Contributing

Create a new template

  • Create a dedicated folder in /templates, with the name of the template.
  • Please remember that templates are not inheritedly bound to any specific project or tech: if the template works only on a specific context, make it explicit (example: prefer npm-publish to publish when writing a template to publish a module on npm).
  • In the folder create a yaml file (naming isn't really important, you can call it index.yaml or template.yaml).
  • In the same folder add a specific README file with:
    • a brief description of the template
    • an example snippet to describe usage
    • a full parameters table
  • Add an entry in the Available templates section of the repo main README (this file), with a link to the README of the template you just created.

Testing

We have a pipeline configured on this project to run test against the templates we produce. Although Azure Pipelines' DSL is not designed for a test-first approach, it's worth to try. Assets, mocks and scripts used for testings can be placed in .devops/__tests__ folder.

Tests are configured to run on every Pull Request and there's no way ton run tests locally, so far. To use a red-green-refactor approach, the best we can do is to work on a branch and open a draft PR on that.

Release a new version

New versions are created automatically on each merge on master branch. It's done automatically using Github Action .github/workflows/release.yml

Pipelines & Infra

To allow execute the azure devops pipeline .devops/test-development-pipelines.yaml we use this repos:

About

A collection of common Azure Pipeline tasks to be used across out projects

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 83.8%
  • JavaScript 16.2%