Skip to content

Add BUILD_TIMESTAMP env var #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 27, 2017
Merged

Add BUILD_TIMESTAMP env var #23

merged 2 commits into from
Mar 27, 2017

Conversation

solsson
Copy link
Contributor

@solsson solsson commented Mar 27, 2017

As an alternative to #22. Jenkins has https://issues.jenkins-ci.org/browse/JENKINS-26520.

To use this to disable caching of a run step (inspired by http://stackoverflow.com/questions/36996046/how-to-prevent-dockerfile-caching-git-clone):

In a build contract compose yml:

services:
  x:
    build:
      context: ../
      args:
        timestamp: ${BUILD_TIMESTAMP}

and dockerfile

RUN BUILD_TIMESTAMP=${timestamp} \
  && my-stuff-that-should-not-be-cached

@solsson solsson force-pushed the build-timestamp-env branch from 348c4fa to 9877d32 Compare March 27, 2017 14:21
@atamon atamon merged commit 2af1f2b into master Mar 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants