Skip to content
Snippets Groups Projects
Commit ca3b4f9c authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

Just use --no-cache option when building FORCE_NOCACHE mode

parent e9799d1b
Branches
Tags
1 merge request!227Just use --no-cache option when building FORCE_NOCACHE mode
...@@ -193,13 +193,14 @@ jug_dev:default: ...@@ -193,13 +193,14 @@ jug_dev:default:
## move spacke directory and spack.yaml into the container build directory ## move spacke directory and spack.yaml into the container build directory
- cp -r spack containers/jug - cp -r spack containers/jug
- cp -r spack.yaml containers/jug/spack/spack.yaml - cp -r spack.yaml containers/jug/spack/spack.yaml
- CACHE_FLAG=""
- | - |
if [ $FORCE_NOCACHE = 1 ]; then if [ $FORCE_NOCACHE = 1 ]; then
echo "FORCE_NOCACHE set" echo "FORCE_NOCACHE set"
export PACKAGE_HASH=`date +%s` export CACHE_FLAG="--no-cache"
fi fi
## Optionally build the raw builder image ## Optionally build the raw builder image
- test ${EXPORT_BUILDER} = 1 && docker build - test ${EXPORT_BUILDER} = 1 && docker build ${CACHE_FLAG}
-t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:builder-${INTERNAL_TAG} -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:builder-${INTERNAL_TAG}
--target=builder --target=builder
-f containers/jug/dev.Dockerfile -f containers/jug/dev.Dockerfile
...@@ -209,7 +210,7 @@ jug_dev:default: ...@@ -209,7 +210,7 @@ jug_dev:default:
--build-arg JUG_VERSION=${INTERNAL_TAG}-$(git rev-parse HEAD) --build-arg JUG_VERSION=${INTERNAL_TAG}-$(git rev-parse HEAD)
containers/jug containers/jug
## now build our image ## now build our image
- docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG} - docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG} ${CACHE_FLAG}
-f containers/jug/dev.Dockerfile -f containers/jug/dev.Dockerfile
--build-arg SPACK_VERSION=${SPACK_VERSION} --build-arg SPACK_VERSION=${SPACK_VERSION}
--build-arg CACHE_BUST=${PACKAGE_HASH} --build-arg CACHE_BUST=${PACKAGE_HASH}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment