2017-04-27 17:07:51 -04:00
|
|
|
version: 2
|
2017-06-14 18:44:06 -04:00
|
|
|
|
2017-04-27 17:07:51 -04:00
|
|
|
jobs:
|
2017-06-14 18:44:06 -04:00
|
|
|
|
|
|
|
lint:
|
2017-05-03 20:55:52 -04:00
|
|
|
working_directory: /work
|
2017-06-22 19:49:04 -04:00
|
|
|
docker: [{image: 'docker:17.05-git'}]
|
2017-04-27 17:07:51 -04:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- setup_remote_docker
|
2017-06-09 15:50:42 -04:00
|
|
|
- run:
|
|
|
|
command: docker version
|
2017-05-02 16:40:29 -04:00
|
|
|
- run:
|
|
|
|
name: "Lint"
|
2017-05-02 15:10:03 -04:00
|
|
|
command: |
|
2017-05-12 12:07:57 -04:00
|
|
|
dockerfile=dockerfiles/Dockerfile.lint
|
|
|
|
echo "COPY . ." >> $dockerfile
|
|
|
|
docker build -f $dockerfile --tag cli-linter .
|
2017-05-02 15:10:03 -04:00
|
|
|
docker run cli-linter
|
2017-06-14 18:44:06 -04:00
|
|
|
|
|
|
|
cross:
|
|
|
|
working_directory: /work
|
2017-06-22 19:49:04 -04:00
|
|
|
docker: [{image: 'docker:17.05-git'}]
|
2017-06-14 18:44:06 -04:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- setup_remote_docker
|
2017-05-02 15:10:03 -04:00
|
|
|
- run:
|
2017-05-03 20:55:52 -04:00
|
|
|
name: "Cross"
|
2017-05-02 16:40:29 -04:00
|
|
|
command: |
|
2017-05-12 12:07:57 -04:00
|
|
|
dockerfile=dockerfiles/Dockerfile.cross
|
|
|
|
echo "COPY . ." >> $dockerfile
|
|
|
|
docker build -f $dockerfile --tag cli-builder .
|
2017-05-03 20:55:52 -04:00
|
|
|
docker run --name cross cli-builder make cross
|
|
|
|
docker cp cross:/go/src/github.com/docker/cli/build /work/build
|
2017-06-14 18:44:06 -04:00
|
|
|
- store_artifacts:
|
|
|
|
path: /work/build
|
|
|
|
|
|
|
|
test:
|
|
|
|
working_directory: /work
|
2017-06-22 19:49:04 -04:00
|
|
|
docker: [{image: 'docker:17.05-git'}]
|
2017-06-14 18:44:06 -04:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- setup_remote_docker
|
2017-05-03 20:55:52 -04:00
|
|
|
- run:
|
2017-05-18 10:42:05 -04:00
|
|
|
name: "Unit Test with Coverage"
|
2017-05-03 20:55:52 -04:00
|
|
|
command: |
|
2017-05-12 12:07:57 -04:00
|
|
|
dockerfile=dockerfiles/Dockerfile.dev
|
|
|
|
echo "COPY . ." >> $dockerfile
|
|
|
|
docker build -f $dockerfile --tag cli-builder .
|
2017-05-18 10:42:05 -04:00
|
|
|
docker run --name test cli-builder make test-coverage
|
2017-06-14 18:44:06 -04:00
|
|
|
|
|
|
|
- run:
|
|
|
|
name: "Upload to Codecov"
|
|
|
|
command: |
|
2017-05-18 10:42:05 -04:00
|
|
|
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
|
2017-06-14 18:44:06 -04:00
|
|
|
|
|
|
|
validate:
|
|
|
|
working_directory: /work
|
2017-06-22 19:49:04 -04:00
|
|
|
docker: [{image: 'docker:17.05-git'}]
|
2017-06-14 18:44:06 -04:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- setup_remote_docker
|
2017-05-02 16:40:29 -04:00
|
|
|
- run:
|
2017-06-14 16:42:58 -04:00
|
|
|
name: "Validate Vendor, Docs, and Code Generation"
|
2017-05-02 16:40:29 -04:00
|
|
|
command: |
|
2017-05-12 12:07:57 -04:00
|
|
|
dockerfile=dockerfiles/Dockerfile.dev
|
|
|
|
echo "COPY . ." >> $dockerfile
|
2017-06-06 15:02:28 -04:00
|
|
|
rm -f .dockerignore # include .git
|
2017-05-12 12:07:57 -04:00
|
|
|
docker build -f $dockerfile --tag cli-builder .
|
2017-06-14 16:42:58 -04:00
|
|
|
docker run cli-builder make -B vendor compose-jsonschema manpages yamldocs
|
2017-05-03 20:55:52 -04:00
|
|
|
|
2017-06-14 18:44:06 -04:00
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
ci:
|
|
|
|
jobs:
|
|
|
|
- lint
|
|
|
|
- cross
|
|
|
|
- test
|
|
|
|
- validate
|