Merge pull request #11 from quantum/add-circle-build

Add circleci support
This commit is contained in:
Bassam Tabbara authored and GitHub committed 2016-09-12 14:38:51 -07:00
commit 494c1043f3
8 files changed
+106 -9

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
[submodule "ceph"]
path = ceph
url = git@github.com:quantum/ceph
url = https://github.com/quantum/ceph.git
branch = wip-embedded-ceph
+2 -1
View File
@@ -94,7 +94,7 @@ build: vendor ceph
@echo "##### configuring ceph"
cd ceph/build && cmake $(CEPHD_CMAKE) ..
@echo "##### building ceph"
cd ceph/build && $(MAKE) $(MFLAGS) cephd
cd ceph/build && $(MAKE) $(MAKEFLAGS) $(MFLAGS) cephd
ifeq ($(DEBUG),0)
@echo "##### stripping libcephd.a"
strip -S ceph/build/lib/libcephd.a
@@ -104,6 +104,7 @@ endif
@echo "##### building castlectl"
go build $(BUILDFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o bin/castlectl ./cmd/castlectl
.PHONY: ceph
ceph:
git submodule update --init --recursive
+1
View File
@@ -1,2 +1,3 @@
# Castle - Software Defined Storage
[![Circle CI](https://circleci.com/gh/quantum/castle.svg?style=svg&circle-token=2b2ee7eb7f621e612a76f861353e141a8caaf8dd)](https://circleci.com/gh/quantum/castle)
+57
View File
@@ -0,0 +1,57 @@
FROM ubuntu:xenial
MAINTAINER Bassam Tabbara <bassam.tabbara@quantum.com>
# git version 2.6.6+ through 2.8.3 had a bug with submodules
# see https://github.com/git/git/blob/master/Documentation/RelNotes/2.8.3.txt#L33
# this is why we are adding a newer verion of git than is available on xenial
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E1DF1F24 && \
echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu xenial main" > /etc/apt/sources.list.d/git.list && \
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq \
build-essential \
ca-certificates \
cmake \
curl \
cython \
cython3 \
git \
golang-1.6 \
libaio-dev \
libatomic-ops-dev \
libblkid-dev \
libboost-date-time-dev \
libboost-dev \
libboost-iostreams-dev \
libboost-program-options-dev \
libboost-random-dev \
libboost-regex-dev \
libboost-system-dev \
libboost-thread-dev \
libcrypto++-dev \
libcurl4-openssl-dev \
libexpat1-dev \
libfcgi-dev \
libgoogle-perftools-dev \
libjemalloc-dev \
libkeyutils-dev \
libldap2-dev \
libleveldb-dev \
libsnappy-dev \
libssl-dev \
libudev-dev \
python-sphinx \
python-dev \
python3-all-dev \
xfslibs-dev \
yasm \
--no-install-recommends && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/lib/go-1.6/bin:$PATH
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
VOLUME $GOPATH/src/github.com/quantum/castle
WORKDIR $GOPATH/src/github.com/quantum/castle
ENTRYPOINT [ "/bin/bash", "-c" ]
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash -e
scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $scriptdir/build-container
docker build -t quantum/castle-build .
docker push quantum/castle-build
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash -e
scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# git version 2.6.6+ through 2.8.3 had a bug with submodules
# see https://github.com/git/git/blob/master/Documentation/RelNotes/2.8.3.txt#L33
function ver {
printf "%d%03d%03d%03d" $(echo "$1" | tr '.' ' ')
}
gitversion=$(git --version | cut -d" " -f3)
if (( $(ver ${gitversion}) > $(ver 2.6.6) && $(ver ${gitversion}) < $(ver 2.8.3) )); then
echo WARN: your running git version ${gitversion} which has a bug realted to relative
echo WARN: submodule paths. Please consider upgrading to 2.8.3 or later
fi
docker run \
-it \
-v ${HOME}/.netrc:/root/.netrc \
-v ${scriptdir}/..:/go/src/github.com/quantum/castle \
quantum/castle-build \
"$*"
+17
View File
@@ -0,0 +1,17 @@
machine:
environment:
NPROCS: 16
services:
- docker
dependencies:
override:
- docker info
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker pull quantum/castle-build
- echo -e "machine github.com\n\tlogin quantumbuild\n\tpassword $GITHUB_TOKEN" > ~/.netrc
- ./build/run-build.sh make -j$NPROCS build
test:
override:
- echo no tests
-7
View File
@@ -1,7 +0,0 @@
FROM ubuntu:16.04
MAINTAINER Bassam Tabbara <bassam.tabbara@quantum.com>
VOLUME /ceph
VOLUME /build
ENTRYPOINT ["/tmp/entrypoint.sh", "/tmp/micro-ceph"]