Comparing version 1.0.75 to 1.0.76
@@ -106,2 +106,23 @@ // Locking functions for communication with the lockserver | ||
function generateClientName() { | ||
const _prefixDash = s => s ? `${s}-` : ''; | ||
const {env} = process; | ||
if (env.CI_PROJECT_NAME && env.CI_COMMIT_SHA) { | ||
// Running in CI | ||
const commitName = (env.CI_COMMIT_TAG || env.CI_BRANCH || '').slice(0, 30); | ||
const commitHash = env.CI_COMMIT_SHORT_SHA || env.CI_COMMIT_SHA; | ||
const envName = env.CI_ENVIRONMENT_NAME || ''; | ||
return ( | ||
`ci-${env.CI_PROJECT_NAME.slice(0, 20)}` + | ||
`${_prefixDash(commitName)}-${commitHash}${_prefixDash(envName)} | ||
${_prefixDash(env.CI_PIPELINE_ID)}-${Date.now()}` | ||
); | ||
} | ||
return `${os.hostname()}-${os.userInfo().username}-${Date.now()}`; | ||
} | ||
function prepare(config) { | ||
@@ -111,3 +132,4 @@ if (! config.external_locking_url) { | ||
} | ||
config.external_locking_client = `${os.hostname()}-${os.userInfo().username}-${Date.now()}`; | ||
config.external_locking_client = generateClientName(); | ||
if (config.locking_verbose) { | ||
@@ -114,0 +136,0 @@ output.log(config, `[exlocking] Client id: ${config.external_locking_client}`); |
{ | ||
"name": "pentf", | ||
"version": "1.0.75", | ||
"version": "1.0.76", | ||
"description": "parallel end-to-end test framework", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
306981
7054