diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2016-10-04 17:26:57 +0200 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2016-10-04 15:40:49 +0000 |
commit | 1c7eb680b34fdcd83b92c43a4c78db3c54bf567b (patch) | |
tree | 6f33613d53e9a1dcf92c9800e8303c88762aa1ff /build/docker | |
parent | d10655d6c3f56164c7dbf0992dee7c536783b3eb (diff) |
build/docker: CI: no tag reuse on env var change
The previous change adding support for OPNFV build tag reuse
added the get/put-cache functionality to `build/docker` just
for detecting env var changes between tag creation and current build.
Obviously, when building outside CI, it is up to the end user to
force a docker rebuild when env vars change (this was the behavior
before the tag reuse support too).
An alternative approach would be removing get/put-cache completely,
if we consider the env vars (http proxy related) never change for
CI cached builds (seems to be true, worst case we wait 1 day for
the tag to expire when it happens).
This change just fixes the original intended behavior in tag reuse.
JIRA: FUEL-204
Change-Id: I14666994bc334012a5198a64a4a24cd4962e4bd6
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'build/docker')
-rw-r--r-- | build/docker/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/build/docker/Makefile b/build/docker/Makefile index ab7a169eb..783881e8d 100644 --- a/build/docker/Makefile +++ b/build/docker/Makefile @@ -45,7 +45,7 @@ all: .docker touch $@ .docker: .dockercfg - @if test "$(shell ${DOCKER_EXPIRED})" -eq "0"; then \ + @if test -f .cacheid -o "$(shell ${DOCKER_EXPIRED})" -eq "0"; then \ /usr/bin/docker build --rm=true --no-cache=true \ -t ${DOCKER_TAG} ubuntu-builder && \ /usr/bin/docker tag ${tag_flags} ${DOCKER_TAG} ${DOCKER_IMG}; \ |