Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2017-06-23 16:53:04 +0000
committerSam Davis2017-07-04 17:13:18 +0000
commitc5fd0abb32173fe42a6bcc98209fa94da82a20f6 (patch)
tree389295324cb955633e4413ff3be399d9e27dc669
parentdbe7c282e2dd379d26de92fc896e33f5b32ed96e (diff)
downloadorg.eclipse.mylyn.reviews-c5fd0abb32173fe42a6bcc98209fa94da82a20f6.tar.gz
org.eclipse.mylyn.reviews-c5fd0abb32173fe42a6bcc98209fa94da82a20f6.tar.xz
org.eclipse.mylyn.reviews-c5fd0abb32173fe42a6bcc98209fa94da82a20f6.zip
add gerrit_clear_mode file with default value
Change-Id: I34a1ad1b53757f37c40278c53006a737d38f678a Signed-off-by: Frank Becker <eclipse@frank-becker.de>
-rw-r--r--org.eclipse.mylyn.gerrit.releng/modules/gerrit/manifests/init.pp11
1 files changed, 11 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.gerrit.releng/modules/gerrit/manifests/init.pp b/org.eclipse.mylyn.gerrit.releng/modules/gerrit/manifests/init.pp
index 0c0ba9515..24a535e0b 100644
--- a/org.eclipse.mylyn.gerrit.releng/modules/gerrit/manifests/init.pp
+++ b/org.eclipse.mylyn.gerrit.releng/modules/gerrit/manifests/init.pp
@@ -3,6 +3,17 @@ class gerrit {
$userOwner = "tools"
$userGroup = "tools"
+ $_exists =inline_template("<%= File.exists?('/etc/gerrit_clear_mode') %>")
+ if $_exists == "true" {
+ $clearMode = regsubst(file("/etc/gerrit_clear_mode"), '\n', '')
+ } else {
+ $clearMode = "noclear"
+ exec { "create clearMode":
+ command => "echo \"noclear\" >/etc/gerrit_clear_mode",
+ creates => '/etc/gerrit_clear_mode',
+ }
+ }
+
exec { "apt-get update":
command => "apt-get update",
onlyif => "find /var/lib/apt/lists/ -mtime -7 | (grep -q Package; [ $? != 0 ])",

Back to the top