Skip to content

Commit e79c29c

Browse files
authored
Merge pull request #81 from rchicoli/development
add unittests
2 parents a7255b0 + 320380c commit e79c29c

File tree

15 files changed

+426
-438
lines changed

15 files changed

+426
-438
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ before_install:
2121
# - ${TRAVIS_BUILD_DIR}/vendor/gopkg.in
2222

2323
script:
24-
# - echo
2524
- sudo make || exit 1
2625
# - sudo make integration_tests || exit 1
2726
# - sudo make acceptance_tests || exit 1
@@ -61,7 +60,7 @@ matrix:
6160
if: type IN (pull_request)
6261

6362
- stage: release
64-
# env: MAJOR_RELEASE=true
63+
env: MAJOR_RELEASE=true
6564
# it would be nice to map github labels instead
6665
# env: RELEASE_TAG=0.3.0
6766
if: type IN (push)

Dockerfile

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,30 @@ ARG GOARM=
77
WORKDIR /go/src/github.com/rchicoli/docker-log-elasticsearch
88
COPY . .
99

10-
RUN apk add --no-cache git
10+
RUN apk add --no-cache git curl
11+
12+
# install dep
13+
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
14+
15+
# RUN go get -d -v ./...
16+
RUN dep ensure -v
17+
18+
# vendor/github.com/docker/docker/pkg/term/tc_linux_cgo.go:10:22:
19+
# exec: "gcc": executable file not found in $PATH
20+
# fatal error: termios.h: No such file or directory
21+
RUN apk add --no-cache dev86 gcc musl-dev
22+
23+
# https://github.com/docker-library/golang/issues/86
24+
RUN go list ./...
25+
RUN go test -cover ./...
1126

12-
RUN go get -d -v ./...
1327
RUN CGO_ENABLED=0 go build -v -a -installsuffix cgo -o /usr/bin/docker-log-elasticsearch
1428

1529
FROM alpine:3.7
1630

17-
# RUN apk --no-cache add ca-certificates
18-
RUN apk --no-cache add tzdata
1931
# TZ required to set the localtime
2032
# TZ can be set with docker plugin command
33+
RUN apk --no-cache add tzdata
2134

2235
COPY --from=builder /usr/bin/docker-log-elasticsearch /usr/bin/
2336
WORKDIR /usr/bin

Dockerfile.local

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM alpine:3.7
2+
3+
ARG GOOS=linux
4+
ARG GOARCH=amd64
5+
ARG GOARM=
6+
7+
COPY docker-log-elasticsearch /usr/bin/
8+
9+
# TZ required to set the localtime
10+
# TZ can be set with docker plugin command
11+
RUN apk --no-cache add tzdata
12+
13+
WORKDIR /usr/bin
14+
ENTRYPOINT [ "/usr/bin/docker-log-elasticsearch" ]

Gopkg.lock

Lines changed: 198 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Gopkg.toml example
2+
#
3+
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
4+
# for detailed Gopkg.toml documentation.
5+
#
6+
# required = ["github.com/user/thing/cmd/thing"]
7+
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
8+
#
9+
# [[constraint]]
10+
# name = "github.com/user/project"
11+
# version = "1.0.0"
12+
#
13+
# [[constraint]]
14+
# name = "github.com/user/project2"
15+
# branch = "dev"
16+
# source = "github.com/myfork/project2"
17+
#
18+
# [[override]]
19+
# name = "github.com/x/y"
20+
# version = "2.4.0"
21+
#
22+
# [prune]
23+
# non-go = false
24+
# go-tests = true
25+
# unused-packages = true
26+
27+
28+
[[constraint]]
29+
name = "github.com/Sirupsen/logrus"
30+
version = "0.11.0"
31+
32+
[[constraint]]
33+
name = "github.com/docker/docker"
34+
version = "17.5.0-ce-rc3"
35+
36+
[[constraint]]
37+
name = "github.com/olivere/elastic"
38+
version = "6.1.4"
39+
40+
[[constraint]]
41+
name = "github.com/robfig/cron"
42+
version = "1.0.0"
43+
44+
[[constraint]]
45+
name = "github.com/vjeantet/grok"
46+
version = "1.0.0"
47+
48+
[[constraint]]
49+
branch = "master"
50+
name = "golang.org/x/sync"
51+
52+
[[constraint]]
53+
name = "gopkg.in/olivere/elastic.v2"
54+
version = "2.0.60"
55+
56+
[[constraint]]
57+
name = "gopkg.in/olivere/elastic.v3"
58+
version = "3.0.69"
59+
60+
[[constraint]]
61+
name = "gopkg.in/olivere/elastic.v5"
62+
version = "5.0.52"
63+
64+
[prune]
65+
go-tests = true
66+
unused-packages = true

0 commit comments

Comments
 (0)