summaryrefslogtreecommitdiff
path: root/automation
diff options
context:
space:
mode:
authorTim Taubert <ttaubert@mozilla.com>2016-10-10 15:50:43 +0200
committerTim Taubert <ttaubert@mozilla.com>2016-10-10 15:50:43 +0200
commit0394862ccd4c3d71ff92985f1c28bfa44f84f5d9 (patch)
tree1ad1073c3794bedc411bde3bf3073ccc4508476f /automation
parentf88e8823f5fe615ee81b1d49e33ebc9f0ff59b96 (diff)
downloadnss-hg-0394862ccd4c3d71ff92985f1c28bfa44f84f5d9.tar.gz
Bug 1308903 - Update TC docker image at least every month r=franziskus
Differential Revision: https://nss-dev.phacility.com/D77
Diffstat (limited to 'automation')
-rw-r--r--automation/taskcluster/graph/src/context_hash.js5
-rw-r--r--automation/taskcluster/graph/src/image_builder.js2
2 files changed, 5 insertions, 2 deletions
diff --git a/automation/taskcluster/graph/src/context_hash.js b/automation/taskcluster/graph/src/context_hash.js
index 67bf25784..f0a2e9a88 100644
--- a/automation/taskcluster/graph/src/context_hash.js
+++ b/automation/taskcluster/graph/src/context_hash.js
@@ -36,5 +36,8 @@ export default function (context_path) {
return sha256(file + "|" + fs.readFileSync(file, "utf-8"));
});
- return sha256(hashes.join(","));
+ // Generate a new prefix every month to ensure the image stays buildable.
+ let now = new Date();
+ let prefix = `${now.getUTCFullYear()}-${now.getUTCMonth() + 1}:`;
+ return sha256(prefix + hashes.join(","));
}
diff --git a/automation/taskcluster/graph/src/image_builder.js b/automation/taskcluster/graph/src/image_builder.js
index 093eacb44..bc90e0242 100644
--- a/automation/taskcluster/graph/src/image_builder.js
+++ b/automation/taskcluster/graph/src/image_builder.js
@@ -45,7 +45,7 @@ export async function buildTask({name, path}) {
artifacts: {
"public/image.tar": {
type: "file",
- expires: 24 * 365,
+ expires: 24 * 90,
path: "/artifacts/image.tar"
}
},