This repository has been archived by the owner on Dec 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
/
.drone.yml
135 lines (119 loc) · 3 KB
/
.drone.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
---
osie-test-env: &osie-test-env
image: osie-test-env:${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:8}
clone:
git:
image: quay.io/packet/drone-git
tags: true
pull: true
pipeline:
build_osie_test_env_image:
image: docker
commands:
- docker build -t osie-test-env:${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:8} ci
- mkdir build
- touch build/osie-test-env
volumes:
- /var/run/docker.sock:/var/run/docker.sock
avoid-builing-alpine-files:
image: alpine
commands:
- ./installer/alpine/skip-building-alpine-files
ci-checks:
image: nixos/nix:2.3.4
group: ci1
commands:
- ./ci-checks.sh
osie_runner_pytest:
image: python:3.6-alpine
group: ci1
commands:
- pip install dpath==1.5.0 faker pytest pytest-cov
- cd osie-runner
- pytest -vv --cov=./
build_discover_metal:
<<: *osie-test-env
group: ci1
commands:
- make V=1 T=1 build/discover-metal-x86_64.tar.gz
volumes:
- /var/run/docker.sock:/var/run/docker.sock
build_aarch64:
<<: *osie-test-env
group: ci1
commands:
- make V=1 T=1 build/osie-aarch64.tar.gz
volumes:
- /var/run/docker.sock:/var/run/docker.sock
build_x86_64:
<<: *osie-test-env
group: ci1
commands:
- make V=1 T=1 build/osie-x86_64.tar.gz
- make V=1 T=1 build/osie-runner-x86_64.tar.gz
volumes:
- /var/run/docker.sock:/var/run/docker.sock
osie_scripts_test:
<<: *osie-test-env
group: ci1
commands:
- find docker/tests -executable -name 'test_*.sh' -execdir {} ';'
generate_coverage_xml:
<<: *osie-test-env
commands:
- coverage combine osie-runner/.coverage
- coverage report
- coverage xml
package_common:
<<: *osie-test-env
commands:
- make -j$(nproc) package-common
package:
<<: *osie-test-env
commands:
- make -j$(nproc) package
when:
event:
- push
- tag
upload:
<<: *osie-test-env
commands:
- set -v +x
- mc config host add s3 'https://s3.amazonaws.com' "$AWS_ACCESS_KEY_ID" "$AWS_SECRET_ACCESS_KEY" --api s3v4
- set +v -x
- make deploy
when:
event:
- push
- tag
secrets:
- aws_access_key_id
- aws_secret_access_key
upload-pr:
<<: *osie-test-env
commands:
- set -v +x
- mc config host add s3 'https://s3.amazonaws.com' "$AWS_ACCESS_KEY_ID" "$AWS_SECRET_ACCESS_KEY" --api s3v4
- set +v -x
- make deploy
when:
event:
- pull_request
secrets:
- source: public_aws_access_key_id
target: aws_access_key_id
- source: public_aws_secret_access_key
target: aws_secret_access_key
test_aarch64_vm:
<<: *osie-test-env
group: test
privileged: true
commands:
- OSES=ubuntu_16_04 make V=1 T=1 UEFI=true test-aarch64
test_x86_64_vm:
<<: *osie-test-env
group: test
privileged: true
commands:
- OSES=ubuntu_16_04 make V=1 T=1 test-x86_64