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HVFX673NHLU3TXNLAVEVP4PJSMVBMZOQQKD53N6KAG6CTLQC
KA45EBF5GVBBFQ2E6GSMDJ5ORSOJ7YP5EHAHLUZB226F7WNO6KYQC
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"
);