Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2013-02-18 19:27:02 +0000
committerFrank Becker2013-03-03 16:03:18 +0000
commitc69360ed98fe8cb445566ca336a793f387a9a9f8 (patch)
tree541cda854eeb8c0e497c218863ad3ddc9dc50ee8 /org.eclipse.mylyn.bugzilla.releng/modules
parent985b510ea6142d3fa8969ce5d23bb0f2013e7c32 (diff)
downloadorg.eclipse.mylyn.tasks-c69360ed98fe8cb445566ca336a793f387a9a9f8.tar.gz
org.eclipse.mylyn.tasks-c69360ed98fe8cb445566ca336a793f387a9a9f8.tar.xz
org.eclipse.mylyn.tasks-c69360ed98fe8cb445566ca336a793f387a9a9f8.zip
399803: add service file (trac and bugzilla); buzilla cleanup and use
title in more places Change-Id: I08a418a65437f45835732f9e378f00c922211468 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=399803
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.releng/modules')
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp25
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/init.pp9
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp22
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/service.json.erb12
4 files changed, 35 insertions, 33 deletions
diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp
index 900e7df93..925a76492 100644
--- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp
@@ -22,45 +22,42 @@ define bugzilla::defaultsites($base = $bugzilla::bugzillaBase, $userOwner = $bug
}
/* Sites */
-
- bugzilla::site { "bugs36":
- major => "3",
- minor => "6",
+
+ bugzilla::site { "bugzilla-3.6.12":
+ major => "3",
+ minor => "6",
}
bugzilla::site { "bugs36-custom-wf":
major => "3",
minor => "6",
- branch => "3.6",
- bugz_dbname => "bugs_3_6_cwf",
+ branchTag => "bugzilla-3.6.12",
custom_wf => true,
}
bugzilla::site { "bugs36-custom-wf-and-status":
major => "3",
minor => "6",
- branch => "3.6",
- bugz_dbname => "bugs_3_6_cwf_ws",
+ branchTag => "bugzilla-3.6.12",
custom_wf_and_status => true,
}
bugzilla::site { "bugs36-xml-rpc-disabled":
major => "3",
minor => "6",
- branch => "3.6",
- bugz_dbname => "bugs_3_6_norpc",
+ branchTag => "bugzilla-3.6.12",
xmlrpc_enabled => false,
}
- bugzilla::site { "bugs40":
+ bugzilla::site { "bugzilla-4.0.10":
major => "4",
minor => "0",
}
- bugzilla::site { "bugs42":
+ bugzilla::site { "bugzilla-4.2.5":
major => "4",
minor => "2",
- envdefault => "1"
+ envdefault => "1",
}
bugzilla::site { "bugs44":
@@ -74,7 +71,5 @@ define bugzilla::defaultsites($base = $bugzilla::bugzillaBase, $userOwner = $bug
minor => "5",
branch => "trunk",
branchTag => "trunk",
- bugz_dbname => "bugs_head",
}
-
} \ No newline at end of file
diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/init.pp b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/init.pp
index bfaeb4bbf..36ed2c2ee 100644
--- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/init.pp
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/init.pp
@@ -15,6 +15,7 @@ class bugzilla {
$bugzillaBase = "/home/$userOwner/bugzilla"
$dbuser = 'bugz'
$dbuserPassword = 'ovlwq8'
+ $clearDB = false
exec { "apt-get update":
command => "apt-get update",
@@ -115,10 +116,10 @@ class bugzilla {
command => "echo Bugzilla pre-requisites are installed",
require => Package[$requirements],
}
-
- file { "/usr/lib/cgi-bin/services":
- source => "puppet:///modules/bugzilla/services.cgi",
- mode => 755,
+
+ file { "/usr/lib/cgi-bin/services":
+ source => "puppet:///modules/bugzilla/services.cgi",
+ mode => 755,
require => Package[$requirements],
}
}
diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp
index af4b8552d..2cd760298 100644
--- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp
@@ -13,12 +13,12 @@ define bugzilla::site (
$major,
$minor,
$branch = " ",
- $bugz_dbname = "$title",
+ $bugz_dbname = regsubst($title, '([^.-]+)([.-]+)', '\1_', 'G'),
$bugz_user = $bugzilla::dbuser,
$bugz_password = $bugzilla::dbuserPassword,
$www_url = "$title",
$version = "$title",
- $branchTag = "bugzilla-stable",
+ $branchTag = "$title",
$custom_wf = false,
$custom_wf_and_status = false,
$xmlrpc_enabled = true,
@@ -29,12 +29,13 @@ define bugzilla::site (
$userGroup = $bugzilla::userGroup,
$envversion = "${major}.${minor}",
$envdefault = "0",
+ $clearDB = $bugzilla::clearDB,
) {
include "bugzilla"
$confDir = "$base/conf.d"
-
+
if $branch == "trunk" {
$envinfo = "trunk"
} else {
@@ -52,6 +53,7 @@ define bugzilla::site (
$envinfo = "XML-RPC disabled"
}
}
+
if $major == "3" {
if $minor == "6" {
$VersionCreateName = "name"
@@ -125,23 +127,28 @@ define bugzilla::site (
"/usr/bin/mysql --user=root --batch -e \"SELECT user FROM db WHERE Host='localhost' and Db='${bugz_dbname}' and User='${bugzilla::dbuser}'\" mysql | /bin/grep '${bugzilla::dbuser}'",
command => "/usr/bin/mysql --verbose --user=root -e \"GRANT ALL ON ${bugz_dbname}.* TO '${bugzilla::dbuser}'@localhost\" \
; /usr/bin/mysqladmin --verbose --user=root flush-privileges",
-## logoutput => true,
require => Exec["post extract bugzilla $version"]
}
+ if $clearDB {
exec { "mysql-dropdb-$version":
onlyif => "/usr/bin/mysql --user=root '${bugz_dbname}'",
command => "/usr/bin/mysqladmin -v --user=root --force drop '${bugz_dbname}'",
-## logoutput => true,
require => Exec["mysql-grant-${bugz_dbname}-${bugzilla::dbuser}"]
}
exec { "mysql-createdb-$version":
unless => "/usr/bin/mysql --user=root '${bugz_dbname}'",
command => "/usr/bin/mysqladmin -v --user=root --force create '${bugz_dbname}'",
-## logoutput => true,
require => Exec["mysql-dropdb-$version"]
}
+ } else {
+ exec { "mysql-createdb-$version":
+ unless => "/usr/bin/mysql --user=root '${bugz_dbname}'",
+ command => "/usr/bin/mysqladmin -v --user=root --force create '${bugz_dbname}'",
+ require => Exec["mysql-grant-${bugz_dbname}-${bugzilla::dbuser}"]
+ }
+ }
file { "$base/$version/callchecksetup.pl":
content => template('bugzilla/callchecksetup.pl.erb'),
@@ -193,14 +200,13 @@ define bugzilla::site (
exec { "update bugzilla_checksetup $version":
command => "$base/$version/callchecksetup.pl",
cwd => "$base/$version",
+ logoutput => true,
user => "$userOwner",
-# logoutput => true,
require => [
Exec["mysql-createdb-$version"],
Exec["init bugzilla_checksetup $version"],
File["$base/$version/answers"],
File["$base/$version/extensions/Mylyn/Extension.pm"],
-# File["$base/$version/localconfig"],
]
}
diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/service.json.erb b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/service.json.erb
index a7806f167..114908b5b 100644
--- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/service.json.erb
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/service.json.erb
@@ -3,10 +3,10 @@
"url": "/<%= envid %>",
"version": "<%= envversion %>",
"info": "<%= envinfo %>" ,
- "properties":{
- "custom_wf": "<%= custom_wf %>",
- "custom_wf_and_status": "<%= custom_wf_and_status %>",
- "xmlrpc_enabled": "<%= xmlrpc_enabled %>",
- "default": "<%= envdefault %>"
- }
+ "properties":{
+ "custom_wf": "<%= custom_wf %>",
+ "custom_wf_and_status": "<%= custom_wf_and_status %>",
+ "xmlrpc_enabled": "<%= xmlrpc_enabled %>",
+ "default": "<%= envdefault %>",
+ }
}

Back to the top