2017-04-27 17:07:51 -04:00
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
build:
|
2017-05-03 20:55:52 -04:00
|
|
|
working_directory: /work
|
2017-04-27 17:07:51 -04:00
|
|
|
docker:
|
2017-05-08 13:20:12 -04:00
|
|
|
- image: docker:17.05
|
2017-05-03 20:55:52 -04:00
|
|
|
parallelism: 4
|
2017-04-27 17:07:51 -04:00
|
|
|
steps:
|
2017-05-08 13:20:12 -04:00
|
|
|
- run:
|
|
|
|
name: "Install Git and SSH"
|
2017-05-03 20:55:52 -04:00
|
|
|
command: apk add -U git openssh
|
2017-04-27 17:07:51 -04:00
|
|
|
- checkout
|
|
|
|
- setup_remote_docker
|
2017-05-02 16:40:29 -04:00
|
|
|
- run:
|
|
|
|
name: "Lint"
|
2017-05-02 15:10:03 -04:00
|
|
|
command: |
|
2017-05-03 20:55:52 -04:00
|
|
|
if [ "$CIRCLE_NODE_INDEX" != "0" ]; then exit; fi
|
2017-05-02 15:10:03 -04:00
|
|
|
docker build -f dockerfiles/Dockerfile.lint --tag cli-linter .
|
|
|
|
docker run cli-linter
|
|
|
|
- run:
|
2017-05-03 20:55:52 -04:00
|
|
|
name: "Cross"
|
2017-05-02 16:40:29 -04:00
|
|
|
command: |
|
2017-05-03 20:55:52 -04:00
|
|
|
if [ "$CIRCLE_NODE_INDEX" != "1" ]; then exit; fi
|
2017-05-02 16:40:29 -04:00
|
|
|
docker build -f dockerfiles/Dockerfile.ci --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
|
|
|
|
- run:
|
|
|
|
name: "Unit Test"
|
|
|
|
command: |
|
|
|
|
if [ "$CIRCLE_NODE_INDEX" != "2" ]; then exit; fi
|
|
|
|
docker build -f dockerfiles/Dockerfile.ci --tag cli-builder .
|
|
|
|
docker run cli-builder make test
|
2017-05-02 16:40:29 -04:00
|
|
|
- run:
|
|
|
|
name: "Vendor"
|
|
|
|
command: |
|
2017-05-03 20:55:52 -04:00
|
|
|
if [ "$CIRCLE_NODE_INDEX" != "3" ]; then exit; fi
|
|
|
|
docker build -f dockerfiles/Dockerfile.ci --tag cli-builder .
|
2017-05-08 16:14:14 -04:00
|
|
|
docker run cli-builder make -B vendor
|
2017-05-03 20:55:52 -04:00
|
|
|
|
|
|
|
- store_artifacts:
|
|
|
|
path: /work/build
|