diff --git a/lib/manager/bundler/artifacts.js b/lib/manager/bundler/artifacts.js index 998db43eae03a69eff01efdc38aa4a1d8f8289ed..b8f09b3c4b98c8413b06160d9be58a0389b1516e 100644 --- a/lib/manager/bundler/artifacts.js +++ b/lib/manager/bundler/artifacts.js @@ -23,6 +23,11 @@ async function getArtifacts( config ) { logger.debug(`bundler.getArtifacts(${packageFileName})`); + // istanbul ignore if + if (global.repoCache.bundlerArtifactsError) { + logger.info('Aborting Bundler artifacts due to previous failed attempt'); + throw new Error(global.repoCache.bundlerArtifactsError); + } const lockFileName = packageFileName + '.lock'; const existingLockFileContent = await platform.getFile(lockFileName); if (!existingLockFileContent) { @@ -152,12 +157,22 @@ async function getArtifacts( err.stdout.includes('No such file or directory') && !config.gitFs ) { + logger.warn( + { err }, + 'It is necessary to run Renovate in gitFs mode - contact your bot administrator' + ); + global.repoCache.bundlerArtifactsError = 'bundler-fs'; throw new Error('bundler-fs'); } if ( err.stdout && err.stdout.includes('Please supply credentials for this source') ) { + logger.warn( + { err }, + 'Gemfile.lock update failed due to missing credentials' + ); + global.repoCache.bundlerArtifactsError = 'bundler-credentials'; throw new Error('bundler-credentials'); } logger.info( diff --git a/lib/workers/branch/index.js b/lib/workers/branch/index.js index cbd4e0b5d7ddc97deb7696ec9c45aaefe972cd08..c0a941241b6a42f12abe50cc4d31b48bfcb61cdc 100644 --- a/lib/workers/branch/index.js +++ b/lib/workers/branch/index.js @@ -323,14 +323,12 @@ async function processBranch(branchConfig, prHourlyLimitReached, packageFiles) { } if (err.message === 'update-failure') { logger.warn('Error updating branch: update failure'); - } else if (err.message === 'bundler-fs') { - logger.warn( - 'It is necessary to run Renovate in gitFs mode - contact your bot administrator' - ); - } else if (err.message === 'bundler-credentials') { - logger.warn( - 'Bundler credentials are necessary in order to generate Gemfile.lock updates' - ); + } else if ( + err.message === 'bundler-fs' || + err.message === 'bundler-credentials' + ) { + // we have already warned, so just return + return 'error'; } else if (err.message === 'bundler-unknown') { logger.warn('Unknown bundler error'); } else if (