Commit 0c3c0b10 authored by sspaink's avatar sspaink Committed by Sebastian Spaink
Browse files

fix: use env variable for nightly

parent 593db10f
......@@ -13,7 +13,7 @@ RUN set -ex && \
gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys "$key" ; \
done
ENV TELEGRAF_VERSION 1.20.2
ENV TELEGRAF_VERSION nightly
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" && \
case "${dpkgArch##*-}" in \
amd64) ARCH='amd64';; \
......@@ -22,11 +22,11 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" && \
armel) ARCH='armel';; \
*) echo "Unsupported architecture: ${dpkgArch}"; exit 1;; \
esac && \
wget --no-verbose https://dl.influxdata.com/telegraf/releases/telegraf_nightly_${ARCH}.deb.asc && \
wget --no-verbose https://dl.influxdata.com/telegraf/releases/telegraf_nightly_${ARCH}.deb && \
gpg --batch --verify telegraf_nightly_${ARCH}.deb.asc telegraf_nightly_${ARCH}.deb && \
dpkg -i telegraf_nightly_${ARCH}.deb && \
rm -f telegraf_nightly_${ARCH}.deb*
wget --no-verbose https://dl.influxdata.com/telegraf/releases/telegraf_${TELEGRAF_VERSION}_${ARCH}.deb.asc && \
wget --no-verbose https://dl.influxdata.com/telegraf/releases/telegraf_${TELEGRAF_VERSION}_${ARCH}.deb && \
gpg --batch --verify telegraf_${TELEGRAF_VERSION}_${ARCH}.deb.asc telegraf_${TELEGRAF_VERSION}_${ARCH}.deb && \
dpkg -i telegraf_${TELEGRAF_VERSION}_${ARCH}.deb && \
rm -f telegraf_${TELEGRAF_VERSION}_${ARCH}.deb*
EXPOSE 8125/udp 8092/udp 8094
......
......@@ -4,6 +4,9 @@ RUN echo 'hosts: files dns' >> /etc/nsswitch.conf
RUN apk add --no-cache iputils ca-certificates net-snmp-tools procps lm_sensors tzdata && \
update-ca-certificates
ENV TELEGRAF_VERSION nightly
RUN set -ex && \
mkdir ~/.gnupg; \
echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf; \
......@@ -13,11 +16,11 @@ RUN set -ex && \
do \
gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys "$key" ; \
done && \
wget --no-verbose https://dl.influxdata.com/telegraf/nightlies/telegraf-static-nightly_linux_amd64.tar.gz.asc && \
wget --no-verbose https://dl.influxdata.com/telegraf/nightlies/telegraf-static-nightly_linux_amd64.tar.gz && \
gpg --batch --verify telegraf-static-nightly_linux_amd64.tar.gz.asc telegraf-static-nightly_linux_amd64.tar.gz && \
wget --no-verbose https://dl.influxdata.com/telegraf/nightlies/telegraf-static-${TELEGRAF_VERSION}_linux_amd64.tar.gz.asc && \
wget --no-verbose https://dl.influxdata.com/telegraf/nightlies/telegraf-static-${TELEGRAF_VERSION}_linux_amd64.tar.gz && \
gpg --batch --verify telegraf-static-${TELEGRAF_VERSION}_linux_amd64.tar.gz.asc telegraf-static-${TELEGRAF_VERSION}_linux_amd64.tar.gz && \
mkdir -p /usr/src /etc/telegraf && \
tar -C /usr/src -xzf telegraf-static-nightly_linux_amd64.tar.gz && \
tar -C /usr/src -xzf telegraf-static-${TELEGRAF_VERSION}_linux_amd64.tar.gz && \
mv /usr/src/telegraf*/etc/telegraf/telegraf.conf /etc/telegraf/ && \
mkdir /etc/telegraf/telegraf.d && \
cp -a /usr/src/telegraf*/usr/bin/telegraf /usr/bin/ && \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment