This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
forked from honeycombio/rdslogs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
44 lines (36 loc) · 1.65 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
os:
- linux
- osx
language: go
dist: trusty
group: deprecated-2017Q4
go:
- "1.13"
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y build-essential rpm; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then gem install fpm; fi
script:
- go test github.com/honeycombio/rdslogs/... -bench=.
- go vet ./...
after_success:
- rm $GOPATH/bin/rdslogs
- go install -ldflags "-X main.BuildID=1.${TRAVIS_BUILD_NUMBER}" github.com/honeycombio/rdslogs/...
- $GOPATH/bin/rdslogs --write_default_config > ./rdslogs.conf
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./build-pkg.sh -v "1.${TRAVIS_BUILD_NUMBER}" -t deb; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./build-pkg.sh -v "1.${TRAVIS_BUILD_NUMBER}" -t rpm; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo -n "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t "honeycombio/rdslogs:1.${TRAVIS_BUILD_NUMBER}" .; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker push honeycombio/rdslogs; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then
docker tag "honeycombio/rdslogs:1.${TRAVIS_BUILD_NUMBER}" honeycombio/rdslogs:latest;
docker push honeycombio/rdslogs:latest;
fi
fi
addons:
artifacts:
debug: true
paths:
- $GOPATH/bin