From b77041c3b9bc6c668fd4752ff54d951172cd6ab9 Mon Sep 17 00:00:00 2001 From: Robert Prehn <3952444+prehnRA@users.noreply.github.com> Date: Fri, 16 Apr 2021 17:00:11 -0500 Subject: [PATCH] chore: Test timestamp fix in CI --- .gitlab-ci.yml | 6 +++++- script/ci-set-timestamps | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 script/ci-set-timestamps diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bed29d01..24166f39 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,6 +28,7 @@ prebuild: - _build/ - deps/ script: + - script/ci-set-timestamps - mix local.hex --force - mix local.rebar --force - mix deps.get @@ -79,7 +80,9 @@ test: paths: - _build/ - deps/ - script: script/cibuild + script: + - script/ci-set-timestamps + - script/cibuild build_image_for_commit: stage: test @@ -99,6 +102,7 @@ build_image_for_commit: - _build/ - deps/ script: + - script/ci-set-timestamps - ls -la _build - docker login "https://${CI_REGISTRY}" -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD - docker pull $CI_REGISTRY_IMAGE:latest || true diff --git a/script/ci-set-timestamps b/script/ci-set-timestamps new file mode 100755 index 00000000..d0812497 --- /dev/null +++ b/script/ci-set-timestamps @@ -0,0 +1,5 @@ +#!/bin/sh + +BUILD_TIMESTAMP=`date -d $CI_COMMIT_TIMESTAMP "CCYYMMDDhhmm.SS"` + +touch -t $BUILD_TIMESTAMP apps/**/*.ex apps/**/*.exs config/**/*.ex config/**/*.exs mix.exs