Merge pull request #5443 from BryceLTaylor/use-circle-build-number

Use circleCI build ID for saucelabs test names instead
This commit is contained in:
Bryce Taylor 2021-05-18 13:57:12 -04:00 committed by GitHub
commit 6a3b76865c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View file

@ -5,7 +5,8 @@ require('chromedriver');
const headless = process.env.SMOKE_HEADLESS || false; const headless = process.env.SMOKE_HEADLESS || false;
const remote = process.env.SMOKE_REMOTE || false; const remote = process.env.SMOKE_REMOTE || false;
const ci = process.env.CI || false; const ci = process.env.CI || false;
const buildID = process.env.TRAVIS_BUILD_NUMBER; const usingCircle = process.env.CIRCLECI || false;
const buildID = process.env.CIRCLE_WORKFLOW_ID || '0000';
const {SAUCE_USERNAME, SAUCE_ACCESS_KEY} = process.env; const {SAUCE_USERNAME, SAUCE_ACCESS_KEY} = process.env;
const {By, Key, until} = webdriver; const {By, Key, until} = webdriver;
@ -35,7 +36,8 @@ class SeleniumHelper {
if (remote === 'true'){ if (remote === 'true'){
let nameToUse; let nameToUse;
if (ci === 'true'){ if (ci === 'true'){
nameToUse = 'travis ' + buildID + ' : ' + name; let ciName = usingCircle ? 'circleCi ' : 'unknown ';
nameToUse = ciName + buildID + ' : ' + name;
} else { } else {
nameToUse = name; nameToUse = name;
} }

View file

@ -6,7 +6,8 @@ const chromedriverVersion = require('chromedriver').version;
const headless = process.env.SMOKE_HEADLESS || false; const headless = process.env.SMOKE_HEADLESS || false;
const remote = process.env.SMOKE_REMOTE || false; const remote = process.env.SMOKE_REMOTE || false;
const ci = process.env.CI || false; const ci = process.env.CI || false;
const buildID = process.env.TRAVIS_BUILD_NUMBER; const usingCircle = process.env.CIRCLECI || false;
const buildID = process.env.CIRCLE_WORKFLOW_ID || '0000';
const {SAUCE_USERNAME, SAUCE_ACCESS_KEY} = process.env; const {SAUCE_USERNAME, SAUCE_ACCESS_KEY} = process.env;
const {By, Key, until} = webdriver; const {By, Key, until} = webdriver;
@ -36,7 +37,8 @@ class SeleniumHelper {
if (remote === 'true'){ if (remote === 'true'){
let nameToUse; let nameToUse;
if (ci === 'true'){ if (ci === 'true'){
nameToUse = 'travis ' + buildID + ' : ' + name; let ciName = usingCircle ? 'circleCi ' : 'unknown ';
nameToUse = ciName + buildID + ' : ' + name;
} else { } else {
nameToUse = name; nameToUse = name;
} }