Skip to content

Instantly share code, notes, and snippets.

View smartgammadev's full-sized avatar

Smart Gamma smartgammadev

View GitHub Profile
@smartgammadev
smartgammadev / retry_failed
Last active February 9, 2022 10:47
Smart Gamma CI script that allows to collect all failed Behat tests executed in multithreading mode at Jenkins console output log and pass it to behat for restart
#!/usr/bin/env php
<?php
$logFilename = getenv('JENKINS_HOME') . '/'. str_replace(getenv('JENKINS_URL'), '', getenv('JOB_URL'));
$logFilename = str_replace('/job/', '/jobs/', $logFilename) . 'builds/'. getenv('BUILD_NUMBER') . '/log';
$text = file_get_contents($logFilename);
preg_match_all('/Failed scenarios:(.*?)\d+\sscenario/is', $text, $m);
list($original, $threads) = $m;
@smartgammadev
smartgammadev / 0_reuse_code.js
Last active June 2, 2017 11:28
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console