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-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
|
|
|
|
- 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-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
|
|
|
|
- run:
|
2017-05-18 10:42:05 -04:00
|
|
|
name: "Unit Test with Coverage"
|
2017-05-03 20:55:52 -04:00
|
|
|
command: |
|
|
|
|
if [ "$CIRCLE_NODE_INDEX" != "2" ]; then exit; fi
|
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
|
|
|
|
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-05-02 16:40:29 -04:00
|
|
|
- run:
|
2017-05-09 15:37:22 -04:00
|
|
|
name: "Validate Vendor and Code Generation"
|
2017-05-02 16:40:29 -04:00
|
|
|
command: |
|
2017-05-03 20:55:52 -04:00
|
|
|
if [ "$CIRCLE_NODE_INDEX" != "3" ]; then exit; fi
|
2017-05-12 12:07:57 -04:00
|
|
|
dockerfile=dockerfiles/Dockerfile.dev
|
|
|
|
echo "COPY . ." >> $dockerfile
|
|
|
|
docker build -f $dockerfile --tag cli-builder .
|
2017-05-09 15:37:22 -04:00
|
|
|
docker run cli-builder make -B vendor compose-jsonschema
|
2017-05-03 20:55:52 -04:00
|
|
|
|
|
|
|
- store_artifacts:
|
|
|
|
path: /work/build
|