Add circleci parameter to build packages

This commit is contained in:
Daniel Nelson 2017-07-25 16:58:25 -07:00
parent 284ab79a37
commit 5f88be022c
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
1 changed files with 10 additions and 2 deletions

View File

@ -73,8 +73,8 @@ cat $GOPATH/bin/telegraf | gzip > $CIRCLE_ARTIFACTS/telegraf.gz
go build -o telegraf-race -race -ldflags "-X main.version=${VERSION}-RACE" cmd/telegraf/telegraf.go
cat telegraf-race | gzip > $CIRCLE_ARTIFACTS/telegraf-race.gz
eval "git describe --exact-match HEAD"
if [ $? -eq 0 ]; then
if git describe --exact-match HEAD; then
# install fpm (packaging dependency)
exit_if_fail gem install fpm
# install boto & rpm (packaging & AWS dependencies)
@ -84,4 +84,12 @@ if [ $? -eq 0 ]; then
echo $tag
exit_if_fail ./scripts/build.py --release --package --platform=all --arch=all --upload --bucket=dl.influxdata.com/telegraf/releases
mv build $CIRCLE_ARTIFACTS
elif [ -n "${PACKAGE}" ]; then
# install fpm (packaging dependency)
exit_if_fail gem install fpm
# install boto & rpm (packaging & AWS dependencies)
exit_if_fail sudo apt-get install -y rpm python-boto
unset GOGC
exit_if_fail ./scripts/build.py --package --platform=all --arch=all
mv build $CIRCLE_ARTIFACTS
fi