UNPKG

@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

43 lines (42 loc) 1.16 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SemaphoreCI2 = void 0; const _1 = require("."); class SemaphoreCI2 extends _1.CIProviderBase { static get ciNodeTotal() { return process.env.SEMAPHORE_JOB_COUNT; } static get ciNodeIndex() { const jobIndex = process.env.SEMAPHORE_JOB_INDEX; if (jobIndex) { return (parseInt(jobIndex, 10) - 1).toString(); } } static get ciNodeBuildId() { return process.env.SEMAPHORE_WORKFLOW_ID; } static get ciNodeRetryCount() { return undefined; } static get commitHash() { return process.env.SEMAPHORE_GIT_SHA; } static get branch() { return process.env.SEMAPHORE_GIT_BRANCH; } static get userSeat() { return undefined; } static get detect() { return 'SEMAPHORE' in process.env && 'SEMAPHORE_WORKFLOW_ID' in process.env ? this : null; } static get fixedQueueSplit() { return false; } static get ciProvider() { return 'Semaphore CI 2.0'; } } exports.SemaphoreCI2 = SemaphoreCI2;