forked from bhazard/sqlbeat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
52 lines (46 loc) · 1.45 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
45
46
47
48
49
50
51
52
sudo: true
dist: xenial
language: go
go:
- 1.9.4
os:
- linux
services:
- docker
env:
global:
- GOX_FLAGS="-arch amd64"
- DOCKER_IMAGE=alectolytic/rpmbuilder
- COPR_REPOSITORY=sqlbeat
- OS_ARCH=x86_64
matrix:
- OS_TYPE=fedora OS_DIST=fedora OS_VERSION=27
- OS_TYPE=centos OS_DIST=epel OS_VERSION=7
addons:
apt:
sources:
- sourceline: 'ppa:hnakamur/copr-cli'
packages:
- python-virtualenv
- python3-copr-cli
before_install:
# Redo the travis setup but with the elastic/libbeat path. This is needed so the package path is correct
- sudo add-apt-repository ppa:hnakamur/copr-cli -y
- sudo apt-get -qq update
- sudo apt-get -y install python3-copr-cli
- mkdir -p $HOME/gopath/src/github.com/abraverm/sqlbeat
- rsync -az ${TRAVIS_BUILD_DIR}/ $HOME/gopath/src/github.com/abraverm/sqlbeat/
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/github.com/abraverm/sqlbeat
- cd $HOME/gopath/src/github.com/abraverm/sqlbeat
- go get github.com/Masterminds/glide
install: true
script:
- make update-deps
- make check
- make testsuite
- go build
- docker run -v ${PWD}:/sources -v ${PWD}:/output:Z ${DOCKER_IMAGE}:${OS_TYPE}-${OS_VERSION}
after_success:
- openssl aes-256-cbc -K $encrypted_52ba645f9e60_key -iv $encrypted_52ba645f9e60_iv -in .copr.enc -out .copr -d
- copr-cli -h
- if [ ! -z "${TRAVIS_TAG}" ]; then copr-cli --config .copr build --nowait -r ${OS_DIST}-${OS_VERSION}-${OS_ARCH} ${COPR_REPOSITORY} *.src.rpm; fi