From ec1f78a5c4573bd6a41bbf11db5a56ddee43329a Mon Sep 17 00:00:00 2001 From: dlorenc Date: Thu, 20 Dec 2018 12:33:12 -0600 Subject: [PATCH] Deflake the meta_arg_test by setting a specific timestamp in touch. (#498) This works around mtime-precision issues that cause us to differ from docker-built images when the touch command executes too quickly to modify the mtime. Also one fix in the .travis.yml beacuse something appears to have changed in their default go installation. --- .travis.yml | 2 +- integration/dockerfiles/Dockerfile_test_meta_arg | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 21b2404d3..b85d3832b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: go os: linux go: - - 1.10.x + - "1.10" go_import_path: github.com/GoogleContainerTools/kaniko script: diff --git a/integration/dockerfiles/Dockerfile_test_meta_arg b/integration/dockerfiles/Dockerfile_test_meta_arg index a98f82e3a..b90662138 100644 --- a/integration/dockerfiles/Dockerfile_test_meta_arg +++ b/integration/dockerfiles/Dockerfile_test_meta_arg @@ -14,4 +14,5 @@ FROM ${REGISTRY}/${REPO}/debian9 COPY --from=stage1 /hello /tmp # /tmp/hey should not get created without the ARG statement -RUN touch /tmp/${WORD2} +# Use -d 0 to force a time change because of stat resolution +RUN touch -d 0 /tmp/${WORD2}