]> git.proxmox.com Git - libgit2.git/blame - azure-pipelines/docker.yml
Drop patch that has been merged upstream
[libgit2.git] / azure-pipelines / docker.yml
CommitLineData
6c7cee42
RD
1# These are the steps used in a container-based build in VSTS.
2steps:
ac3d33df
JK
3- ${{ if eq(parameters.qemu, 'true') }}:
4 - script: docker run --rm --privileged multiarch/qemu-user-static:register --reset
5 displayName: 'Register Docker QEMU'
6
0c9c969a
UG
7- task: cache@2
8 displayName: Cache Docker layers
9 inputs:
10 key: docker
11 path: /tmp/dockercache
12- script: |
13 if [ -f /tmp/dockercache/${{parameters.docker.image}}.tar ]; then docker load < /tmp/dockercache/${{parameters.docker.image}}.tar; fi
14 displayName: 'Load Docker cache'
15- script: |
16 cd $(Build.SourcesDirectory)/azure-pipelines/docker &&
17 docker build -t libgit2/${{parameters.docker.image}} --build-arg BASE=${{parameters.docker.base}} -f ${{parameters.docker.image}} . &&
18 if [ ! -d /tmp/dockercache ]; then mkdir /tmp/dockercache; fi &&
19 docker save libgit2/${{parameters.docker.image}} $(docker history -q libgit2/${{parameters.docker.image}} | grep -v '<missing>') > /tmp/dockercache/${{parameters.docker.image}}.tar
20 displayName: 'Build Docker image'
6c7cee42
RD
21- task: docker@0
22 displayName: Build
23 inputs:
24 action: 'Run an image'
0c9c969a 25 imageName: libgit2/${{ parameters.docker.image }}
6c7cee42 26 volumes: |
0c9c969a
UG
27 $(Build.SourcesDirectory):/home/libgit2/source
28 $(Build.BinariesDirectory):/home/libgit2/build
6c7cee42 29 envVars: ${{ parameters.environmentVariables }}
0c9c969a
UG
30 workDir: '/home/libgit2/build'
31 containerCommand: '/home/libgit2/source/azure-pipelines/build.sh'
6c7cee42
RD
32 detached: false
33- task: docker@0
34 displayName: Test
35 inputs:
36 action: 'Run an image'
0c9c969a 37 imageName: libgit2/${{ parameters.docker.image }}
6c7cee42 38 volumes: |
0c9c969a
UG
39 $(Build.SourcesDirectory):/home/libgit2/source
40 $(Build.BinariesDirectory):/home/libgit2/build
6c7cee42 41 envVars: ${{ parameters.environmentVariables }}
0c9c969a
UG
42 workDir: '/home/libgit2/build'
43 containerCommand: '/home/libgit2/source/azure-pipelines/test.sh'
6c7cee42
RD
44 detached: false
45- task: publishtestresults@2
46 displayName: Publish Test Results
47 condition: succeededOrFailed()
48 inputs:
49 testResultsFiles: 'results_*.xml'
50 searchFolder: '$(Build.BinariesDirectory)'
51 mergeTestResults: true