3 environment variables are important: TWITTER_USER TWITTER_PASS HYDRA_BUILD_BASEURL
CXRCPDSQEWHSZNCJIORUAINH5I2FFFQ7AVUQOB62REGROLROPE7QC
QUTWJR7PQZ3DBPC4G2AFXOKPPGFZQLE5RLXHAOFTLMXIT2QPF4TQC
SAFVRDTKKD25U6VW5IVNUILLLXNQXFU72XARYC6NRVXU6MJEW2WAC
RWIBJ5L4MDV4XQIQXBB45RBVAK2IAK3IMP37YUX2SHW7YDKDAAXAC
7YBYT2LQML2PKEO6UO4444AGSASS664UCDXW2YO3ALB7THQHCEBQC
3BKF6P72K4YGWSQD5PO6PKNM3KXGFLONB3SONKRZR4DJHH3W3PSAC
OG7BEM57MXPCG56IT5GODPFG77KZXWPXZ7OVZPWQQ56CRJ7KUE2QC
KA45EBF5GVBBFQ2E6GSMDJ5ORSOJ7YP5EHAHLUZB226F7WNO6KYQC
sub sendTwitterNotification {
my ($build) = @_;
return unless (defined $ENV{'TWITTER_USER'} && defined $ENV{'TWITTER_PASS'});
my $addURL = defined $ENV{'HYDRA_BUILD_BASEURL'};
my $jobName = $build->project->name . ":" . $build->jobset->name . ":" . $build->job->name;
my $status = $build->resultInfo->buildstatus == 0 ? "SUCCEEDED" : "FAILED";
my $system = $build->system;
my $duration = ($build->resultInfo->stoptime - $build->resultInfo->starttime) . " seconds";
my $url = $ENV{'HYDRA_BUILD_BASEURL'}."/".$build->id ;