azure-pipeline-templates
usage
First find the name of your github service connection
You can find this in Project Settings
=> Service connections
in the
Azure Devops dashboard for your project.
Next add this to the beginning of your azure-pipelines.yml
resources:
repositories:
- repository: asottile
type: github
endpoint: <<<service connection name>>>
name: asottile/azure-pipeline-templates
ref: refs/tags/v0.0.4
this will make the templates in this repository available in the asottile
namespace.
job--python-tox.yml
new in v0.0.1
This job template will install python and invoke tox.
parameters
toxenvs
: the list oftox
environment names to runos
: choices (linux
,windows
,osx
)coverage
: new in v0.0.3 after the run publish coverage to azure pipelines, defaulttrue
The tox environments must either:
- be equal to:
py27
,py34
,py35
,py36
,py37
,py38
- start with:
py27-
,py34-
,py35-
,py36-
,py37-
,py38-
for now, python3.8 is only available on linux -- it is installed from deadsnakes
coverage information can be displayed using a shields.io badge
example
- template: job--python-tox.yml@asottile
parameters:
toxenvs: [py27, py37]
os: windows
job--pre-commit.yml
new in v0.0.2
This job template will invoke pre-commit against all files.
parameters
ruby
: the version of ruby to install to the system (used by some hooks), defaults to'>= 2.4'
python
: the python version to run pre-commit with, defaults to'3.7'
example
- template: job--pre-commit.yml@asottile