mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-27 02:44:18 +00:00
de22c7bd1f
Summary: After this diff, when a user submits a diff from Facebook's VPN network, we'll automatically trigger a jenkins test. Once jenkins test is done, we'll update the diff with test results. Test Plan: Made sure that jenkins build is triggered on `arc diff` and that result is reflected back on the diff Reviewers: sdong, rven, kradhakrishnan, anthony, yhchiang Reviewed By: anthony Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D36555
33 lines
939 B
PHP
33 lines
939 B
PHP
<?php
|
|
// Copyright 2004-present Facebook. All Rights Reserved.
|
|
|
|
class FacebookArcanistConfiguration extends ArcanistConfiguration {
|
|
|
|
public function didRunWorkflow($command,
|
|
ArcanistBaseWorkflow $workflow,
|
|
$error_code) {
|
|
if ($command == 'diff' && !$workflow->isRawDiffSource()) {
|
|
$this->maybePushToJenkins($workflow);
|
|
}
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
/* Send off builds to jenkins */
|
|
function maybePushToJenkins($workflow) {
|
|
$diffID = $workflow->getDiffID();
|
|
if ($diffID === null) {
|
|
return;
|
|
}
|
|
|
|
$results = $workflow->getTestResults();
|
|
if (!$results) {
|
|
return;
|
|
}
|
|
|
|
$url = "https://ci-builds.fb.com/view/rocksdb/job/rocksdb_diff_check/"
|
|
."buildWithParameters?token=AUTH&DIFF_ID=$diffID";
|
|
system("curl --noproxy '*' \"$url\" > /dev/null 2>&1");
|
|
}
|
|
|
|
}
|