This commit is contained in:
RahulGautamSingh 2025-01-09 04:04:34 +05:30 committed by GitHub
commit 6a8d078e38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 106 additions and 52 deletions

View file

@ -76,7 +76,7 @@ type PackageJson = {
} }
const parsedContent = await getParsedContent(file); const parsedContent = await getParsedContent(file);
try { try {
logger.info(`Validating ${file}`); logger.info({ file }, 'Validating config file');
await validate('global', file, parsedContent, strict); await validate('global', file, parsedContent, strict);
} catch (err) { } catch (err) {
logger.warn({ file, err }, 'File is not valid Renovate config'); logger.warn({ file, err }, 'File is not valid Renovate config');
@ -97,7 +97,7 @@ type PackageJson = {
} }
const parsedContent = await getParsedContent(file); const parsedContent = await getParsedContent(file);
try { try {
logger.info(`Validating ${file}`); logger.info({ file }, 'Validating repository config file');
await validate('repo', file, parsedContent, strict); await validate('repo', file, parsedContent, strict);
} catch (err) { } catch (err) {
logger.warn({ file, err }, 'File is not valid Renovate config'); logger.warn({ file, err }, 'File is not valid Renovate config');
@ -140,7 +140,7 @@ type PackageJson = {
const fileConfig = await getFileConfig(process.env); const fileConfig = await getFileConfig(process.env);
if (!dequal(fileConfig, {})) { if (!dequal(fileConfig, {})) {
const file = process.env.RENOVATE_CONFIG_FILE ?? 'config.js'; const file = process.env.RENOVATE_CONFIG_FILE ?? 'config.js';
logger.info(`Validating ${file}`); logger.info({ file }, 'Validating global config file');
try { try {
await validate('global', file, fileConfig, strict); await validate('global', file, fileConfig, strict);
} catch (err) { } catch (err) {

View file

@ -64,8 +64,8 @@ export class GalaxyDatasource extends Datasource {
} }
if (body.results.length === 0) { if (body.results.length === 0) {
logger.info( logger.info(
{ dependency: packageName }, { dependency: packageName, url: galaxyAPIUrl },
`Received no results from ${galaxyAPIUrl}`, `Received no results from galaxy api`,
); );
return null; return null;
} }

View file

@ -7,7 +7,7 @@ export default function updateArtifacts({
const res: UpdateArtifactsResult[] = []; const res: UpdateArtifactsResult[] = [];
updatedDeps.forEach((dep) => { updatedDeps.forEach((dep) => {
// TODO: types (#22198) // TODO: types (#22198)
logger.info(`Updating submodule ${dep.depName}`); logger.info({ name: dep.depName }, 'Updating git-submodule');
res.push({ res.push({
file: { type: 'addition', path: dep.depName!, contents: '' }, file: { type: 'addition', path: dep.depName!, contents: '' },
}); });

View file

@ -49,7 +49,8 @@ export async function updateLockedDependency(
); );
if (lockedDeps.some((dep) => dep.bundled)) { if (lockedDeps.some((dep) => dep.bundled)) {
logger.info( logger.info(
`Package ${depName}@${currentVersion} is bundled and cannot be updated`, { depName, currentVersion },
'Package is bundled and cannot be updated',
); );
return { status: 'update-failed' }; return { status: 'update-failed' };
} }

View file

@ -13,8 +13,8 @@ export const Versioning = z
let versioning = versionings.get(versioningName); let versioning = versionings.get(versioningName);
if (!versioning) { if (!versioning) {
logger.info( logger.info(
{ versioning: versioningSpec }, { versioning: versioningSpec, defaultVersioning: defaultVersioning.id },
`Versioning: '${versioningSpec}' not found, falling back to ${defaultVersioning.id}`, 'Versioning not found, falling back to default versioning',
); );
return defaultVersioning.api; return defaultVersioning.api;
} }

View file

@ -131,7 +131,7 @@ export async function migrationPrExists(
async function handlePr(config: RenovateConfig, pr: Pr): Promise<void> { async function handlePr(config: RenovateConfig, pr: Pr): Promise<void> {
if (await scm.branchExists(pr.sourceBranch)) { if (await scm.branchExists(pr.sourceBranch)) {
if (GlobalConfig.get('dryRun')) { if (GlobalConfig.get('dryRun')) {
logger.info('DRY-RUN: Would delete branch ' + pr.sourceBranch); logger.info({ branch: pr.sourceBranch }, 'DRY-RUN: Would delete branch');
} else { } else {
await scm.deleteBranch(pr.sourceBranch); await scm.deleteBranch(pr.sourceBranch);
} }

View file

@ -118,7 +118,8 @@ Message: some-message
expect(res).toBeUndefined(); expect(res).toBeUndefined();
expect(logger.info).toHaveBeenCalledWith( expect(logger.info).toHaveBeenCalledWith(
`DRY-RUN: Would update PR #${pr.number}`, { prNumber: 1 },
'DRY-RUN: Would update PR',
); );
}); });

View file

@ -91,7 +91,7 @@ async function raiseWarningIssue(
async function handleOnboardingPr(pr: Pr, issueMessage: string): Promise<void> { async function handleOnboardingPr(pr: Pr, issueMessage: string): Promise<void> {
logger.debug('Updating onboarding PR with config error notice'); logger.debug('Updating onboarding PR with config error notice');
if (GlobalConfig.get('dryRun')) { if (GlobalConfig.get('dryRun')) {
logger.info(`DRY-RUN: Would update PR #${pr.number}`); logger.info({ prNumber: pr.number }, 'DRY-RUN: Would update PR');
return; return;
} }

View file

@ -90,7 +90,7 @@ async function cleanUpBranches(
} else if (branchIsModified) { } else if (branchIsModified) {
logger.debug('Orphan Branch is modified - skipping branch deletion'); logger.debug('Orphan Branch is modified - skipping branch deletion');
} else if (GlobalConfig.get('dryRun')) { } else if (GlobalConfig.get('dryRun')) {
logger.info(`DRY-RUN: Would delete orphan branch ${branchName}`); logger.info({ branchName }, 'DRY-RUN: Would delete orphan branch');
} else { } else {
logger.info({ branch: branchName }, `Deleting orphan branch`); logger.info({ branch: branchName }, `Deleting orphan branch`);
await scm.deleteBranch(branchName); await scm.deleteBranch(branchName);

View file

@ -258,7 +258,8 @@ describe('workers/repository/onboarding/pr/index', () => {
GlobalConfig.set({ dryRun: 'full' }); GlobalConfig.set({ dryRun: 'full' });
await ensureOnboardingPr(config, packageFiles, branches); await ensureOnboardingPr(config, packageFiles, branches);
expect(logger.info).toHaveBeenCalledWith( expect(logger.info).toHaveBeenCalledWith(
'DRY-RUN: Would check branch renovate/configure', { branch: 'renovate/configure' },
'DRY-RUN: Would check branch',
); );
expect(logger.info).toHaveBeenLastCalledWith( expect(logger.info).toHaveBeenLastCalledWith(
'DRY-RUN: Would create onboarding PR', 'DRY-RUN: Would create onboarding PR',
@ -275,7 +276,8 @@ describe('workers/repository/onboarding/pr/index', () => {
); );
await ensureOnboardingPr(config, packageFiles, branches); await ensureOnboardingPr(config, packageFiles, branches);
expect(logger.info).toHaveBeenCalledWith( expect(logger.info).toHaveBeenCalledWith(
'DRY-RUN: Would check branch renovate/configure', { branch: 'renovate/configure' },
'DRY-RUN: Would check branch',
); );
expect(logger.info).toHaveBeenLastCalledWith( expect(logger.info).toHaveBeenLastCalledWith(
'DRY-RUN: Would update onboarding PR', 'DRY-RUN: Would update onboarding PR',

View file

@ -124,7 +124,10 @@ If you need any further assistance then you can also [request help here](${
let configDesc = ''; let configDesc = '';
if (GlobalConfig.get('dryRun')) { if (GlobalConfig.get('dryRun')) {
// TODO: types (#22198) // TODO: types (#22198)
logger.info(`DRY-RUN: Would check branch ${config.onboardingBranch!}`); logger.info(
{ branch: config.onboardingBranch },
'DRY-RUN: Would check branch',
);
} else { } else {
configDesc = getConfigDesc(config, packageFiles!); configDesc = getConfigDesc(config, packageFiles!);
} }

View file

@ -408,7 +408,12 @@ describe('workers/repository/process/vulnerabilities', () => {
packageFiles, packageFiles,
); );
expect(logger.logger.info).toHaveBeenCalledWith( expect(logger.logger.info).toHaveBeenCalledWith(
'No fixed version available for vulnerability GHSA-xxxx-yyyy-zzzz in fake 4.17.11', {
vulnerabilityId: 'GHSA-xxxx-yyyy-zzzz',
packageName: 'fake',
version: '4.17.11',
},
'No fixed version available for vulnerability',
); );
}); });
@ -450,7 +455,12 @@ describe('workers/repository/process/vulnerabilities', () => {
packageFiles, packageFiles,
); );
expect(logger.logger.info).toHaveBeenCalledWith( expect(logger.logger.info).toHaveBeenCalledWith(
'No fixed version available for vulnerability GHSA-xxxx-yyyy-zzzz in fake 1.5.1', {
vulnerabilityId: 'GHSA-xxxx-yyyy-zzzz',
packageName: 'fake',
version: '1.5.1',
},
'No fixed version available for vulnerability',
); );
}); });

View file

@ -484,7 +484,8 @@ export class Vulnerabilities {
} = vul; } = vul;
if (is.nullOrUndefined(fixedVersion)) { if (is.nullOrUndefined(fixedVersion)) {
logger.info( logger.info(
`No fixed version available for vulnerability ${vulnerability.id} in ${packageName} ${depVersion}`, { vulnerabilityId: vulnerability.id, packageName, version: depVersion },
'No fixed version available for vulnerability',
); );
return null; return null;
} }

View file

@ -30,7 +30,10 @@ export async function setArtifactErrorStatus(
if (existingState !== state) { if (existingState !== state) {
logger.debug(`Updating status check state to failed`); logger.debug(`Updating status check state to failed`);
if (GlobalConfig.get('dryRun')) { if (GlobalConfig.get('dryRun')) {
logger.info('DRY-RUN: Would set branch status in ' + config.branchName); logger.info(
{ branch: config.branchName },
'DRY-RUN: Would set branch status',
);
} else { } else {
await platform.setBranchStatus({ await platform.setBranchStatus({
branchName: config.branchName, branchName: config.branchName,

View file

@ -43,7 +43,10 @@ export async function tryBranchAutomerge(
try { try {
if (GlobalConfig.get('dryRun')) { if (GlobalConfig.get('dryRun')) {
// TODO: types (#22198) // TODO: types (#22198)
logger.info(`DRY-RUN: Would automerge branch ${config.branchName!}`); logger.info(
{ branch: config.branchName },
'DRY-RUN: Would automerge branch',
);
} else { } else {
await scm.checkoutBranch(config.baseBranch!); await scm.checkoutBranch(config.baseBranch!);
await scm.mergeAndPush(config.branchName!); await scm.mergeAndPush(config.branchName!);

View file

@ -37,7 +37,10 @@ export function commitFilesToBranch(
logger.debug(`${fileLength} file(s) to commit`); logger.debug(`${fileLength} file(s) to commit`);
// istanbul ignore if // istanbul ignore if
if (GlobalConfig.get('dryRun')) { if (GlobalConfig.get('dryRun')) {
logger.info('DRY-RUN: Would commit files to branch ' + config.branchName); logger.info(
{ branch: config.branchName },
'DRY-RUN: Would commit files to branch',
);
return Promise.resolve(null); return Promise.resolve(null);
} }
// istanbul ignore if // istanbul ignore if

View file

@ -30,7 +30,8 @@ export async function handleClosedPr(
if (!config.suppressNotifications!.includes('prIgnoreNotification')) { if (!config.suppressNotifications!.includes('prIgnoreNotification')) {
if (GlobalConfig.get('dryRun')) { if (GlobalConfig.get('dryRun')) {
logger.info( logger.info(
`DRY-RUN: Would ensure closed PR comment in PR #${pr.number}`, { prNumber: pr.number },
'DRY-RUN: Would ensure closed PR comment',
); );
} else { } else {
await ensureComment({ await ensureComment({
@ -42,7 +43,10 @@ export async function handleClosedPr(
} }
if (await scm.branchExists(config.branchName)) { if (await scm.branchExists(config.branchName)) {
if (GlobalConfig.get('dryRun')) { if (GlobalConfig.get('dryRun')) {
logger.info('DRY-RUN: Would delete branch ' + config.branchName); logger.info(
{ branch: config.branchName },
'DRY-RUN: Would delete branch',
);
} else { } else {
await scm.deleteBranch(config.branchName); await scm.deleteBranch(config.branchName);
} }
@ -71,7 +75,8 @@ export async function handleModifiedPr(
logger.debug('Manual rebase has been requested for PR'); logger.debug('Manual rebase has been requested for PR');
if (GlobalConfig.get('dryRun')) { if (GlobalConfig.get('dryRun')) {
logger.info( logger.info(
`DRY-RUN: Would remove edited/blocked PR comment in PR #${pr.number}`, { prNumber: pr.number },
'DRY-RUN: Would remove edited/blocked PR comment in PR',
); );
return; return;
} }
@ -84,7 +89,8 @@ export async function handleModifiedPr(
} else { } else {
if (GlobalConfig.get('dryRun')) { if (GlobalConfig.get('dryRun')) {
logger.info( logger.info(
`DRY-RUN: Would ensure edited/blocked PR comment in PR #${pr.number}`, { prNumber: pr.number },
'DRY-RUN: Would ensure edited/blocked PR comment in PR',
); );
return; return;
} }

View file

@ -1295,7 +1295,8 @@ describe('workers/repository/update/branch/index', () => {
result: 'pr-edited', result: 'pr-edited',
}); });
expect(logger.info).toHaveBeenCalledWith( expect(logger.info).toHaveBeenCalledWith(
`DRY-RUN: Would ensure edited/blocked PR comment in PR #${pr.number}`, { prNumber: 1 },
'DRY-RUN: Would ensure edited/blocked PR comment in PR',
); );
expect(platform.updatePr).toHaveBeenCalledTimes(0); expect(platform.updatePr).toHaveBeenCalledTimes(0);
}); });
@ -1340,7 +1341,8 @@ describe('workers/repository/update/branch/index', () => {
commitSha: null, commitSha: null,
}); });
expect(logger.info).toHaveBeenCalledWith( expect(logger.info).toHaveBeenCalledWith(
`DRY-RUN: Would remove edited/blocked PR comment in PR #${pr.number}`, { prNumber: pr.number },
'DRY-RUN: Would remove edited/blocked PR comment in PR',
); );
}); });
@ -1387,7 +1389,8 @@ describe('workers/repository/update/branch/index', () => {
commitSha: null, commitSha: null,
}); });
expect(logger.info).toHaveBeenCalledWith( expect(logger.info).toHaveBeenCalledWith(
'DRY-RUN: Would ensure comment removal in PR #undefined', { prNumber: undefined },
'DRY-RUN: Would ensure comment removal in PR',
); );
}); });

View file

@ -69,9 +69,8 @@ async function rebaseCheck(
// istanbul ignore if // istanbul ignore if
if (GlobalConfig.get('dryRun')) { if (GlobalConfig.get('dryRun')) {
logger.info( logger.info(
`DRY-RUN: Would delete label ${config.rebaseLabel!} from #${ { rebaseLevel: config.rebaseLabel, prNumber: branchPr.number },
branchPr.number 'DRY-RUN: Would delete rebase label from PR',
}`,
); );
} else { } else {
await platform.deleteLabel(branchPr.number, config.rebaseLabel!); await platform.deleteLabel(branchPr.number, config.rebaseLabel!);
@ -552,7 +551,8 @@ export async function processBranch(
// istanbul ignore if // istanbul ignore if
if (GlobalConfig.get('dryRun')) { if (GlobalConfig.get('dryRun')) {
logger.info( logger.info(
`DRY-RUN: Would ensure comment removal in PR #${branchPr.number}`, { prNumber: branchPr.number },
'DRY-RUN: Would ensure comment removal in PR',
); );
} else { } else {
// Remove artifacts error comment only if this run has successfully updated artifacts // Remove artifacts error comment only if this run has successfully updated artifacts
@ -625,7 +625,7 @@ export async function processBranch(
} }
if (commitSha) { if (commitSha) {
const action = branchExists ? 'updated' : 'created'; const action = branchExists ? 'updated' : 'created';
logger.info({ commitSha }, `Branch ${action}`); logger.info({ commitSha, action }, 'Branch processing complete');
} }
// Set branch statuses // Set branch statuses
await setArtifactErrorStatus(config); await setArtifactErrorStatus(config);
@ -659,7 +659,10 @@ export async function processBranch(
logger.debug(`mergeStatus=${mergeStatus}`); logger.debug(`mergeStatus=${mergeStatus}`);
if (mergeStatus === 'automerged') { if (mergeStatus === 'automerged') {
if (GlobalConfig.get('dryRun')) { if (GlobalConfig.get('dryRun')) {
logger.info('DRY-RUN: Would delete branch' + config.branchName); logger.info(
{ branch: config.branchName },
'DRY-RUN: Would delete branch',
);
} else { } else {
await deleteBranchSilently(config.branchName); await deleteBranchSilently(config.branchName);
} }
@ -882,7 +885,8 @@ export async function processBranch(
) { ) {
if (GlobalConfig.get('dryRun')) { if (GlobalConfig.get('dryRun')) {
logger.info( logger.info(
`DRY-RUN: Would ensure lock file error comment in PR #${pr.number}`, { prNumber: pr.number },
'DRY-RUN: Would ensure lock file error comment in PR',
); );
} else { } else {
await ensureComment({ await ensureComment({

View file

@ -96,7 +96,8 @@ export async function checkAutoMerge(
// istanbul ignore if // istanbul ignore if
if (GlobalConfig.get('dryRun')) { if (GlobalConfig.get('dryRun')) {
logger.info( logger.info(
`DRY-RUN: Would add PR automerge comment to PR #${pr.number}`, { prNumber: pr.number },
'DRY-RUN: Would add PR automerge comment to PR',
); );
return { return {
automerged: false, automerged: false,
@ -122,9 +123,8 @@ export async function checkAutoMerge(
if (GlobalConfig.get('dryRun')) { if (GlobalConfig.get('dryRun')) {
// TODO: types (#22198) // TODO: types (#22198)
logger.info( logger.info(
`DRY-RUN: Would merge PR #${ { prNumber: pr.number, automergeStrategy },
pr.number 'DRY-RUN: Would merge PR with configured automergeStrategy',
} with strategy "${automergeStrategy!}"`,
); );
return { return {
automerged: false, automerged: false,

View file

@ -502,7 +502,8 @@ describe('workers/repository/update/pr/index', () => {
expect(platform.updatePr).not.toHaveBeenCalled(); expect(platform.updatePr).not.toHaveBeenCalled();
expect(platform.createPr).not.toHaveBeenCalled(); expect(platform.createPr).not.toHaveBeenCalled();
expect(logger.logger.info).toHaveBeenCalledWith( expect(logger.logger.info).toHaveBeenCalledWith(
`DRY-RUN: Would create PR: ${prTitle}`, { prTitle: 'Some title' },
'DRY-RUN: Would create PR',
); );
}); });
@ -516,7 +517,8 @@ describe('workers/repository/update/pr/index', () => {
expect(platform.updatePr).not.toHaveBeenCalled(); expect(platform.updatePr).not.toHaveBeenCalled();
expect(platform.createPr).not.toHaveBeenCalled(); expect(platform.createPr).not.toHaveBeenCalled();
expect(logger.logger.info).toHaveBeenCalledWith( expect(logger.logger.info).toHaveBeenCalledWith(
`DRY-RUN: Would update PR #${pr.number}`, { prNumber: 123 },
'DRY-RUN: Would update PR',
); );
}); });

View file

@ -453,7 +453,10 @@ export async function ensurePr(
} }
if (GlobalConfig.get('dryRun')) { if (GlobalConfig.get('dryRun')) {
logger.info(`DRY-RUN: Would update PR #${existingPr.number}`); logger.info(
{ prNumber: existingPr.number },
'DRY-RUN: Would update PR',
);
return { type: 'with-pr', pr: existingPr }; return { type: 'with-pr', pr: existingPr };
} else { } else {
await platform.updatePr(updatePrConfig); await platform.updatePr(updatePrConfig);
@ -476,7 +479,7 @@ export async function ensurePr(
} }
let pr: Pr | null; let pr: Pr | null;
if (GlobalConfig.get('dryRun')) { if (GlobalConfig.get('dryRun')) {
logger.info('DRY-RUN: Would create PR: ' + prTitle); logger.info({ prTitle }, 'DRY-RUN: Would create PR');
pr = { number: 0 } as never; pr = { number: 0 } as never;
} else { } else {
try { try {
@ -537,7 +540,10 @@ export async function ensurePr(
content = platform.massageMarkdown(content); content = platform.massageMarkdown(content);
logger.debug('Adding branch automerge failure message to PR'); logger.debug('Adding branch automerge failure message to PR');
if (GlobalConfig.get('dryRun')) { if (GlobalConfig.get('dryRun')) {
logger.info(`DRY-RUN: Would add comment to PR #${pr.number}`); logger.info(
{ prNumber: pr.number },
'DRY-RUN: Would add comment to PR',
);
} else { } else {
await ensureComment({ await ensureComment({
number: pr.number, number: pr.number,

View file

@ -57,7 +57,10 @@ export async function addParticipants(
} }
if (assignees.length > 0) { if (assignees.length > 0) {
if (GlobalConfig.get('dryRun')) { if (GlobalConfig.get('dryRun')) {
logger.info(`DRY-RUN: Would add assignees to PR #${pr.number}`); logger.info(
{ prNumber: pr.number },
'DRY-RUN: Would add assignees to PR',
);
} else { } else {
await platform.addAssignees(pr.number, assignees); await platform.addAssignees(pr.number, assignees);
logger.debug({ assignees }, 'Added assignees'); logger.debug({ assignees }, 'Added assignees');
@ -98,7 +101,10 @@ export async function addParticipants(
} }
if (reviewers.length > 0) { if (reviewers.length > 0) {
if (GlobalConfig.get('dryRun')) { if (GlobalConfig.get('dryRun')) {
logger.info(`DRY-RUN: Would add reviewers to PR #${pr.number}`); logger.info(
{ prNumber: pr.number },
'DRY-RUN: Would add reviewers to PR',
);
} else { } else {
await platform.addReviewers(pr.number, reviewers); await platform.addReviewers(pr.number, reviewers);
logger.debug({ reviewers }, 'Added reviewers'); logger.debug({ reviewers }, 'Added reviewers');

View file

@ -17,7 +17,7 @@ import { generateVersioning } from './versioning';
export async function generateDocs(root = 'tmp', pack = true): Promise<void> { export async function generateDocs(root = 'tmp', pack = true): Promise<void> {
try { try {
const dist = `${root}/docs`; const dist = `${root}/docs`;
logger.info(`generating docs to '${dist}'`); logger.info({ distFolder: dist }, 'generating docs to dist folder');
await fs.mkdir(`${dist}/`, { recursive: true }); await fs.mkdir(`${dist}/`, { recursive: true });

View file

@ -29,7 +29,7 @@ const program = new Command('pnpm release:prepare')
void (async () => { void (async () => {
await program.parseAsync(); await program.parseAsync();
const opts = program.opts(); const opts = program.opts();
logger.info(`Preparing v${opts.version} ...`); logger.info({ version: opts.version }, 'Preparing release...');
build(); build();
await generateDocs(); await generateDocs();
await bake('build', opts); await bake('build', opts);

View file

@ -21,7 +21,7 @@ const program = new Command('pnpm release:prepare')
void (async () => { void (async () => {
await program.parseAsync(); await program.parseAsync();
const opts = program.opts(); const opts = program.opts();
logger.info(`Publishing v${opts.version}...`); logger.info({ version: opts.version }, 'Publishing release...');
const meta = await bake('push', opts); const meta = await bake('push', opts);
if (meta?.['push-slim']?.['containerimage.digest']) { if (meta?.['push-slim']?.['containerimage.digest']) {

View file

@ -68,7 +68,7 @@ export async function bake(
logger.debug(`Error occured:\n ${result.stderr}`); logger.debug(`Error occured:\n ${result.stderr}`);
const delay = opts.delay ? toMs(opts.delay) : null; const delay = opts.delay ? toMs(opts.delay) : null;
if (delay) { if (delay) {
logger.info(`Retrying in ${opts.delay} ...`); logger.info({ delay: opts.delay }, 'Retrying ...');
await setTimeout(delay); await setTimeout(delay);
} }
} else { } else {
@ -97,7 +97,7 @@ export function sign(
exitOnError?: boolean; exitOnError?: boolean;
}, },
): void { ): void {
logger.info(`Signing ${image} ...`); logger.info({ image }, 'Signing image ...');
const result = exec('cosign', ['sign', '--yes', image]); const result = exec('cosign', ['sign', '--yes', image]);
if (result.signal) { if (result.signal) {
logger.error(`Signal received: ${result.signal}`); logger.error(`Signal received: ${result.signal}`);