Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

Commit 008fdf0

Browse files
committed
Remove unnecessary CentOS references and add Kibana's timestamp-ignoring code
1 parent 08046ac commit 008fdf0

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

.github/workflows/history.sh

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,12 @@ set -Eeuo pipefail
66
docker image history --no-trunc --format '{{ .CreatedBy }}' "$@" \
77
| tac \
88
| sed -r 's!^/bin/sh[[:space:]]+-c[[:space:]]+(#[(]nop[)][[:space:]]+)?!!' \
9-
| awk '
10-
# ignore the first ADD of the base image (base image changes unnecessarily break our diffs)
11-
NR == 1 && $1 == "ADD" && $4 == "/" { next }
12-
# TODO consider instead just removing the checksum in $3
9+
| gawk '
10+
# munge the checksum of the first ADD of the base image (base image changes unnecessarily break our diffs)
11+
NR == 1 && $1 == "ADD" && $4 == "/" { $2 = "-" }
1312
14-
# ignore obviously "centos" LABEL instructions (include a timestamp, so base image changes unnecessarily break our diffs)
15-
$1 == "LABEL" && / org.opencontainers.image.vendor=CentOS | org.label-schema.vendor=CentOS / { next }
16-
17-
# just ignore the default CentOS CMD value (not relevant to our needs)
18-
$0 == "CMD [\"/bin/bash\"]" { next }
13+
# remove "org.label-schema.build-date" and "org.opencontainers.image.created" (https://github.com/elastic/dockerfiles/pull/101#pullrequestreview-879623350)
14+
$1 == "LABEL" { gsub(/ (org[.]label-schema[.]build-date|org[.]opencontainers[.]image[.]created)=[^ ]+( [0-9:+-]+)?/, "") }
1915
2016
# in logstash, Elastic builds pull artifacts from "http://localhost:8000" instead of "https://artifacts.elastic.co/downloads/logstash"
2117
/localhost:8000\/logstash/ { gsub(/http:\/\/localhost:8000\/logstash/, "https://artifacts.elastic.co/downloads/logstash/logstash") }

0 commit comments

Comments
 (0)