-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathazure-pipelines.yml
61 lines (51 loc) · 1.6 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# On a windows host install the requirmenets as a minimanl check that they are correct.
# On a Linux host use a container to tests the application.
trigger:
- master
jobs:
- job: 'Build'
pool:
vmImage: 'windows-2019'
strategy:
matrix:
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
maxParallel: 4
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x86'
- script: python -m pip install --upgrade pip && pip install -r requirements/requirements.txt
displayName: 'Install dependencies'
- job: 'Test'
dependsOn: Build
pool:
vmImage: 'ubuntu-16.04'
steps:
# prefer simple scripts instead of specific tasks if it does work
- script: mkdir junit
- script: docker build -t hosszubalazs/evil_snek .
- script: docker run -v $(Build.SourcesDirectory)/junit:/home/work/junit hosszubalazs/evil_snek
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Docker based testing'
condition: succeededOrFailed()
- task: Docker@1
displayName: Tag image
inputs:
command: tag
containerregistrytype: 'Container Registry'
dockerRegistryEndpoint: 'hosszubalazs_dockerhub'
imageName: hosszubalazs/evil_snek
arguments: hosszubalazs/evil_snek:$(Build.BuildId)
- task: Docker@1
displayName: Push image
inputs:
command: push
containerregistrytype: 'Container Registry'
dockerRegistryEndpoint: 'hosszubalazs_dockerhub'
imageName: hosszubalazs/evil_snek:$(Build.BuildId)