summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Thorson2013-01-16 04:15:36 (GMT)
committer Jeremy Thorson2013-01-16 04:15:36 (GMT)
commit11466a22d245c553ae3b7e3fa09312bb8b4044cf (patch)
tree92c64723ccf7b240a76dc4d4aaaf97f00fe9df08
parentb2d1982a255bc69e055f8e950051504276b6f640 (diff)
qa.staging.devdrupal.org version of scriptstaging
-rw-r--r--kick_pifr.php55
1 files changed, 34 insertions, 21 deletions
diff --git a/kick_pifr.php b/kick_pifr.php
index 95e240e..b472acd 100644
--- a/kick_pifr.php
+++ b/kick_pifr.php
@@ -9,7 +9,8 @@ ini_set('display_errors', TRUE);
include(DRUPAL_ROOT . '/includes/xmlrpc.inc');
-$key = file_get_contents('key.txt');
+// Need to trim whitespace, or the key doesn't match up to a client
+$key = trim(file_get_contents('key.txt'));
$batch = array(
'branches' => array(),
@@ -26,24 +27,50 @@ $key = file_get_contents('key.txt');
);
$batch['branches'][] = array(
+ // Project identifier represents the Project NID on drupal.org
'project_identifier' => 3060,
- 'client_identifier' => 716,
- 'vcs_identifier' => '7.16',
+ // Client identifier represents the Release NID on drupal.org
+ //'client_identifier' => 572834, // 8.x-dev
+ 'client_identifier' => 156281, // 7.x-dev
+ //'client_identifier' => 97386, // 6.x-dev
+ // VCS identifier represents the actual branch / tag name to checkout
+ 'vcs_identifier' => '7.x',
'plugin_argument' => array(
+ // 'drupal.core.version' => '8',
'drupal.core.version' => '7',
+ // 'drupal.core.version' => '6',
),
'test' => FALSE,
'link' => 'http://code.example.com/example-branch',
);
$batch['files'][] = array(
- 'branch_identifier' => 716,
- 'client_identifier' => 19487298, // unique number for the file.
+ // Branch identifier is the same as 'client identifier' above
+ 'branch_identifier' => 156281,
+ // Client identifier is a unique identifier for this file (fid)
+ 'client_identifier' => 19487298,
'file_url' => 'http://drupal.org/files/dropbutton-1799498-45.patch',
);
-echo "Sending request to http://qa.drupal.org/xmlrpc.php\n";
-print_r(_xmlrpc('http://qa.drupal.org/xmlrpc.php', array('pifr.queue' => array($key, $batch))));
+echo "Sending request to http://qa.staging.devdrupal.org/xmlrpc.php\n";
+// Need to prefix http auth username/password for staging
+// Modified to use D6 xmlrpc function signature
+if ($response = xmlrpc('http://drupal:drupal@qa.staging.devdrupal.org/xmlrpc.php', 'pifr.queue', $key, $batch)) {
+
+ foreach (array_merge($response['branches'], $response['files']) as $test) {
+ $tests[] = l('#' . $test, 'pifr/test/' . $test);
+ }
+
+ if ($tests) {
+ echo theme('item_list', $tests);
+ }
+ else {
+ echo 'No test(s) queued. The tests are most likely already queued.';
+ }
+}
+else {
+ echo("XMLRPC Call Failed");
+}
// The response is something like this,
// http://qa.drupal.org/pifr/test/377058
@@ -61,17 +88,3 @@ print_r(_xmlrpc('http://qa.drupal.org/xmlrpc.php', array('pifr.queue' => array($
//
// )
-function print_tests(array $response) {
- echo 'Queued tests:<br />';
- $tests = array();
- foreach (array_merge($response['branches'], $response['files']) as $test) {
- $tests[] = l('#' . $test, 'pifr/test/' . $test);
- }
-
- if ($tests) {
- echo theme('item_list', $tests);
- }
- else {
- echo 'No test(s) queued. The tests are most likely already queued.';
- }
-}