From fec4a550faefa78969573e18e5cb485462bfb2d3 Mon Sep 17 00:00:00 2001 From: Jacek Nykis Date: Fri, 10 Sep 2021 13:36:04 +0100 Subject: [PATCH 1/2] Update docker image build timestamp format Golang time parser is not compatible with format rendered by the GNU date, even though both claim to be RFC3339. This change replaces space separator betwen date and time with "T" which will allow golang to parse it. It also switches from `--utc` to `-u` that's supported by both GNU and BSD date commands. --- exp/services/recoverysigner/Makefile | 2 +- exp/services/webauth/Makefile | 2 +- services/friendbot/Makefile | 2 +- services/horizon/docker/Makefile | 2 +- services/keystore/Makefile | 2 +- services/regulated-assets-approval-server/Makefile | 2 +- services/ticker/Makefile | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/exp/services/recoverysigner/Makefile b/exp/services/recoverysigner/Makefile index d563bab2b6..f5e357d356 100644 --- a/exp/services/recoverysigner/Makefile +++ b/exp/services/recoverysigner/Makefile @@ -4,7 +4,7 @@ SUDO := $(shell docker version >/dev/null 2>&1 || echo "sudo") # If TAG is not provided set default value TAG ?= stellar/recoverysigner:$(shell git rev-parse --short HEAD)$(and $(shell git status -s),-dirty-$(shell id -u -n)) # https://github.com/opencontainers/image-spec/blob/master/annotations.md -BUILD_DATE := $(shell date --utc --rfc-3339=seconds) +BUILD_DATE := $(shell date -u +%FT%TZ) docker-build: cd ../../../ && \ diff --git a/exp/services/webauth/Makefile b/exp/services/webauth/Makefile index 367c5bf9c4..f29f06d53c 100644 --- a/exp/services/webauth/Makefile +++ b/exp/services/webauth/Makefile @@ -4,7 +4,7 @@ SUDO := $(shell docker version >/dev/null 2>&1 || echo "sudo") # If TAG is not provided set default value TAG ?= stellar/webauth:$(shell git rev-parse --short HEAD)$(and $(shell git status -s),-dirty-$(shell id -u -n)) # https://github.com/opencontainers/image-spec/blob/master/annotations.md -BUILD_DATE := $(shell date --utc --rfc-3339=seconds) +BUILD_DATE := $(shell date -u +%FT%TZ) docker-build: cd ../../../ && \ diff --git a/services/friendbot/Makefile b/services/friendbot/Makefile index b8527efa03..49ab73a5cd 100644 --- a/services/friendbot/Makefile +++ b/services/friendbot/Makefile @@ -4,7 +4,7 @@ SUDO := $(shell docker version >/dev/null 2>&1 || echo "sudo") # If TAG is not provided set default value TAG ?= stellar/friendbot:$(shell git rev-parse --short HEAD)$(and $(shell git status -s),-dirty-$(shell id -u -n)) # https://github.com/opencontainers/image-spec/blob/master/annotations.md -BUILD_DATE := $(shell date --utc --rfc-3339=seconds) +BUILD_DATE := $(shell date -u +%FT%TZ) docker-build: cd ../../ && \ diff --git a/services/horizon/docker/Makefile b/services/horizon/docker/Makefile index 0b5966055e..2ae7ffd816 100644 --- a/services/horizon/docker/Makefile +++ b/services/horizon/docker/Makefile @@ -1,7 +1,7 @@ SUDO := $(shell docker version >/dev/null 2>&1 || echo "sudo") # https://github.com/opencontainers/image-spec/blob/master/annotations.md -BUILD_DATE := $(shell date --utc --rfc-3339=seconds) +BUILD_DATE := $(shell date -u +%FT%TZ) TAG ?= stellar/stellar-horizon:$(VERSION) diff --git a/services/keystore/Makefile b/services/keystore/Makefile index 293f3455c1..734cecc4dd 100644 --- a/services/keystore/Makefile +++ b/services/keystore/Makefile @@ -4,7 +4,7 @@ SUDO := $(shell docker version >/dev/null 2>&1 || echo "sudo") # If TAG is not provided set default value TAG ?= stellar/keystore:$(shell git rev-parse --short HEAD)$(and $(shell git status -s),-dirty-$(shell id -u -n)) # https://github.com/opencontainers/image-spec/blob/master/annotations.md -BUILD_DATE := $(shell date --utc --rfc-3339=seconds) +BUILD_DATE := $(shell date -utc +%FT%TZ) docker-build: cd ../../ && \ diff --git a/services/regulated-assets-approval-server/Makefile b/services/regulated-assets-approval-server/Makefile index cf7cdbbd8d..a9e83306c6 100644 --- a/services/regulated-assets-approval-server/Makefile +++ b/services/regulated-assets-approval-server/Makefile @@ -4,7 +4,7 @@ SUDO := $(shell docker version >/dev/null 2>&1 || echo "sudo") # If TAG is not provided set default value TAG ?= stellar/regulated-assets-approval-server:$(shell git rev-parse --short HEAD)$(and $(shell git status -s),-dirty-$(shell id -u -n)) # https://github.com/opencontainers/image-spec/blob/master/annotations.md -BUILD_DATE := $(shell date --utc --rfc-3339=seconds) +BUILD_DATE := $(shell date -u +%FT%TZ) docker-build: cd ../../ && \ diff --git a/services/ticker/Makefile b/services/ticker/Makefile index 5755699508..eb2ef29bff 100644 --- a/services/ticker/Makefile +++ b/services/ticker/Makefile @@ -4,7 +4,7 @@ SUDO := $(shell docker version >/dev/null 2>&1 || echo "sudo") # If TAG is not provided set default value TAG ?= stellar/ticker:$(shell git rev-parse --short HEAD)$(and $(shell git status -s),-dirty-$(shell id -u -n)) # https://github.com/opencontainers/image-spec/blob/master/annotations.md -BUILD_DATE := $(shell date --utc --rfc-3339=seconds) +BUILD_DATE := $(shell date -u +%FT%TZ) docker-build: cd ../../ && \ From b5b4ed7e80eed4d3a302f2b8ec561de69a70b1bf Mon Sep 17 00:00:00 2001 From: Jacek Nykis Date: Tue, 14 Sep 2021 11:33:20 +0100 Subject: [PATCH 2/2] Fix error in one Makefile --- services/keystore/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/keystore/Makefile b/services/keystore/Makefile index 734cecc4dd..d091c04836 100644 --- a/services/keystore/Makefile +++ b/services/keystore/Makefile @@ -4,7 +4,7 @@ SUDO := $(shell docker version >/dev/null 2>&1 || echo "sudo") # If TAG is not provided set default value TAG ?= stellar/keystore:$(shell git rev-parse --short HEAD)$(and $(shell git status -s),-dirty-$(shell id -u -n)) # https://github.com/opencontainers/image-spec/blob/master/annotations.md -BUILD_DATE := $(shell date -utc +%FT%TZ) +BUILD_DATE := $(shell date -u +%FT%TZ) docker-build: cd ../../ && \