@knapsack-pro/core
Version:
Knapsack Pro Core library splits tests across CI nodes and makes sure that tests will run in optimal time on each CI node. This library gives core features like communication with KnapsackPro.com API. This library is a dependency for other projects specif
41 lines (40 loc) • 1.11 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SemaphoreCI = void 0;
const _1 = require(".");
class SemaphoreCI extends _1.CIProviderBase {
static get ciNodeTotal() {
return process.env.SEMAPHORE_THREAD_COUNT;
}
static get ciNodeIndex() {
const currentThread = process.env.SEMAPHORE_CURRENT_THREAD;
if (currentThread) {
return (parseInt(currentThread, 10) - 1).toString();
}
}
static get ciNodeBuildId() {
return process.env.SEMAPHORE_BUILD_NUMBER;
}
static get ciNodeRetryCount() {
return undefined;
}
static get commitHash() {
return process.env.REVISION;
}
static get branch() {
return process.env.BRANCH_NAME;
}
static get userSeat() {
return undefined;
}
static get detect() {
return 'SEMAPHORE_BUILD_NUMBER' in process.env ? this : null;
}
static get fixedQueueSplit() {
return false;
}
static get ciProvider() {
return 'Semaphore CI 1.0';
}
}
exports.SemaphoreCI = SemaphoreCI;