Hi, 👋. This repository holds azure pipeline templates that can be reused in your projects.
Documentation can be found in Microsoft pages: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops#passing-parameters.
- keep the main pipeline file in
azure-pipelines.yml
in the root of the repository if you have one pipeline only - if you go multi pipeline, keep your pipeline ymls in
.azure-pipelines
- for templates create:
.azure-pipelines/templates
directory and keep the templates there
step-assume-role-arn.yml
- sets credentials of the assumed rolestep-setup-go-cache.yml
- sets golang and go mod caching of the$GOPATH/mod/pkg
directorystep-install-ssh-key
- installs SSH key and adds github and bithucket to known hosts. PUBLIC_KEY and secure file with PRIVATE key is required.step-backup-dynamodb
- backups dynamoDB tables with the given prefix.step-set-tag-output
- git tag helper validation.step-trigger-amplify-console-build
- triggers Amplify pipeline build so that you have visbility in your Azure pipelinesjob-trigger-pipeline-multiple-times
- A pipeline that triggers a secondary pipeline an x amount of times. Used in a project previously to trigger a Virtual Machine creation pipeline with identical parameters.
If you copy a template to your repo:
- template: templates/step-cache-go-mod.yml
parameters:
path: $(GOPATH)/pkg/mod
Or if you want to reference it direcly from this repository, first define it in the resources
section.
resources:
repositories:
- repository: 'nordcloud-templates'
type: 'github'
name: 'nordcloud/azure-pipelines-templates'
endpoint: 'nordcloud'
and then you can refer it with a repository name:
- template: 'step-set-tag-output.yml@nordcloud-templates'
Check the docs for more.
Adding new template should be done by a PR to this repository. File naming convention is {type}-yourname.yml
, where {type}
should be either: step, job or stage
depending on the type of template.
Inside the template file add a comment manifest, example:
# Version: 0.1
# Maintainer: Dariusz Dwornikowski
# Parameters:
# version: version of the tool (string)
You can also add any comment that explains how template parameters are to used.
MIT
Nordcloud, and IBM company