Merge pull request #8617 from influxdata/jw-go-19

Add go1.9 and tsi builders to circle
pull/8616/head
Jason Wilder 2017-07-21 13:03:49 -06:00 committed by GitHub
commit 62534ce5c1
3 changed files with 55 additions and 4 deletions

View File

@ -0,0 +1,38 @@
FROM ubuntu:trusty
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
python-software-properties \
software-properties-common \
wget \
git \
mercurial \
make \
ruby \
ruby-dev \
rpm \
zip \
python \
python-boto \
asciidoc \
xmlto \
docbook-xsl
RUN gem install fpm
# Install go
ENV GOPATH /root/go
ENV GO_VERSION 1.9beta2
ENV GO_ARCH amd64
RUN wget https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz; \
tar -C /usr/local/ -xf /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz ; \
rm /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz
ENV PATH /usr/local/go/bin:$PATH
ENV PROJECT_DIR $GOPATH/src/github.com/influxdata/influxdb
ENV PATH $GOPATH/bin:$PATH
RUN mkdir -p $PROJECT_DIR
WORKDIR $PROJECT_DIR
VOLUME $PROJECT_DIR
ENTRYPOINT [ "/root/go/src/github.com/influxdata/influxdb/build.py" ]

View File

@ -539,7 +539,7 @@ func TestEpochToTime(t *testing.T) {
if e != nil {
t.Fatalf("unexpected error: expected %v, actual: %v", nil, e)
}
if tm != test.expected {
if !tm.Equal(test.expected) {
t.Fatalf("unexpected time: expected %v, actual %v", test.expected, tm)
}
}

19
test.sh
View File

@ -7,7 +7,9 @@
# Corresponding environments for environment_index:
# 0: normal 64bit tests
# 1: race enabled 64bit tests
# 3: normal 32bit tests
# 2: normal 32bit tests
# 3: tsi build
# 4: go 1.9
# save: build the docker images and save them to DOCKER_SAVE_DIR. Do not run tests.
# count: print the number of test environments
# *: to run all tests in parallel containers
@ -33,7 +35,7 @@ TIMEOUT=${TIMEOUT-960s}
DOCKER_RM=${DOCKER_RM-true}
# Update this value if you add a new test environment.
ENV_COUNT=3
ENV_COUNT=5
# Default return code 0
rc=0
@ -145,7 +147,18 @@ case $ENVIRONMENT_INDEX in
run_test_docker Dockerfile_build_ubuntu32 test_32bit --test --junit-report --arch=i386
rc=$?
;;
"save")
3)
# tsi
INFLUXDB_DATA_INDEX_VERSION="tsi1"
run_test_docker Dockerfile_build_ubuntu64 test_64bit --test --junit-report
rc=$?
;;
4)
# go1.9
run_test_docker Dockerfile_build_ubuntu64_go19 test_64bit --test --junit-report
rc=$?
;;
"save")
# Save docker images for every Dockerfile_build* file.
# Useful for creating an external cache.
pids=()