ci: fixup ci for jewel and kraken

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
This commit is contained in:
Noah Watkins 2017-01-12 09:52:03 -08:00
parent dba6a108d6
commit fd5c141175
3 changed files with 52 additions and 20 deletions

View File

@ -1,30 +1,26 @@
dist: trusty
sudo: required
language: go
branches:
except:
- gh-pages
matrix:
include:
- env: CEPH_RELEASE=jewel
- env: CEPH_RELEASE=kraken
before_install:
- ssh-keygen -f $HOME/.ssh/id_rsa -t rsa -N ''
- cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
- chmod 600 ~/.ssh/authorized_keys
- sudo pip install ceph-deploy
- ceph-deploy install --release giant `hostname`
- ceph-deploy pkg --install librados-dev `hostname`
- ceph-deploy pkg --install librbd-dev `hostname`
- ceph-deploy pkg --install libcephfs-dev `hostname`
- sudo apt-get update
- ci/before_install.sh
- bash ci/micro-osd.sh /tmp/micro-ceph
- export CEPH_CONF=/tmp/micro-ceph/ceph.conf
- ceph status
script:
- go get -t -v ./...
- go test -v ./...
- go fmt ./...
notifications:
recipients:
- noahwatkins@gmail.com
email:
on_success: always
on_failure: always
- go get -t -v ./...
- go list ./...
- go test -v $(go list ./... | grep -v cephfs)
- go fmt ./...

27
ci/before_install.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
set -e
set -x
sudo apt-get install -y python-virtualenv
# ceph-deploy and ceph
WORKDIR=$HOME/workdir
mkdir $WORKDIR
pushd $WORKDIR
ssh-keygen -f $HOME/.ssh/id_rsa -t rsa -N ''
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
git clone git://github.com/ceph/ceph-deploy
pushd ceph-deploy
./bootstrap
./ceph-deploy install --release ${CEPH_RELEASE} `hostname`
./ceph-deploy pkg --install librados-dev `hostname`
./ceph-deploy pkg --install librbd-dev `hostname`
./ceph-deploy pkg --install libcephfs-dev `hostname`
popd # ceph-deploy
popd # workdir

View File

@ -100,10 +100,19 @@ ceph osd pool create cephfs_metadata 8
ceph fs new cephfs cephfs_metadata cephfs_data
ceph-mds -i a
export CEPH_CONF="${DIR}/ceph.conf"
while true; do
if ceph status | tee /dev/tty | grep -q HEALTH_OK; then
if ! ceph status | grep -q creating &> /dev/null; then
break
fi
fi
sleep 1
done
# check that it works
rados --pool rbd put group /etc/group
rados --pool rbd get group ${DIR}/group
diff /etc/group ${DIR}/group
ceph osd tree
export CEPH_CONF="${DIR}/ceph.conf"