Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Commit

Permalink
Add goreleaser support (linkedin#293)
Browse files Browse the repository at this point in the history
* Add a simple goreleaser config
* Add docker to goreleaser
  • Loading branch information
Todd Palino authored Dec 3, 2017
1 parent 89f072a commit cffd70e
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 56 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
burrow-src
.*.swp
!config
dist
log
.idea
*.cov
Expand Down
36 changes: 36 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# .goreleaser.yml
# Build customization
builds:
- main: main.go
binary: burrow
goos:
- windows
- darwin
- linux
goarch:
- amd64
# Archive customization
archive:
format: tar.gz
files:
- LICENSE
- NOTICE
- README.md
- CHANGELOG.md
- config/burrow.toml
- config/default-email.tmpl
- config/default-http-delete.tmpl
- config/default-http-post.tmpl
- config/default-slack-delete.tmpl
- config/default-slack-post.tmpl
dockers:
-
goos: linux
goarch: amd64
goarm: ''
binary: burrow
image: toddpalino/burrow
dockerfile: Dockerfile
latest: true
extra_files:
- docker-config/burrow.toml
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ before_script:
- go get honnef.co/go/tools/cmd/megacheck # Badass static analyzer/linter
- go get github.com/fzipp/gocyclo
- go get github.com/mattn/goveralls
- go get github.com/goreleaser/goreleaser

# script always run to completion (set +e). All of these code checks are must haves
# in a modern Go project.
Expand All @@ -50,5 +51,8 @@ script:
- gocyclo -over 15 $GO_FILES # forbid code with huge functions
- golint -set_exit_status $(go list ./...) # one last linter

# If the build succeeds, send coverage to coveralls
# goreleaser will run if the latest version tag matches the current commit
after_success:
- $GOPATH/bin/goveralls -coverprofile=profile.cov -service=travis-ci
- if [[ "$TRAVIS_GO_VERSION" == "1.9.2" ]]; then goreleaser; fi
24 changes: 5 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
FROM golang:alpine

FROM iron/go
MAINTAINER LinkedIn Burrow "https://github.com/linkedin/Burrow"

RUN apk add --no-cache curl bash git ca-certificates wget \
&& update-ca-certificates \
&& curl -sSO https://raw.githubusercontent.com/pote/gpm/v1.4.0/bin/gpm \
&& chmod +x gpm \
&& mv gpm /usr/local/bin

ADD . $GOPATH/src/github.com/linkedin/Burrow
RUN cd $GOPATH/src/github.com/linkedin/Burrow \
&& gpm install \
&& go install \
&& mv $GOPATH/bin/Burrow $GOPATH/bin/burrow \
&& apk del git curl wget

ADD docker-config /etc/burrow

WORKDIR /var/tmp/burrow
WORKDIR /app
ADD burrow /app/
ADD burrow.toml /etc/burrow/

CMD ["/go/bin/burrow", "--config", "/etc/burrow/burrow.cfg"]
CMD ["/app/burrow", "--config-dir", "/etc/burrow"]
29 changes: 0 additions & 29 deletions docker-config/burrow.cfg

This file was deleted.

29 changes: 29 additions & 0 deletions docker-config/burrow.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[zookeeper]
servers=[ "zookeeper:2181" ]
timeout=6
root-path="/burrow"

[cluster.local]
class-name="kafka"
servers=[ "kafka:9092" ]
topic-refresh=60
offset-refresh=30

[consumer.local]
class-name="kafka"
cluster="local"
servers=[ "kafka:9092" ]
group-blacklist="^(console-consumer-|python-kafka-consumer-).*$"
group-whitelist=""

[consumer.local_zk]
class-name="kafka_zk"
cluster="local"
servers=[ "zookeeper:2181" ]
zookeeper-path="/local"
zookeeper-timeout=30
group-blacklist="^(console-consumer-|python-kafka-consumer-).*$"
group-whitelist=""

[httpserver.default]
address=":8000"
8 changes: 0 additions & 8 deletions docker-config/logging.cfg

This file was deleted.

0 comments on commit cffd70e

Please sign in to comment.