Remove Twitter notification support

[?]
May 3, 2013, 4:33 PM
TRFRGOBDUIJI4GPA4LXTG2DHBKOJZ24ILHKLKPLKRCBFUVXBSZDQC

Dependencies

  • [2] RTDA3GQ4
  • [3] PMNWRTGJ Add multiple output support
  • [4] OG7BEM57
  • [5] 6KCP6ODP * Get the URI for use in notification mails from the Hydra config
  • [6] TJK27WSB Open the DB using Hydra::Model::DB->new
  • [7] AWZEBCMS Use the JSON module
  • [8] TULPZ62Y * Perform builds in parallel.
  • [9] RBGYFVWX use HYDRA_DATA/hydra.conf as default location for hydra.conf
  • [10] RWIBJ5L4 * Autoflush stdout.
  • [11] AFTXA575 * $HYDRA_DATA environment variable.
  • [12] 7YBYT2LQ
  • [13] HPEG2RHV Merge the BuildResultInfo table into the Builds table
  • [14] YFPZ46YK * hydra: added variant of build input type, 'build output (same system)' to allow better continous integration in one jobset for multiple system. it makes sure that the system of the build that is passed as input for a job has the same system as the job.
  • [15] KA45EBF5 * Send email if a build fails.
  • [16] 3BKF6P72 * Use Nix's negative caching.
  • [17] WQXF2T3D hydra-evaluator: Don't require $HYDRA_CONFIG
  • [18] QBQSQOSY hydra: moved getbuildlog
  • [19] FR7XCVLK
  • [20] MPGVCHVF * Fix an apparent incompatibility with recent DBIx::Class.
  • [21] ALXRI3Y5 hydra: removed need for HYDRA_BUILD_BASEURL env variable
  • [22] CXRCPDSQ * added support for twitter notification
  • [23] SAFVRDTK * Put Hydra's dependencies so that they can easily be installed in a
  • [24] QUTWJR7P * Include more info in notification emails.
  • [25] RBHHV7P7 * Read logs using logContents function in stead of handling it everywhere separately.
  • [26] FHAVPTZ6 Hydra/23: added some X-headers with meta info in email notifications, added more descriptive status
  • [27] FYO6NECE hydra
  • [28] TH674WKJ add log diff to compare logs to previous builds
  • [29] AMFMXR52 Provide a command ‘hydra-init’ to initialise/upgrade the database

Change contents

  • edit in deps.nix at line 27
    [4.49][4.0:30](),[4.407][4.0:30](),[4.25][4.0:30]()
    perlPackages.NetTwitterLite
  • edit in src/script/hydra-build at line 20
    [4.69][4.31:55]()
    use Net::Twitter::Lite;
  • edit in src/script/hydra-build at line 28
    [4.199][4.23:24](),[4.23][4.23:24](),[4.64][4.0:1](),[4.86][4.0:1](),[4.381][4.0:1](),[4.1093][4.0:1](),[4.57][4.57:193](),[4.193][4.200:248](),[4.46][4.247:345](),[4.248][4.247:345](),[4.247][4.247:345](),[4.345][4.9574:9644](),[4.9644][4.427:462](),[4.427][4.427:462](),[4.462][4.747:819](),[4.819][4.249:308](),[4.104][4.400:401](),[4.308][4.400:401](),[4.618][4.400:401](),[4.153][4.400:401](),[4.401][4.619:699](),[4.699][2.0:85](),[2.85][4.740:749](),[4.740][4.740:749]()
    sub sendTwitterNotification {
    my ($build) = @_;
    return unless (defined $ENV{'TWITTER_USER'} && defined $ENV{'TWITTER_PASS'});
    my $addURL = defined $config->{'base_uri'};
    my $jobName = $build->project->name . ":" . $build->jobset->name . ":" . $build->job->name;
    my $status = $build->buildstatus == 0 ? "SUCCEEDED" : "FAILED";
    my $system = $build->system;
    my $duration = ($build->stoptime - $build->starttime) . " seconds";
    my $url = $config->{'base_uri'}."/build/".$build->id ;
    my $nt = Net::Twitter::Lite->new(
    username => $ENV{'TWITTER_USER'},
    password => $ENV{'TWITTER_PASS'},
    clientname => "Hydra Build Daemon"
    );
  • edit in src/script/hydra-build at line 29
    [4.402][4.750:787](),[4.787][4.820:884](),[4.884][4.852:935](),[4.852][4.852:935]()
    my $tag = $build->project->name;
    my $msg = "$jobName ($system): $status in $duration #$tag";
    if (length($msg) + 1 + length($url) <= 140) {
    $msg = "$msg $url" ;
    }
  • edit in src/script/hydra-build at line 30
    [4.886][4.940:1032](),[4.940][4.940:1032](),[4.3][4.1032:1033](),[4.1032][4.1032:1033](),[4.1033][3.15666:15667]()
    eval {
    my $result = eval { $nt->update($msg) };
    };
    warn "$@\n" if $@;
    }
  • edit in src/script/hydra-build at line 448
    [4.1403][4.1034:1070]()
    sendTwitterNotification $build;
  • edit in src/script/hydra-build at line 458
    [4.1085][4.1085:1189](),[4.1189][4.1503:1517](),[4.1503][4.1503:1517]()
    if ($ENV{'HYDRA_TWITTER_TEST'}) {
    sendTwitterNotification $db->resultset('Builds')->find($buildId);
    exit 0;
    }