summaryrefslogtreecommitdiffstats
path: root/build/cache.sh
diff options
context:
space:
mode:
authorStefan K. Berg <stefan.k.berg@ericsson.com>2016-01-08 13:26:00 +0100
committerStefan K. Berg <stefan.k.berg@ericsson.com>2016-01-17 12:10:12 +0100
commit8e599759ede512a773eccef59eb2824940307564 (patch)
tree645f1a95633dfa00ed4c64135cbc1ee7fe79519c /build/cache.sh
parentc14790e44122781b96b1b287f901c36645d7df7b (diff)
Fuel 8 uplift
Introducing Fuel 8 with associated changes: Improvements in usage of cgroups - they are now bind mounted from the host which solved a Docker-in-Docker problem. The cache tool (cache.mk) has a new argument "getbiweek" which is used by the top Makefile when building the Fuel ISO. This makes sure that there's a fresh build every second week even if the cache is not purged automatically based on its meta data. This is something we should add everywhere (in a separate change set). And obviously, Fuel is now building from stable/8.0 upstream. NOTE! f_repobuild has been disabled for now, it throws an error when run. Will be fixed separately. Change-Id: I7e2ee737fd3bedc75f58539fbc3c5fd1fa08cfa1 Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
Diffstat (limited to 'build/cache.sh')
-rwxr-xr-xbuild/cache.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/build/cache.sh b/build/cache.sh
index 07361d28a..52d28fa33 100755
--- a/build/cache.sh
+++ b/build/cache.sh
@@ -34,6 +34,13 @@ errorexit () {
exit 1
}
+# Generate a unique number every two weeks - a service routine that
+# can be used when generating the SHA1 to make sure that the cache is
+# rebuilt bi-weekly even if no pruning of the cache is taking place.
+getbiweek () {
+ echo "$(date +'%G')$[$(date +'%V')/2]"
+}
+
# Get a SHA1 based on what's piped into the cache command
getid() {
debugmsg "Generating sha1sum"
@@ -133,6 +140,12 @@ getcommitid() {
}
case $1 in
+ getbiweek)
+ if [ $# -ne 1 ]; then
+ errorexit "No arguments can be given to getbiweek!"
+ fi
+ getbiweek
+ ;;
getcommitid)
if [ $# -ne 3 ]; then
errorexit "Arg 1 needs to be URI and arg 2 tag/branch/commit"