From d1c88db7ccb41f12574aea201ce83383d32a66d9 Mon Sep 17 00:00:00 2001 From: soulgalore Date: Tue, 30 Jul 2024 14:41:41 +0200 Subject: [PATCH] log testrunner version on startup --- testrunner/src/sitespeedio-testrunner.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testrunner/src/sitespeedio-testrunner.js b/testrunner/src/sitespeedio-testrunner.js index 0ab25d0..7649c6e 100644 --- a/testrunner/src/sitespeedio-testrunner.js +++ b/testrunner/src/sitespeedio-testrunner.js @@ -1,11 +1,15 @@ import log from 'intel'; import nconf from 'nconf'; import os from 'node:os'; +import { createRequire } from 'node:module'; import run from './testrunners/testrunner.js'; import runDocker from './testrunners/docker-testrunner.js'; import { queueHandler } from './queue/queuehandler.js'; +const require = createRequire(import.meta.url); +const version = require('../package.json').version; + const logger = log.getLogger('sitespeedio.testrunner'); const queues = []; @@ -30,7 +34,7 @@ export class SitespeedioTestRunner { logger.info('No hostname found in configuration. Will use %s', hostname); } - logger.info(`Starting testrunner ${hostname}`); + logger.info(`Starting testrunner ${hostname} version ${version}`); const testRunners = []; // Setup the queues for each job