Skip to content

Commit

Permalink
Add build for go 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilder committed Jul 21, 2017
1 parent 01145d4 commit 2c33919
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 3 deletions.
38 changes: 38 additions & 0 deletions Dockerfile_build_ubuntu64_go19
Original file line number Diff line number Diff line change
@@ -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" ]
2 changes: 1 addition & 1 deletion client/influxdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
10 changes: 8 additions & 2 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# 1: race enabled 64bit 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
Expand All @@ -34,7 +35,7 @@ TIMEOUT=${TIMEOUT-960s}
DOCKER_RM=${DOCKER_RM-true}

# Update this value if you add a new test environment.
ENV_COUNT=4
ENV_COUNT=5

# Default return code 0
rc=0
Expand Down Expand Up @@ -152,7 +153,12 @@ case $ENVIRONMENT_INDEX in
run_test_docker Dockerfile_build_ubuntu64 test_64bit --test --junit-report
rc=$?
;;
"save")
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=()
Expand Down

0 comments on commit 2c33919

Please sign in to comment.