This repository has been archived by the owner on Apr 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.drone.yml
147 lines (130 loc) · 3.28 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
136
137
138
139
140
141
142
143
144
145
146
147
---
clone:
git:
image: quay.io/packet/drone-git
tags: true
pipeline:
build_osie_test_env_image:
image: docker
commands:
- docker build -t osie-test-env ci
- mkdir build
- touch build/osie-test-env
volumes:
- /var/run/docker.sock:/var/run/docker.sock
shfmt:
group: ci1
image: nixos/nix
commands:
- export LANG=en_US.UTF-8
- nix-shell --run 'shfmt -d $(git ls-files "*.sh")'
shellcheck:
group: ci1
image: koalaman/shellcheck-alpine
commands:
- shellcheck installer/*.sh ci/*.sh
- cd docker/scripts
- shellcheck -x *.sh
py_fmt_and_lint:
group: ci1
image: nixos/nix
commands:
- export LANG=en_US.UTF-8
- nix-shell --run 'black -t py35 --check --diff --exclude "scripts/eng-tools" .'
- nix-shell --run 'pylama docker $(ls osie-runner | grep -v hegel)'
osie_runner_pytest:
group: ci1
image: python:3.6-alpine
commands:
- pip install dpath==1.5.0 faker pytest pytest-cov
- cd osie-runner
- pytest -vv --cov=./
build_aarch64:
group: ci1
image: osie-test-env
commands:
- make V=1 T=1 build/osie-aarch64.tar.gz
volumes:
- /var/run/docker.sock:/var/run/docker.sock
build_x86_64:
group: ci1
image: osie-test-env
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
network_test:
group: ci1
image: osie-test-env
privileged: true
commands:
- make T=1 test-packet-networking
osie_scripts_test:
group: ci1
image: osie-test-env
commands:
- find docker/tests -executable -name 'test_*.sh' -execdir {} ';'
generate_coverage_xml:
image: osie-test-env
commands:
- coverage combine build/network-coverage/.coverage osie-runner/.coverage
- coverage report
- coverage xml
# codecov:
# image: plugins/codecov
# secrets:
# - codecov_token
package_common:
image: osie-test-env
commands:
- make -j$(nproc) fetch
- make -j$(nproc) package-common
package:
image: osie-test-env
commands:
- make -j$(nproc) package
when:
event:
- push
- tag
upload:
image: 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
test_aarch64_vm:
group: test
image: osie-test-env
privileged: true
commands:
- OSES=ubuntu_16_04 make V=1 T=1 UEFI=true test-aarch64
test_x86_64_vm:
group: test
image: osie-test-env
privileged: true
commands:
- OSES=ubuntu_16_04 make V=1 T=1 test-x86_64
# slack:
# image: plugins/slack
# username: ${SLACK_WEBHOOK_USER}
# channel: ${SLACK_WEBHOOK_CHANNEL}
# webhook: ${SLACK_WEBHOOK_URL}
# icon_url: https://raw.githubusercontent.com/drone/brand/master/logos/png/drone-logo-dark_128.png
# when:
# event:
# - push
# - tag
# secrets:
# - slack_webhook_user
# - slack_webhook_channel
# - slack_webhook_url