Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2013-04-16 15:10:41 +0000
committerGerrit Code Review @ Eclipse.org2013-04-21 23:07:54 +0000
commita4275ac930f94ddaa2e75dc8dff860c51b43c775 (patch)
tree1fee82f5cb060cbca7691d8e4b03a81cae09954e /org.eclipse.mylyn.bugzilla.releng
parent72f3117a1c2e325d823bd44c9a0c23843d93d99e (diff)
downloadorg.eclipse.mylyn.tasks-a4275ac930f94ddaa2e75dc8dff860c51b43c775.tar.gz
org.eclipse.mylyn.tasks-a4275ac930f94ddaa2e75dc8dff860c51b43c775.tar.xz
org.eclipse.mylyn.tasks-a4275ac930f94ddaa2e75dc8dff860c51b43c775.zip
399803: simplify Bugzilla fixture discovery
* Discover all fixtures dynamically and remove hard coded URLs. Change-Id: I23197e708b31a9996cf3b53558771fb06c92e77c Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=399803
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.releng')
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp13
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp9
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/Extension.pm.erb8
-rw-r--r--org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/service.json.erb21
4 files changed, 26 insertions, 25 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 925a76492..47b902164 100644
--- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/defaultsites.pp
@@ -28,21 +28,22 @@ define bugzilla::defaultsites($base = $bugzilla::bugzillaBase, $userOwner = $bug
minor => "6",
}
- bugzilla::site { "bugs36-custom-wf":
+ bugzilla::site { "bugzilla-3.6.12-custom-wf":
major => "3",
minor => "6",
branchTag => "bugzilla-3.6.12",
custom_wf => true,
}
- bugzilla::site { "bugs36-custom-wf-and-status":
+ bugzilla::site { "bugzilla-3.6.12-custom-wf-and-status":
major => "3",
minor => "6",
branchTag => "bugzilla-3.6.12",
custom_wf_and_status => true,
+ desciptorfile => "DescriptorFile-custom-wf-and-status.txt"
}
- bugzilla::site { "bugs36-xml-rpc-disabled":
+ bugzilla::site { "bugzilla-3.6.12-xml-rpc-disabled":
major => "3",
minor => "6",
branchTag => "bugzilla-3.6.12",
@@ -57,16 +58,16 @@ define bugzilla::defaultsites($base = $bugzilla::bugzillaBase, $userOwner = $bug
bugzilla::site { "bugzilla-4.2.5":
major => "4",
minor => "2",
- envdefault => "1",
+ envdefault => true,
}
- bugzilla::site { "bugs44":
+ bugzilla::site { "bugzilla-4.4":
major => "4",
minor => "4",
branchTag => "trunk",
}
- bugzilla::site { "bugshead":
+ bugzilla::site { "bugzilla-trunk":
major => "4",
minor => "5",
branch => "trunk",
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 2cd760298..6f055fe72 100644
--- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/manifests/site.pp
@@ -28,12 +28,13 @@ define bugzilla::site (
$userOwner = $bugzilla::userOwner,
$userGroup = $bugzilla::userGroup,
$envversion = "${major}.${minor}",
- $envdefault = "0",
+ $envdefault = false,
$clearDB = $bugzilla::clearDB,
+ $desciptorfile = " ",
) {
include "bugzilla"
-
+ $propertyanz = 0
$confDir = "$base/conf.d"
if $branch == "trunk" {
@@ -188,7 +189,7 @@ define bugzilla::site (
command => "$base/$version/callchecksetup.pl",
cwd => "$base/$version",
creates => "$base/$version/localconfig",
- user => "$userOwner",
+# user => "$userOwner",
logoutput => true,
require => [
Exec["mysql-createdb-$version"],
@@ -201,7 +202,7 @@ define bugzilla::site (
command => "$base/$version/callchecksetup.pl",
cwd => "$base/$version",
logoutput => true,
- user => "$userOwner",
+# user => "$userOwner",
require => [
Exec["mysql-createdb-$version"],
Exec["init bugzilla_checksetup $version"],
diff --git a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/Extension.pm.erb b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/Extension.pm.erb
index 529f2f4ea..7b178150d 100644
--- a/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/Extension.pm.erb
+++ b/org.eclipse.mylyn.bugzilla.releng/modules/bugzilla/templates/Extension.pm.erb
@@ -423,20 +423,18 @@ sub install_before_final_checks {
WHERE old_status = ? AND new_status = ?');
my $sth_delnul = $dbh->prepare('DELETE FROM status_workflow
WHERE old_status IS NULL AND new_status = ?');
-
-print "before insert";
foreach my $pair (STATUS_WORKFLOW) {
my $old_id = $pair->[0] ? $status_ids{$pair->[0]} : undef;
my $new_id = $status_ids{$pair->[1]};
- $sth_insert->execute($old_id, $new_id);
+ if (!$dbh->selectrow_array('SELECT 1 FROM status_workflow where old_status ='. $old_id . ' and new_status ='.$new_id)) {
+ $sth_insert->execute($old_id, $new_id);
+ }
}
-print "before delete";
foreach my $pair (STATUS_WORKFLOW_DELETE) {
my $old_id = $pair->[0] ? $status_ids{$pair->[0]} : undef;
my $new_id = $status_ids{$pair->[1]};
$sth_delete->execute($old_id, $new_id);
}
-print "before delete null";
my $new_id = $status_ids{'ASSIGNED'};
$sth_delnul->execute($new_id);
}
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 59a5a5fe4..8fbbdc285 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
@@ -1,12 +1,13 @@
{
-"type": "<%= envtype %>",
-"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 %>"
- }
+ "type": "<%= envtype %>",
+ "url": "/<%= envid %>",
+ "version": "<%= envversion %>",
+ "info": "<%= envinfo %>",
+ "properties":{
+<% if @envdefault %><% if propertyanz.to_i > 0 %> ,<% else %> <% end %><% propertyanz = propertyanz.to_i -%><% propertyanz += 1 -%>"default": "<%= envdefault %>"<% end %>
+<% if @custom_wf %><% if propertyanz.to_i > 0 %> ,<% else %> <% end %><% propertyanz = propertyanz.to_i -%><% propertyanz += 1 -%>"custom_wf": "<%= custom_wf %>"<% end %>
+<% if @custom_wf_and_status %><% if propertyanz.to_i > 0 %> ,<% else %> <% end %><% propertyanz = propertyanz.to_i -%><% propertyanz += 1 -%>"custom_wf_and_status": "<%= custom_wf_and_status %>"<% end %>
+<% if @xmlrpc_enabled %><% if propertyanz.to_i > 0 %> ,<% else %> <% end %><% propertyanz = propertyanz.to_i -%><% propertyanz += 1 -%>"xmlrpc_enabled": "<%= xmlrpc_enabled %>"<% end %>
+<% if @desciptorfile > " " %><% if propertyanz.to_i > 0 %> ,<% else %> <% end %><% propertyanz = propertyanz.to_i -%><% propertyanz += 1 -%>"desciptorfile": "<%= desciptorfile %>"<% end %>
+ }
}

Back to the top