Merge ~ubuntu-docker-images/ubuntu-docker-images/+git/telegraf:1.15-20.04-fix-missing-manifest into ~ubuntu-docker-images/ubuntu-docker-images/+git/telegraf:1.15-20.04

Proposed by Athos Ribeiro
Status: Merged
Merge reported by: Athos Ribeiro
Merged at revision: 494f64219fa87afb968c9793666bb9b8d15b82f1
Proposed branch: ~ubuntu-docker-images/ubuntu-docker-images/+git/telegraf:1.15-20.04-fix-missing-manifest
Merge into: ~ubuntu-docker-images/ubuntu-docker-images/+git/telegraf:1.15-20.04
Diff against target: 25 lines (+7/-3)
1 file modified
Dockerfile (+7/-3)
Reviewer Review Type Date Requested Status
Sergio Durigan Junior Approve
Ubuntu Docker Images Pending
Review via email: mp+406562@code.launchpad.net

Description of the change

Do not use pipes in RUN commands

Using pipes without properly handling the earlier commands may conceal errors even when "set -e" is used.

Since setting the pipefail option may not be an alternative (we are using dash), we should refactor commands using pipes to avoid concealing errors.

This should avoid releasing images with missing bits.

To post a comment you must log in.
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

LGTM, thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Dockerfile b/Dockerfile
2index 042a96e..847b82f 100644
3--- a/Dockerfile
4+++ b/Dockerfile
5@@ -19,14 +19,18 @@ RUN set -eux; \
6 sed -i 's@^EXCLUDE_TESTS.*@EXCLUDE_TESTS = github.com/influxdata/telegraf/plugins/inputs/http_response \
7 github.com/influxdata/telegraf/plugins/inputs/zipkin \
8 github.com/influxdata/telegraf/plugins/outputs/prometheus_client \\@' debian/rules; \
9- pristine-tar checkout ../telegraf_$(dpkg-parsechangelog -SVersion | sed 's/\(.*\)-.ubuntu.*/\1/').orig.tar.xz; \
10+ dpkg-parsechangelog -SVersion > /tmp/telegraf-ubuntu-version.txt; \
11+ PKG_VERSION=$(sed 's/\(.*\)-.ubuntu.*/\1/' /tmp/telegraf-ubuntu-version.txt); \
12+ pristine-tar checkout ../telegraf_${PKG_VERSION}.orig.tar.xz; \
13 DEBIAN_FRONTEND=noninteractive apt-get build-dep . -y; \
14 dpkg-buildpackage -us -uc; \
15 cd /src/telegraf; \
16 git clone https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/utils; \
17 cd telegraf/vendor; \
18- go list -m all | tail -n +2 > /src/telegraf/telegraf-mods.txt; \
19- /src/telegraf/utils/golang-manifest-builder.py /src/telegraf/telegraf-mods.txt | tee /src/telegraf/manifest-upstream.txt
20+ go list -m all > /tmp/telegraf-go-list.output; \
21+ tail -n +2 /tmp/telegraf-go-list.output > /src/telegraf/telegraf-mods.txt; \
22+ /src/telegraf/utils/golang-manifest-builder.py /src/telegraf/telegraf-mods.txt > /src/telegraf/manifest-upstream.txt; \
23+ cat /src/telegraf/manifest-upstream.txt
24
25 FROM ubuntu:focal
26

Subscribers

People subscribed via source and target branches

to all changes: