-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathimage-pipeline.yml
40 lines (38 loc) · 1020 Bytes
/
image-pipeline.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
variables:
sdk_version: '5.1.0'
${{ if eq(variables['Build.Reason'], 'PullRequest')}}:
branch: $(System.PullRequest.TargetBranchName)
${{ else }}:
branch: $(Build.SourceBranchName)
trigger:
branches:
include:
- main
paths:
include:
- sdcard-images-utils/nxp
exclude:
- sdcard-images-utils/README.md
- sdcard-images-utils/nxp/README.md
jobs:
- job: Image_build
pool:
name: Default
demands:
- agent.name -equals ToF
timeoutInMinutes: 120
steps:
- checkout: self
fetchDepth: 1
submodules: true
clean: true
persistCredentials: true
- script: |
cd sdcard-images-utils/nxp
./runme.sh $(sdk_version) $(branch) main
exit_status="$?"
if [ -d "$(Build.Repository.LocalPath)/sdcard-images-utils/nxp/build/ubuntu/rootfs_tmp" ] && [ $exit_status != 0 ]; then
sudo umount $(Build.Repository.LocalPath)/sdcard-images-utils/nxp/build/ubuntu/rootfs_tmp
fi
exit $exit_status
displayName: 'Build image'