distribution/circle.yml

123 lines
4 KiB
YAML
Raw Permalink Normal View History

2015-01-02 18:14:42 +00:00
# Pony-up!
2014-12-06 03:04:00 +00:00
machine:
pre:
2015-01-02 18:14:42 +00:00
# Install gvm
2014-12-16 19:38:08 +00:00
- bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/1.0.22/binscripts/gvm-installer)
Storage Driver: Ceph Object Storage (RADOS) This driver implements the storagedriver.StorageDriver interface and uses Ceph Object Storage as storage backend. Since RADOS is an object storage and no hierarchy notion, the following convention is used to keep the filesystem notions stored in this backend: * All the objects data are stored with opaque UUID names prefixed (e.g. "blob:d3d232ff-ab3a-4046-9ab7-930228d4c164). * All the hierarchy information are stored in rados omaps, where the omap object identifier is the virtual directory name, the keys in a specific are the relative filenames and the values the blob object identifier (or empty value for a sub directory). e.g. For the following hierarchy: /directory1 /directory1/object1 /directory1/object2 /directory1/directory2/object3 The omap "/directory1" will contains the following key / values: - "object1" "blob:d3d232ff-ab3a-4046-9ab7-930228d4c164" - "object2" "blob:db2e359d-4af0-4bfb-ba1d-d2fd029866a0" - "directory2" "" The omap "/directory1/directory2" will contains: - "object3" "blob:9ae2371c-81fc-4945-80ac-8bf7f566a5d9" * The MOVE is implemented by changing the reference to a specific blob in its parent virtual directory omap. This driver stripes rados objects to a fixed size (e.g. 4M). The idea is to keep small objects (as done by RBD on the top of RADOS) that will be easily synchronized accross OSDs. The information of the original object (i.e total size of the chunks) is stored as a Xattr in the first chunk object. Signed-off-by: Vincent Giersch <vincent.giersch@ovh.net>
2015-04-23 16:13:52 +00:00
# Install ceph to test rados driver & create pool
- sudo -i ~/distribution/contrib/ceph/ci-setup.sh
- ceph osd pool create docker-distribution 1
2014-12-16 19:38:08 +00:00
post:
2015-01-02 18:14:42 +00:00
# Install many go versions
# - gvm install go1.3.3 -B --name=old
- gvm install go1.4.2 -B --name=stable
2015-01-02 18:14:42 +00:00
# - gvm install tip --name=bleed
2014-12-16 19:38:08 +00:00
environment:
2015-01-02 18:14:42 +00:00
# Convenient shortcuts to "common" locations
2014-12-16 19:38:08 +00:00
CHECKOUT: /home/ubuntu/$CIRCLE_PROJECT_REPONAME
BASE_DIR: src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME
2015-01-02 18:14:42 +00:00
# Trick circle brainflat "no absolute path" behavior
2014-12-16 19:38:08 +00:00
BASE_OLD: ../../../$HOME/.gvm/pkgsets/old/global/$BASE_DIR
BASE_STABLE: ../../../$HOME/.gvm/pkgsets/stable/global/$BASE_DIR
2015-01-02 18:14:42 +00:00
# BASE_BLEED: ../../../$HOME/.gvm/pkgsets/bleed/global/$BASE_DIR
Storage Driver: Ceph Object Storage (RADOS) This driver implements the storagedriver.StorageDriver interface and uses Ceph Object Storage as storage backend. Since RADOS is an object storage and no hierarchy notion, the following convention is used to keep the filesystem notions stored in this backend: * All the objects data are stored with opaque UUID names prefixed (e.g. "blob:d3d232ff-ab3a-4046-9ab7-930228d4c164). * All the hierarchy information are stored in rados omaps, where the omap object identifier is the virtual directory name, the keys in a specific are the relative filenames and the values the blob object identifier (or empty value for a sub directory). e.g. For the following hierarchy: /directory1 /directory1/object1 /directory1/object2 /directory1/directory2/object3 The omap "/directory1" will contains the following key / values: - "object1" "blob:d3d232ff-ab3a-4046-9ab7-930228d4c164" - "object2" "blob:db2e359d-4af0-4bfb-ba1d-d2fd029866a0" - "directory2" "" The omap "/directory1/directory2" will contains: - "object3" "blob:9ae2371c-81fc-4945-80ac-8bf7f566a5d9" * The MOVE is implemented by changing the reference to a specific blob in its parent virtual directory omap. This driver stripes rados objects to a fixed size (e.g. 4M). The idea is to keep small objects (as done by RBD on the top of RADOS) that will be easily synchronized accross OSDs. The information of the original object (i.e total size of the chunks) is stored as a Xattr in the first chunk object. Signed-off-by: Vincent Giersch <vincent.giersch@ovh.net>
2015-04-23 16:13:52 +00:00
DOCKER_BUILDTAGS: "include_rados"
2015-01-02 18:14:42 +00:00
# Workaround Circle parsing dumb bugs and/or YAML wonkyness
2014-12-16 19:38:08 +00:00
CIRCLE_PAIN: "mode: set"
Storage Driver: Ceph Object Storage (RADOS) This driver implements the storagedriver.StorageDriver interface and uses Ceph Object Storage as storage backend. Since RADOS is an object storage and no hierarchy notion, the following convention is used to keep the filesystem notions stored in this backend: * All the objects data are stored with opaque UUID names prefixed (e.g. "blob:d3d232ff-ab3a-4046-9ab7-930228d4c164). * All the hierarchy information are stored in rados omaps, where the omap object identifier is the virtual directory name, the keys in a specific are the relative filenames and the values the blob object identifier (or empty value for a sub directory). e.g. For the following hierarchy: /directory1 /directory1/object1 /directory1/object2 /directory1/directory2/object3 The omap "/directory1" will contains the following key / values: - "object1" "blob:d3d232ff-ab3a-4046-9ab7-930228d4c164" - "object2" "blob:db2e359d-4af0-4bfb-ba1d-d2fd029866a0" - "directory2" "" The omap "/directory1/directory2" will contains: - "object3" "blob:9ae2371c-81fc-4945-80ac-8bf7f566a5d9" * The MOVE is implemented by changing the reference to a specific blob in its parent virtual directory omap. This driver stripes rados objects to a fixed size (e.g. 4M). The idea is to keep small objects (as done by RBD on the top of RADOS) that will be easily synchronized accross OSDs. The information of the original object (i.e total size of the chunks) is stored as a Xattr in the first chunk object. Signed-off-by: Vincent Giersch <vincent.giersch@ovh.net>
2015-04-23 16:13:52 +00:00
# Ceph config
RADOS_POOL: "docker-distribution"
2014-12-06 03:04:00 +00:00
hosts:
2015-01-02 18:14:42 +00:00
# Not used yet
2014-12-06 03:04:00 +00:00
fancy: 127.0.0.1
dependencies:
2014-12-16 19:38:08 +00:00
pre:
2015-01-02 18:14:42 +00:00
# Copy the code to the gopath of all go versions
# - >
# gvm use old &&
# mkdir -p "$(dirname $BASE_OLD)" &&
# cp -R "$CHECKOUT" "$BASE_OLD"
2014-12-16 19:38:08 +00:00
- >
gvm use stable &&
mkdir -p "$(dirname $BASE_STABLE)" &&
cp -R "$CHECKOUT" "$BASE_STABLE"
2015-01-02 18:14:42 +00:00
# - >
# gvm use bleed &&
# mkdir -p "$(dirname $BASE_BLEED)" &&
# cp -R "$CHECKOUT" "$BASE_BLEED"
2014-12-16 19:38:08 +00:00
override:
2015-01-02 18:14:42 +00:00
# Install dependencies for every copied clone/go version
# - gvm use old && go get github.com/tools/godep:
# pwd: $BASE_OLD
2014-12-16 19:38:08 +00:00
2015-01-22 22:25:28 +00:00
- gvm use stable && go get github.com/tools/godep:
2014-12-16 19:38:08 +00:00
pwd: $BASE_STABLE
2015-01-22 22:25:28 +00:00
# - gvm use bleed && go get github.com/tools/godep:
2015-01-02 18:14:42 +00:00
# pwd: $BASE_BLEED
2014-12-06 03:04:00 +00:00
post:
2015-01-02 18:14:42 +00:00
# For the stable go version, additionally install linting tools
2014-12-16 19:38:08 +00:00
- >
gvm use stable &&
go get github.com/axw/gocov/gocov github.com/golang/lint/golint
# Disabling goveralls for now
# go get github.com/axw/gocov/gocov github.com/mattn/goveralls github.com/golang/lint/golint
2014-12-06 03:04:00 +00:00
test:
pre:
2015-01-02 18:14:42 +00:00
# Output the go versions we are going to test
# - gvm use old && go version
2014-12-16 19:38:08 +00:00
- gvm use stable && go version
2015-01-02 18:14:42 +00:00
# - gvm use bleed && go version
2014-12-16 19:38:08 +00:00
2015-01-02 18:14:42 +00:00
# FMT
- gvm use stable && test -z "$(gofmt -s -l . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)":
2014-12-16 19:38:08 +00:00
pwd: $BASE_STABLE
2015-01-02 18:14:42 +00:00
# VET
2014-12-16 19:38:08 +00:00
- gvm use stable && go vet ./...:
pwd: $BASE_STABLE
2015-01-02 18:14:42 +00:00
# LINT
- gvm use stable && test -z "$(golint ./... | grep -v Godeps/_workspace/src/ | tee /dev/stderr)":
2014-12-16 19:38:08 +00:00
pwd: $BASE_STABLE
2014-12-06 03:04:00 +00:00
override:
2015-01-02 18:14:42 +00:00
# Test every version we have (but stable)
# - gvm use old; godep go test -test.v -test.short ./...:
# timeout: 600
# pwd: $BASE_OLD
2015-01-02 18:14:42 +00:00
# - gvm use bleed; go test -test.v -test.short ./...:
# timeout: 600
# pwd: $BASE_BLEED
# Test stable, and report
# Preset the goverall report file
2014-12-17 19:55:24 +00:00
- echo "$CIRCLE_PAIN" > ~/goverage.report
- gvm use stable; go list ./... | xargs -L 1 -I{} rm -f $GOPATH/src/{}/coverage.out:
pwd: $BASE_STABLE
- gvm use stable; go list -tags "$DOCKER_BUILDTAGS" ./... | xargs -L 1 -I{} godep go test -tags "$DOCKER_BUILDTAGS" -test.short -coverprofile=$GOPATH/src/{}/coverage.out {}:
2014-12-16 19:38:08 +00:00
timeout: 600
pwd: $BASE_STABLE
2014-12-06 03:04:00 +00:00
2014-12-16 19:38:08 +00:00
post:
2015-01-02 18:14:42 +00:00
# Aggregate and report to coveralls
2014-12-17 19:55:24 +00:00
- gvm use stable; go list ./... | xargs -L 1 -I{} cat "$GOPATH/src/{}/coverage.out" | grep -v "$CIRCLE_PAIN" >> ~/goverage.report:
pwd: $BASE_STABLE
# - gvm use stable; goveralls -service circleci -coverprofile=/home/ubuntu/goverage.report -repotoken $COVERALLS_TOKEN:
# pwd: $BASE_STABLE
2014-12-16 19:38:08 +00:00
2015-01-02 18:14:42 +00:00
## Notes
# Disabled coveralls reporting: build breaking sending coverage data to coveralls
2015-01-02 18:14:42 +00:00
# Disabled the -race detector due to massive memory usage.
# Do we want these as well?
# - go get code.google.com/p/go.tools/cmd/goimports
# - test -z "$(goimports -l -w ./... | tee /dev/stderr)"
# http://labix.org/gocheck