forked from docker/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
81 lines (74 loc) · 2.22 KB
/
circle.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
version: 2
jobs:
lint:
working_directory: /work
docker: [{image: 'docker:17.05-git'}]
steps:
- checkout
- setup_remote_docker
- run:
command: docker version
- run:
name: "Lint"
command: |
dockerfile=dockerfiles/Dockerfile.lint
echo "COPY . ." >> $dockerfile
docker build -f $dockerfile --tag cli-linter .
docker run cli-linter
cross:
working_directory: /work
docker: [{image: 'docker:17.05-git'}]
steps:
- checkout
- setup_remote_docker
- run:
name: "Cross"
command: |
dockerfile=dockerfiles/Dockerfile.cross
echo "COPY . ." >> $dockerfile
docker build -f $dockerfile --tag cli-builder .
docker run --name cross cli-builder make cross
docker cp cross:/go/src/github.com/docker/cli/build /work/build
- store_artifacts:
path: /work/build
test:
working_directory: /work
docker: [{image: 'docker:17.05-git'}]
steps:
- checkout
- setup_remote_docker
- run:
name: "Unit Test with Coverage"
command: |
dockerfile=dockerfiles/Dockerfile.dev
echo "COPY . ." >> $dockerfile
docker build -f $dockerfile --tag cli-builder .
docker run --name test cli-builder make test-coverage
- run:
name: "Upload to Codecov"
command: |
docker cp test:/go/src/github.com/docker/cli/coverage.txt coverage.txt
apk add -U bash curl
curl -s https://codecov.io/bash | bash
validate:
working_directory: /work
docker: [{image: 'docker:17.05-git'}]
steps:
- checkout
- setup_remote_docker
- run:
name: "Validate Vendor, Docs, and Code Generation"
command: |
dockerfile=dockerfiles/Dockerfile.dev
echo "COPY . ." >> $dockerfile
rm -f .dockerignore # include .git
docker build -f $dockerfile --tag cli-builder .
docker run cli-builder make -B vendor compose-jsonschema manpages yamldocs
workflows:
version: 2
ci:
jobs:
- lint
- cross
- test
- validate