Skip to content

Commit

Permalink
Merge pull request #849 from wordpress-mobile/add/build-ci-video-url
Browse files Browse the repository at this point in the history
log jobURL at end of successful job
  • Loading branch information
JavonDavis authored Apr 18, 2019
2 parents 7021a13 + 4eb75bc commit c8f12c3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions __device-tests__/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/
import childProcess from 'child_process';
import wd from 'wd';
import crypto from 'crypto';

/**
* Internal dependencies
Expand Down Expand Up @@ -108,6 +109,16 @@ const setupDriver = async () => {
};

const stopDriver = async ( driver: wd.PromiseChainWebdriver ) => {
if ( ! isLocalEnvironment() ) {
const jobID = driver.sessionID;

const hash = crypto.createHmac( 'md5', jobID )
.update( serverConfigs.sauce.auth )
.digest( 'hex' );
const jobURL = `https://saucelabs.com/jobs/${ jobID }?auth=${ hash }.`;
// eslint-disable-next-line no-console
console.log( `You can view the video of this test run at ${ jobURL }` );
}
if ( driver === undefined ) {
return;
}
Expand Down

0 comments on commit c8f12c3

Please sign in to comment.