Remove spurious build output and group Docker RUNs

Group RUN commands in Dockerfile template
Run git checkout in quiet mode so that we do not
get any suprious output looking like errors
(Like: ... You are in 'detached HEAD' state ...)

Change-Id: I00edbdc36110f2e75ef9a3044bfd6077edc1916a
This commit is contained in:
Olivier Bourdon 2016-08-24 17:10:03 +02:00
parent 273b5e4d3c
commit 36c37a3b10
2 changed files with 13 additions and 12 deletions

View File

@ -1,11 +1,10 @@
FROM {{ namespace }}/base-tools:{{ tag }}
MAINTAINER {{ maintainer }}
RUN mkdir -p /etc/snap/auto
# install Go and Snap
ADD install.sh /tmp/
RUN apt-get -y -t jessie-backports --no-install-recommends install golang \
&& mkdir -p /etc/snap/auto \
&& bash /tmp/install.sh /etc/snap/auto \
&& rm /tmp/install.sh \
&& useradd --user-group snap \

View File

@ -24,6 +24,8 @@ chmod -R 777 "$GOPATH"
export PATH=/usr/local/go/bin:$GOPATH/bin/:$PATH
GIT_OPTS="-q"
go get github.com/tools/godep
# Get Snap
@ -35,63 +37,63 @@ go get -d github.com/intelsdi-x/snap
REFSPEC="c4a90ddf785835a3d6d830eb0292aa418b2bcd9e"
go get -d github.com/intelsdi-x/snap-plugin-collector-cpu
cd $GOPATH/src/github.com/intelsdi-x/snap-plugin-collector-cpu
git checkout ${REFSPEC}
git checkout ${GIT_OPTS} ${REFSPEC}
make deps
# https://github.com/intelsdi-x/snap-plugin-collector-df/commit/411e248ccf2c3897548a08336470b6390e9f6e68
REFSPEC="411e248ccf2c3897548a08336470b6390e9f6e68"
go get -d github.com/intelsdi-x/snap-plugin-collector-df
cd $GOPATH/src/github.com/intelsdi-x/snap-plugin-collector-df
git checkout ${REFSPEC}
git checkout ${GIT_OPTS} ${REFSPEC}
make deps
# https://github.com/intelsdi-x/snap-plugin-collector-disk/commit/8af1b89502c584aba37c18da1d12313cee53f8a0
REFSPEC="8af1b89502c584aba37c18da1d12313cee53f8a0"
go get -d github.com/intelsdi-x/snap-plugin-collector-disk
cd $GOPATH/src/github.com/intelsdi-x/snap-plugin-collector-disk
git checkout ${REFSPEC}
git checkout ${GIT_OPTS} ${REFSPEC}
make deps
# https://github.com/intelsdi-x/snap-plugin-collector-interface/commit/d2c8ff6bdf6277b4d2f3c653d603fe6b65d3196a
REFSPEC="d2c8ff6bdf6277b4d2f3c653d603fe6b65d3196a"
go get -d github.com/intelsdi-x/snap-plugin-collector-interface
cd $GOPATH/src/github.com/intelsdi-x/snap-plugin-collector-interface
git checkout ${REFSPEC}
git checkout ${GIT_OPTS} ${REFSPEC}
make deps
# https://github.com/intelsdi-x/snap-plugin-collector-load/commit/dc0b214ace415f31093fea2ba89384c7f994102e
REFSPEC="dc0b214ace415f31093fea2ba89384c7f994102e"
go get -d github.com/intelsdi-x/snap-plugin-collector-load
cd $GOPATH/src/github.com/intelsdi-x/snap-plugin-collector-load
git checkout ${REFSPEC}
git checkout ${GIT_OPTS} ${REFSPEC}
make deps
# https://github.com/intelsdi-x/snap-plugin-collector-meminfo/commit/983c4ae32ef38cb1acd886309f97a389a264179b
REFSPEC="983c4ae32ef38cb1acd886309f97a389a264179b"
go get -d github.com/intelsdi-x/snap-plugin-collector-meminfo
cd $GOPATH/src/github.com/intelsdi-x/snap-plugin-collector-meminfo
git checkout ${REFSPEC}
git checkout ${GIT_OPTS} ${REFSPEC}
make deps
# https://github.com/intelsdi-x/snap-plugin-collector-processes/commit/c07278cdbe8126ea5a32db7442796cde575070a0
REFSPEC="c07278cdbe8126ea5a32db7442796cde575070a0"
go get -d github.com/intelsdi-x/snap-plugin-collector-processes
cd $GOPATH/src/github.com/intelsdi-x/snap-plugin-collector-processes
git checkout ${REFSPEC}
git checkout ${GIT_OPTS} ${REFSPEC}
make deps
# https://github.com/intelsdi-x/snap-plugin-collector-swap/commit/4afdd8658cef1bb5744b38c9a77aa4589afd5f8d
REFSPEC="4afdd8658cef1bb5744b38c9a77aa4589afd5f8d"
go get -d github.com/intelsdi-x/snap-plugin-collector-swap
cd $GOPATH/src/github.com/intelsdi-x/snap-plugin-collector-swap
git checkout ${REFSPEC}
git checkout ${GIT_OPTS} ${REFSPEC}
make deps
# https://github.com/intelsdi-x/snap-plugin-publisher-heka/commit/e95f8cc48edf29fc8fd8ab2fa3f0c6f6ab054674
REFSPEC="e95f8cc48edf29fc8fd8ab2fa3f0c6f6ab054674"
go get -d github.com/intelsdi-x/snap-plugin-publisher-heka
cd $GOPATH/src/github.com/intelsdi-x/snap-plugin-publisher-heka
git checkout ${REFSPEC}
git checkout ${GIT_OPTS} ${REFSPEC}
make deps
# Build Snap
@ -99,7 +101,7 @@ make deps
# https://github.com/intelsdi-x/snap/commit/4e6b19df7b7b7d4300429ba22b766c2ac70d2e29
REFSPEC="4e6b19df7b7b7d4300429ba22b766c2ac70d2e29"
cd $GOPATH/src/github.com/intelsdi-x/snap
git checkout ${REFSPEC}
git checkout ${GIT_OPTS} ${REFSPEC}
make deps all install
cp build/plugin/* /usr/local/bin/
ln -s /usr/local/bin/snap-plugin-processor-passthru $AUTO_DISCOVERY_PATH