/
config.yml
94 lines (93 loc) · 3.49 KB
/
config.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
version: 2
jobs:
test_ssl:
docker:
- image: docker:20.10.16
steps:
- checkout
- setup_remote_docker
- run: docker create -v /certs --name certs alpine:3.4 /bin/true
- run: docker run --rm -e SSL_SUBJECT=test.example.com -e SSL_DNS=test.example.com --volumes-from certs paulczar/omgwtfssl
- run: docker run -h test.example.com --volumes-from certs -d --privileged --name test-docker-daemon docker:stable-dind --storage-driver=overlay --tlsverify --tlscacert=/certs/ca.pem --tlscert=/certs/cert.pem --tlskey=/certs/key.pem
- run: docker run --rm --volumes-from certs --privileged --rm --entrypoint=chmod docker:stable-dind 644 /certs/key.pem /certs/ca-key.pem
- run: docker build -t bollard .
- run: docker run -ti -e DOCKER_CERT_PATH=/certs -e DOCKER_HOST='tcp://test.example.com:2376' --volumes-from certs --rm --link test-docker-daemon:docker bollard cargo test --features test_ssl,ct_logs -- --test test_version_ssl
test_http:
docker:
- image: docker:20.10.16
steps:
- checkout
- setup_remote_docker
- run: docker run -e DOCKER_TLS_CERTDIR="" --rm -h test.example.com -d --privileged --name test-docker-daemon docker:stable-dind --storage-driver=overlay
- run: docker build -t bollard .
- run: docker run -ti -e DOCKER_HOST='tcp://test.example.com:2375' --rm --link test-docker-daemon:docker bollard cargo test --features test_http -- --test test_version_http
test_unix:
docker:
- image: docker:20.10.16
steps:
- checkout
- setup_remote_docker
- run: docker build -t bollard .
- run: dockerfiles/bin/run_integration_tests.sh --tests
test_chrono:
docker:
- image: docker:20.10.16
steps:
- checkout
- setup_remote_docker
- run: docker build -t bollard .
- run: dockerfiles/bin/run_integration_tests.sh --features chrono --tests
test_time:
docker:
- image: docker:20.10.16
steps:
- checkout
- setup_remote_docker
- run: docker build -t bollard .
- run: dockerfiles/bin/run_integration_tests.sh --features time --tests
test_doc:
docker:
- image: docker:20.10.16
steps:
- checkout
- setup_remote_docker
- run: docker build -t bollard .
- run: docker run -ti --rm bollard cargo test --features time --target x86_64-unknown-linux-gnu --doc
test_clippy:
docker:
- image: docker:20.10.16
steps:
- checkout
- setup_remote_docker
- run: docker build -t bollard .
- run: docker run -ti --rm bollard bash -c "rustup component add clippy && cargo clippy --all-targets -- -Dwarnings -Aclippy::upper_case_acronyms"
test_audit:
docker:
- image: docker:20.10.16
steps:
- checkout
- setup_remote_docker
- run: docker build -t bollard .
# RUSTSEC-2020-0159 https://github.com/chronotope/chrono/issues/602
- run: docker run -ti --rm bollard bash -c "cargo install cargo-audit && cargo audit --deny warnings --ignore=RUSTSEC-2020-0159 --ignore=RUSTSEC-2020-0071"
test_fmt:
docker:
- image: docker:20.10.16
steps:
- checkout
- setup_remote_docker
- run: docker build -t bollard .
- run: docker run -ti --rm bollard bash -c "rustup component add rustfmt && cargo fmt -- --check --verbose"
workflows:
version: 2
test-image:
jobs:
- test_ssl
- test_http
- test_unix
- test_chrono
- test_time
- test_doc
- test_clippy
- test_audit
- test_fmt