Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2013-05-26 16:28:23 +0000
committerFrank Becker2013-05-26 16:28:23 +0000
commitdd372b0ff771b60311a739f7c260dc8d0000619a (patch)
treea7ffbe25095973cf3c0d559af97c95e7a9393951 /org.eclipse.mylyn.bugzilla.releng/modules
parent8939acaba732cbdc1e34107d47c04c447271de4c (diff)
downloadorg.eclipse.mylyn.tasks-dd372b0ff771b60311a739f7c260dc8d0000619a.tar.gz
org.eclipse.mylyn.tasks-dd372b0ff771b60311a739f7c260dc8d0000619a.tar.xz
org.eclipse.mylyn.tasks-dd372b0ff771b60311a739f7c260dc8d0000619a.zip
409087: Update Bugzilla Test instances to 4.4 final and 4.2.6
Change-Id: I2010d9388d6c61627338f9900c33ebde6a461900 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=409087
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.releng/modules')
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp7
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/init.pp40
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp54
3 files changed, 55 insertions, 46 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 55ad949e0..96f44b0f8 100644
--- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp
@@ -56,23 +56,22 @@ define bugzilla::defaultsites($base = $bugzilla::bugzillaBase, $userOwner = $bug
minor => "0",
}
- bugzilla::site { "bugzilla-4.2.5":
+ bugzilla::site { "bugzilla-4.2.6":
major => "4",
minor => "2",
envdefault => true,
}
- bugzilla::site { "bugzilla-4.2.5-bugaliases":
+ bugzilla::site { "bugzilla-4.2.6-bugaliases":
major => "4",
minor => "2",
- branchTag => "bugzilla-4.2.5",
+ branchTag => "bugzilla-4.2.6",
usebugaliases => true,
}
bugzilla::site { "bugzilla-4.4":
major => "4",
minor => "4",
- branchTag => "trunk",
}
bugzilla::site { "bugzilla-trunk":
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 dad4f27b5..45a5361ca 100644
--- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/init.pp
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/init.pp
@@ -15,8 +15,8 @@ class bugzilla {
$bugzillaBase = "/home/$userOwner/bugzilla"
$dbuser = 'bugz'
$dbuserPassword = 'ovlwq8'
- $clearDB = false
$envhost = regsubst(file("/etc/hostname"), '\n', '')
+ $confDir = "$bugzillaBase/conf.d"
exec { "apt-get update":
command => "apt-get update",
@@ -113,11 +113,6 @@ class bugzilla {
target => "/etc/apache2/sites-available/default-ssl",
}
- exec { "prepare bugzilla":
- command => "echo Bugzilla pre-requisites are installed",
- require => Package[$requirements],
- }
-
if $envhost != "mylyn.org"{
file { "$bugzillaBase/servicephpmyadmin.json":
source => "puppet:///modules/bugzilla/servicephpmyadmin.json",
@@ -127,10 +122,41 @@ class bugzilla {
require => Package[$requirements],
}
}
-
+
file { "/usr/lib/cgi-bin/services":
source => "puppet:///modules/bugzilla/services.cgi",
mode => 755,
require => Package[$requirements],
}
+
+ $_exists =inline_template("<%= File.exists?('/etc/bugzilla_clear_mode') %>")
+ if $_exists == "true" {
+ $clearMode = regsubst(file("/etc/bugzilla_clear_mode"), '\n', '')
+ } else {
+ $clearMode = "noclear"
+ exec { "create clearMode":
+ command => "echo \"noclear\" >/etc/bugzilla_clear_mode",
+ creates => '/etc/bugzilla_clear_mode',
+ }
+ }
+
+ exec { "create $confDir":
+ command => "mkdir -p $confDir",
+ creates => "$confDir",
+ user => "$userOwner",
+ require => Package[$requirements],
+ }
+
+ exec { "mysql create user ${dbuser}":
+ unless => "/usr/bin/mysql --user='${dbuser}' --password='${dbuserPassword}'",
+ command => "/usr/bin/mysql -v --user='root' -e \"CREATE USER '${dbuser}'@localhost IDENTIFIED BY '${dbuserPassword}'\"",
+ logoutput => true,
+ require => Package["mysql-server"],
+ }
+
+ exec { "prepare bugzilla":
+ command => "echo Bugzilla pre-requisites are installed",
+ require => [Exec["mysql create user ${dbuser}"],Exec["create $confDir"]],
+ }
+
}
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 a97c3d06f..fc379058f 100644
--- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp
@@ -29,15 +29,14 @@ define bugzilla::site (
$userGroup = $bugzilla::userGroup,
$envversion = "${major}.${minor}",
$envdefault = false,
- $clearDB = $bugzilla::clearDB,
$desciptorfile = " ",
$usebugaliases = false,
+ $clearMode = $bugzilla::clearMode,
) {
include "bugzilla"
$propertyanz = 0
$confDir = "$base/conf.d"
-
if $branch == "trunk" {
$envinfo1 = "trunk"
@@ -79,21 +78,6 @@ define bugzilla::site (
$branchName = "${major}.${minor}"
}
-
- exec { "prepare $version":
- command => "mkdir -p $confDir",
- creates => "$base",
- user => "$userOwner",
- require => Exec["prepare bugzilla"],
- }
-
- exec { "mysql create user ${bugz_user} for $version":
- unless => "/usr/bin/mysql --user='${bugz_user}' --password='${bugz_password}'",
- command => "/usr/bin/mysql -v --user='root' -e \"CREATE USER '${bugz_user}'@localhost IDENTIFIED BY '${bugz_password}'\"",
- logoutput => true,
- require => Package["mysql-server"],
- }
-
if $branchTag == "trunk" {
exec { "extract bugzilla $version":
command => "bzr co bzr://bzr.mozilla.org/bugzilla/$branchName $version",
@@ -101,7 +85,7 @@ define bugzilla::site (
user => "$userOwner",
timeout => 300,
creates => "$base/$version",
- require => Exec["prepare $version"]
+ require => Exec["prepare bugzilla"]
}
} else {
exec { "extract bugzilla $version":
@@ -110,7 +94,7 @@ define bugzilla::site (
user => "$userOwner",
timeout => 300,
creates => "$base/$version",
- require => Exec["prepare $version"]
+ require => Exec["prepare bugzilla"]
}
}
@@ -139,24 +123,24 @@ define bugzilla::site (
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}'",
- require => Exec["mysql-grant-${bugz_dbname}-${bugzilla::dbuser}"]
- }
+ if $clearMode == "clear" {
+ exec { "mysql-dropdb-$version":
+ onlyif => "/usr/bin/mysql --user=root '${bugz_dbname}'",
+ command => "/usr/bin/mysqladmin -v --user=root --force drop '${bugz_dbname}'",
+ 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}'",
- require => Exec["mysql-dropdb-$version"]
- }
+ 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-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}"]
- }
+ 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":

Back to the top