-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcircle.yml
More file actions
100 lines (70 loc) · 3.07 KB
/
Copy pathcircle.yml
File metadata and controls
100 lines (70 loc) · 3.07 KB
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
95
96
97
98
99
# Pony-up!
machine:
services:
- docker
environment:
# Buildtags
MY_BUILDTAGS: ""
MY_PROJECT: "$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME"
dependencies:
override:
# Buid it to test ourselves
- docker build -t dmp42/scape-go:testing -f Dockerfile.testing .
# Other projects should just pull it
# - docker pull dmp42/scape-go:testing
test:
pre:
# Use future
- ./scape gvm use future
# WORKAROUND https://github.com/docker/distribution/issues/807
# Build everything. This will catch compile errors, and it's also necessary for go vet to work properly.
- ./scape go install \$SCAPE_PKGS
override:
- docker exec testing my make fmt
- docker exec testing my make vet
- docker exec testing my make lint
- docker exec testing my gvm use stable
- export ROOT_PACKAGE=$(docker exec testing my go list .)
- $(docker exec testing my go list -tags \"$DOCKER_BUILDTAGS\" ./... | grep -v ^github.com/docker/distribution/vendor)
\
| xargs -L 1 -I{} bash -c 'export PACKAGE={}; go test -tags "$DOCKER_BUILDTAGS" -test.short -coverprofile=$GOPATH/src/$PACKAGE/coverage.out -coverpkg=$(./coverpkg.sh $PACKAGE $ROOT_PACKAGE) $PACKAGE':
- docker exec testing my export PKGS="$(docker exec testing my go list ./... | grep -v ^github.com/docker/distribution/vendor)"
post:
# Report to codecov
- bash <(curl -s https://codecov.io/bash)
# export ROOT_PACKAGE=$(go list .); go list -tags "$DOCKER_BUILDTAGS" ./... | xargs -L 1 -I{} bash -c 'export PACKAGE={}; go test -tags "$DOCKER_BUILDTAGS" -test.short -coverprofile=$GOPATH/src/$PACKAGE/coverage.out -coverpkg=$(./coverpkg.sh $PACKAGE $ROOT_PACKAGE) $PACKAGE'
#deployment:
# hub:
# branch: master
# commands:
# - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
# - docker push circleci/elasticsearch
environment:
# Convenient shortcuts to "common" locations
CHECKOUT: /home/ubuntu/$CIRCLE_PROJECT_REPONAME
BASE_DIR: src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME
# Trick circle brainflat "no absolute path" behavior
BASE_STABLE: ../../../$HOME/.gvm/pkgsets/stable/global/$BASE_DIR
DOCKER_BUILDTAGS: "include_rados include_oss include_gcs"
# Workaround Circle parsing dumb bugs and/or YAML wonkyness
CIRCLE_PAIN: "mode: set"
# Ceph config
RADOS_POOL: "docker-distribution"
# Support for go1.5
GO15VENDOREXPERIMENT: 1
hosts:
# Not used yet
fancy: 127.0.0.1
dependencies:
override:
# Install dependencies for every copied clone/go version
- gvm use stable && go get github.com/tools/godep:
pwd: $BASE_STABLE
test:
pre:
override:
# Disabled the -race detector due to massive memory usage.
# Test, and report
- gvm use stable; export ROOT_PACKAGE=$(go list .); go list -tags "$DOCKER_BUILDTAGS" ./... | xargs -L 1 -I{} bash -c 'export PACKAGE={}; go test -tags "$DOCKER_BUILDTAGS" -test.short -coverprofile=$GOPATH/src/$PACKAGE/coverage.out -coverpkg=$(./coverpkg.sh $PACKAGE $ROOT_PACKAGE) $PACKAGE':
timeout: 600
pwd: $BASE_STABLE