Skip to content

Commit

Permalink
Merge pull request #297 from gliderlabs/master
Browse files Browse the repository at this point in the history
v3.2.1
  • Loading branch information
michaelshobbs authored Apr 14, 2017
2 parents c0d52ea + 3d76d78 commit 4c858b1
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 41 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ All notable changes to this project will be documented in this file.

### Changed


## [v3.2.1] - 2017-04-13
### Fix
- @michaelshobbs build: fix missing ca-certificates. closes #294

### Added
- @michaelshobbs build: add tls test case

### Changed
- @michaelshobbs use circleci 2.0

## [v3.2] - 2017-04-13
### Fixed
- @ekkinox FIX: add build-base package install to fix missing gcc
Expand Down Expand Up @@ -52,7 +63,6 @@ All notable changes to this project will be documented in this file.
- @michaelshobbs make vet more reliable
- @luketurner Don't retry sending on ECONNRESET


## [v3.1] - 2016-05-23
### Fixed
- Panic when renaming stopped container #183
Expand Down
31 changes: 26 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@ build:
docker build -t $(NAME):$(VERSION) .
docker save $(NAME):$(VERSION) | gzip -9 > build/$(NAME)_$(VERSION).tgz

build-custom:
docker tag $(NAME):$(VERSION) gliderlabs/$(NAME):master
cd custom && docker build -t $(NAME):custom .

lint:
test -x $(GOPATH)/bin/golint || go get github.com/golang/lint/golint
go get \
&& go install $(GOPACKAGES) \
&& ls -d */ | egrep -v 'custom/|vendor/' | xargs $(XARGS_ARG) go tool vet -v
&& go tool vet -v $(shell ls -d */ | egrep -v 'custom|vendor/' | xargs $(XARGS_ARG))
@if [ -n "$(shell $(GOLINT) | cut -d ':' -f 1)" ]; then $(GOLINT) && exit 1 ; fi

test: build-dev
Expand All @@ -56,14 +60,32 @@ test-image-size:
exit 2; \
fi

test-build-custom:
docker tag $(NAME):$(VERSION) gliderlabs/$(NAME):master
cd custom && docker build -t $(NAME):custom .
test-tls:
docker run -d --name $(NAME)-tls \
-v /var/run/docker.sock:/var/run/docker.sock \
$(NAME):$(VERSION) syslog+tls://logs3.papertrailapp.com:54202
sleep 2
docker logs $(NAME)-tls
docker inspect --format='{{ .State.Running }}' $(NAME)-tls | grep true
docker stop $(NAME)-tls || true
docker rm $(NAME)-tls || true

test-custom:
docker run --name $(NAME)-custom $(NAME):custom || true
docker logs $(NAME)-custom | grep -q logstash
docker rmi gliderlabs/$(NAME):master || true
docker rm $(NAME)-custom || true

test-tls-custom:
docker run -d --name $(NAME)-tls-custom \
-v /var/run/docker.sock:/var/run/docker.sock \
$(NAME):custom syslog+tls://logs3.papertrailapp.com:54202
sleep 2
docker logs $(NAME)-tls-custom
docker inspect --format='{{ .State.Running }}' $(NAME)-tls-custom | grep true
docker stop $(NAME)-tls-custom || true
docker rm $(NAME)-tls-custom || true

release:
rm -rf release && mkdir release
go get github.com/progrium/gh-release/...
Expand All @@ -72,7 +94,6 @@ release:
$(shell git rev-parse --abbrev-ref HEAD) $(VERSION)

circleci:
rm ~/.gitconfig
ifneq ($(CIRCLE_BRANCH), release)
echo build-$$CIRCLE_BUILD_NUM > VERSION
endif
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v3.2
v3.2.1
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
set -e
apk add --update go git mercurial build-base
apk add --update go build-base git mercurial ca-certificates
mkdir -p /go/src/github.com/gliderlabs
cp -r /src /go/src/github.com/gliderlabs/logspout
cd /go/src/github.com/gliderlabs/logspout
Expand Down
71 changes: 39 additions & 32 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,39 @@
machine:
environment:
DEBUG: true
GO_PROJECT: ../go/src/github.com/gliderlabs/$CIRCLE_PROJECT_REPONAME
services:
- docker

dependencies:
pre:
- go get github.com/golang/lint/golint
- make circleci
override:
- make build
post:
- cp build/* $CIRCLE_ARTIFACTS

test:
pre:
- mkdir -p ~/.go_workspace/src/github.com/gliderlabs
- mv ~/logspout ~/.go_workspace/src/github.com/gliderlabs/
- ln -s ~/.go_workspace/src/github.com/gliderlabs/logspout ~/
- make lint
override:
- make -e test
- make -e test-image-size
- make -e test-build-custom

deployment:
release:
branch: release
commands:
- make release
version: 2
jobs:
build:
machine: true
working_directory: ~/.go_workspace/src/github.com/gliderlabs/
environment:
DEBUG: true
GO_PROJECT: ../go/src/github.com/gliderlabs/$CIRCLE_PROJECT_REPONAME
steps:
- checkout
- run: |
go get github.com/golang/lint/golint
- run: |
make circleci
- run: |
make lint
- run: |
make build
- run: |
make build-custom
- run: |
make -e test-image-size
- run: |
make -e test
- run: |
make -e test-tls
- run: |
make -e test-custom
- run: |
make -e test-tls-custom
- store_artifacts:
path: build
destination: build
- deploy:
name: release
command: |
if [ "${CIRCLE_BRANCH}" == "release" ]; then
make release
fi
2 changes: 1 addition & 1 deletion custom/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
set -e
apk add --update go git mercurial build-base
apk add --update go build-base git mercurial ca-certificates
mkdir -p /go/src/github.com/gliderlabs
cp -r /src /go/src/github.com/gliderlabs/logspout
cd /go/src/github.com/gliderlabs/logspout
Expand Down
2 changes: 2 additions & 0 deletions custom/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ package main
import (
_ "github.com/gliderlabs/logspout/adapters/syslog"
_ "github.com/gliderlabs/logspout/transports/tcp"
_ "github.com/gliderlabs/logspout/transports/tls"
_ "github.com/gliderlabs/logspout/transports/udp"
_ "github.com/looplab/logspout-logstash"
)

0 comments on commit 4c858b1

Please sign in to comment.