File tree Expand file tree Collapse file tree 5 files changed +13
-4
lines changed Expand file tree Collapse file tree 5 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ RUN apt-get update && apt-get install -y \
1414 rsyslog \
1515 ruby \
1616 zlib1g-dev \
17- ruby-dev
17+ ruby-dev \
18+ jq
1819
1920RUN gem install fpm
2021
Original file line number Diff line number Diff line change @@ -23,6 +23,12 @@ install -m 0644 ${HOLOGRAM_DIR}/agent/support/darwin/com.adroll.hologram-me.plis
2323install -m 0755 ${HOLOGRAM_DIR} /agent/support/darwin/postinstall.sh /hologram-build/darwin/scripts/postinstall
2424install -m 0755 ${HOLOGRAM_DIR} /agent/support/darwin/preinstall.sh /hologram-build/darwin/scripts/preinstall
2525
26+ # Special handling for custom host override
27+ if [[ -n " $HOLOGRAM_HOST " ]]
28+ then
29+ cat " ${HOLOGRAM_DIR} /config/agent.json" | jq " . + {\" host\" : \" $HOLOGRAM_HOST \" }" > /hologram-build/darwin/root/etc/hologram/agent.json
30+ fi
31+
2632NUM_FILES=$( find /hologram-build/darwin/root | wc -l)
2733INSTALL_KB_SIZE=$( du -k -s /hologram-build/darwin/root | awk ' {print $1}' )
2834
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ source ${HOLOGRAM_DIR}/buildscripts/returncodes.sh
77export GIT_TAG=$( git describe --tags --long)
88
99echo " Compiling for linux..."
10- GOOS=linux go install -ldflags=" -X 'main.Version=${GIT_TAG} '" github.com/AdRoll/hologram/... || exit ${ERRCOMPILE}
10+ GOOS=linux go install -ldflags=" -X 'main.Version=${GIT_TAG} '" github.com/AdRoll/hologram/... || exit ${ERRCOMPILE}
1111
1212echo " Compiling for osx"
1313GOOS=darwin go install -ldflags=" -X 'main.Version=${GIT_TAG} '" github.com/AdRoll/hologram/... || exit ${ERRCOMPILE}
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ source ${HOLOGRAM_DIR}/buildscripts/returncodes.sh
44
55rsyslogd # Believe it or not you need syslog to test hologram
66
7+ export HOLOGRAM_HOST=" $2 "
8+
79if [ " $1 " == " build_linux" ]; then
810 compile_hologram.sh --deps || exit $?
911 build_linux_pkgs.sh || exit $?
Original file line number Diff line number Diff line change 11#! /bin/bash
2- # docker build -t adroll/hologram_env .
3- docker run --rm -t -i -v $( pwd) :/go/src/github.com/AdRoll/hologram adroll/hologram_env $1
2+ docker build -t adroll/hologram_env .
3+ docker run --rm -t -i -v $( pwd) :/go/src/github.com/AdRoll/hologram adroll/hologram_env $1 $2
You can’t perform that action at this time.
0 commit comments