From e4d52979e3e9e5084713044f9156aa75627d7718 Mon Sep 17 00:00:00 2001 From: RahulGautamSingh Date: Mon, 12 Jun 2023 21:38:06 +0545 Subject: [PATCH 01/12] replace dockerImagePrefix with sidecarImage --- docs/usage/self-hosted-configuration.md | 8 ++++---- lib/config/global.ts | 2 +- lib/config/options/index.ts | 6 +++--- lib/config/types.ts | 2 +- lib/util/exec/docker/index.ts | 4 ++-- lib/util/exec/index.spec.ts | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/usage/self-hosted-configuration.md b/docs/usage/self-hosted-configuration.md index a46d563be6d49e..9ccebe0f89e9be 100644 --- a/docs/usage/self-hosted-configuration.md +++ b/docs/usage/self-hosted-configuration.md @@ -328,17 +328,17 @@ For example, if you set `dockerChildPrefix=myprefix_` then the final container c !!! note Dangling containers are only removed when Renovate runs again with the same prefix. -## dockerImagePrefix +## sidecarImage -By default Renovate pulls the sidecar Docker containers from `docker.io/containerbase`. -You can use the `dockerImagePrefix` option to override this default. +By default Renovate pulls the sidecar Docker containers from `github.com/containerbase/sidecar`. +You can use the `sidecarImage` option to override this default. Say you want to pull your images from `ghcr.io/containerbase` to bypass Docker Hub limits. You would put this in your configuration file: ```json { - "dockerImagePrefix": "ghcr.io/containerbase" + "sidecarImage": "ghcr.io/containerbase" } ``` diff --git a/lib/config/global.ts b/lib/config/global.ts index c1b4e92455f634..35beccc51b5343 100644 --- a/lib/config/global.ts +++ b/lib/config/global.ts @@ -14,7 +14,7 @@ export class GlobalConfig { 'containerbaseDir', 'customEnvVariables', 'dockerChildPrefix', - 'dockerImagePrefix', + 'sidecarImage', 'dockerUser', 'dryRun', 'exposeAllEnv', diff --git a/lib/config/options/index.ts b/lib/config/options/index.ts index f71066be46c06b..f84460b7b4afa8 100644 --- a/lib/config/options/index.ts +++ b/lib/config/options/index.ts @@ -344,11 +344,11 @@ const options: RenovateOptions[] = [ default: 'renovate_', }, { - name: 'dockerImagePrefix', + name: 'sidecarImage', description: - 'Change this value to override the default Renovate Docker sidecar image name prefix.', + 'Change this value to override the default Renovate sidecar image.', type: 'string', - default: 'docker.io/containerbase', + default: 'containerbase/sidecar:8.0.2', globalOnly: true, }, { diff --git a/lib/config/types.ts b/lib/config/types.ts index 5c390b09c825a0..99eb7af279c095 100644 --- a/lib/config/types.ts +++ b/lib/config/types.ts @@ -123,7 +123,7 @@ export interface RepoGlobalConfig { cacheHardTtlMinutes?: number; customEnvVariables?: Record; dockerChildPrefix?: string; - dockerImagePrefix?: string; + sidecarImage?: string; dockerUser?: string; dryRun?: DryRunConfig; executionTimeout?: number; diff --git a/lib/util/exec/docker/index.ts b/lib/util/exec/docker/index.ts index 9d192db5908359..8d9ac78b9e199e 100644 --- a/lib/util/exec/docker/index.ts +++ b/lib/util/exec/docker/index.ts @@ -222,7 +222,7 @@ export async function generateDockerCommand( containerbaseDir, dockerUser, dockerChildPrefix, - dockerImagePrefix, + sidecarImage, } = GlobalConfig.get(); const result = ['docker run --rm']; const containerName = getContainerName(image, dockerChildPrefix); @@ -260,7 +260,7 @@ export async function generateDockerCommand( } image = `${ensureTrailingSlash( - dockerImagePrefix ?? 'containerbase' + sidecarImage ?? 'containerbase' )}${image}`; // TODO: add constraint: const tag = getDockerTag(image, sideCarImageVersion, 'semver'); diff --git a/lib/util/exec/index.spec.ts b/lib/util/exec/index.spec.ts index 19f18c32268b14..3e432edea7751e 100644 --- a/lib/util/exec/index.spec.ts +++ b/lib/util/exec/index.spec.ts @@ -413,7 +413,7 @@ describe('util/exec/index', () => { }, ], adminConfig: { - dockerImagePrefix: 'ghcr.io/containerbase', + sidecarImage: 'ghcr.io/containerbase', binarySource: 'docker', }, }, From 9bf4d9b47c77649e006211d25f7bfafe7f2ea2b9 Mon Sep 17 00:00:00 2001 From: RahulGautamSingh Date: Mon, 12 Jun 2023 21:42:15 +0545 Subject: [PATCH 02/12] fix lint issue --- lib/util/exec/docker/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/util/exec/docker/index.ts b/lib/util/exec/docker/index.ts index 8d9ac78b9e199e..6a2e6911c50724 100644 --- a/lib/util/exec/docker/index.ts +++ b/lib/util/exec/docker/index.ts @@ -259,9 +259,7 @@ export async function generateDockerCommand( result.push(`-w "${cwd}"`); } - image = `${ensureTrailingSlash( - sidecarImage ?? 'containerbase' - )}${image}`; + image = `${ensureTrailingSlash(sidecarImage ?? 'containerbase')}${image}`; // TODO: add constraint: const tag = getDockerTag(image, sideCarImageVersion, 'semver'); logger.debug( From ee5565e3a3cd3a7ddf6c2c5db370c2612e7c6081 Mon Sep 17 00:00:00 2001 From: RahulGautamSingh Date: Mon, 12 Jun 2023 22:06:06 +0545 Subject: [PATCH 03/12] Apply suggestions from code review Co-authored-by: Rhys Arkins --- docs/usage/self-hosted-configuration.md | 6 +++--- lib/config/options/index.ts | 2 +- lib/util/exec/docker/index.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/usage/self-hosted-configuration.md b/docs/usage/self-hosted-configuration.md index 9ccebe0f89e9be..f3291fc65ff2fd 100644 --- a/docs/usage/self-hosted-configuration.md +++ b/docs/usage/self-hosted-configuration.md @@ -330,15 +330,15 @@ For example, if you set `dockerChildPrefix=myprefix_` then the final container c ## sidecarImage -By default Renovate pulls the sidecar Docker containers from `github.com/containerbase/sidecar`. +By default Renovate pulls the sidecar Docker containers from `ghcr.io/containerbase/sidecar`. You can use the `sidecarImage` option to override this default. -Say you want to pull your images from `ghcr.io/containerbase` to bypass Docker Hub limits. +Say you want to pull a custom image from `ghcr.io/your_company`. You would put this in your configuration file: ```json { - "sidecarImage": "ghcr.io/containerbase" + "sidecarImage": "ghcr.io/your_company/sidecar" } ``` diff --git a/lib/config/options/index.ts b/lib/config/options/index.ts index f84460b7b4afa8..e5081549b73f6c 100644 --- a/lib/config/options/index.ts +++ b/lib/config/options/index.ts @@ -348,7 +348,7 @@ const options: RenovateOptions[] = [ description: 'Change this value to override the default Renovate sidecar image.', type: 'string', - default: 'containerbase/sidecar:8.0.2', + default: 'ghcr.io/containerbase/sidecar:8.0.2', globalOnly: true, }, { diff --git a/lib/util/exec/docker/index.ts b/lib/util/exec/docker/index.ts index 6a2e6911c50724..59598c92b8e82d 100644 --- a/lib/util/exec/docker/index.ts +++ b/lib/util/exec/docker/index.ts @@ -259,7 +259,7 @@ export async function generateDockerCommand( result.push(`-w "${cwd}"`); } - image = `${ensureTrailingSlash(sidecarImage ?? 'containerbase')}${image}`; + image = sidecarImage; // TODO: add constraint: const tag = getDockerTag(image, sideCarImageVersion, 'semver'); logger.debug( From f5029d90f684318396e63c5aea5417054fa692e6 Mon Sep 17 00:00:00 2001 From: RahulGautamSingh Date: Mon, 12 Jun 2023 22:18:28 +0545 Subject: [PATCH 04/12] sidecarImage -> dockerSidecarImage --- docs/usage/self-hosted-configuration.md | 6 +++--- lib/config/global.ts | 2 +- lib/config/options/index.ts | 2 +- lib/config/types.ts | 2 +- lib/util/exec/docker/index.spec.ts | 4 ++-- lib/util/exec/docker/index.ts | 15 ++++++++------- lib/util/exec/index.spec.ts | 4 ++-- lib/util/exec/index.ts | 8 ++++---- 8 files changed, 22 insertions(+), 21 deletions(-) diff --git a/docs/usage/self-hosted-configuration.md b/docs/usage/self-hosted-configuration.md index f3291fc65ff2fd..55a8f8408b1713 100644 --- a/docs/usage/self-hosted-configuration.md +++ b/docs/usage/self-hosted-configuration.md @@ -328,17 +328,17 @@ For example, if you set `dockerChildPrefix=myprefix_` then the final container c !!! note Dangling containers are only removed when Renovate runs again with the same prefix. -## sidecarImage +## dockerSidecarImage By default Renovate pulls the sidecar Docker containers from `ghcr.io/containerbase/sidecar`. -You can use the `sidecarImage` option to override this default. +You can use the `dockerSidecarImage` option to override this default. Say you want to pull a custom image from `ghcr.io/your_company`. You would put this in your configuration file: ```json { - "sidecarImage": "ghcr.io/your_company/sidecar" + "dockerSidecarImage": "ghcr.io/your_company/sidecar" } ``` diff --git a/lib/config/global.ts b/lib/config/global.ts index 35beccc51b5343..0249e60f32be98 100644 --- a/lib/config/global.ts +++ b/lib/config/global.ts @@ -14,7 +14,7 @@ export class GlobalConfig { 'containerbaseDir', 'customEnvVariables', 'dockerChildPrefix', - 'sidecarImage', + 'dockerSidecarImage', 'dockerUser', 'dryRun', 'exposeAllEnv', diff --git a/lib/config/options/index.ts b/lib/config/options/index.ts index e5081549b73f6c..93cbbc99c5d4b3 100644 --- a/lib/config/options/index.ts +++ b/lib/config/options/index.ts @@ -344,7 +344,7 @@ const options: RenovateOptions[] = [ default: 'renovate_', }, { - name: 'sidecarImage', + name: 'dockerSidecarImage', description: 'Change this value to override the default Renovate sidecar image.', type: 'string', diff --git a/lib/config/types.ts b/lib/config/types.ts index 99eb7af279c095..abd52914f96b4a 100644 --- a/lib/config/types.ts +++ b/lib/config/types.ts @@ -123,7 +123,7 @@ export interface RepoGlobalConfig { cacheHardTtlMinutes?: number; customEnvVariables?: Record; dockerChildPrefix?: string; - sidecarImage?: string; + dockerSidecarImage?: string; dockerUser?: string; dryRun?: DryRunConfig; executionTimeout?: number; diff --git a/lib/util/exec/docker/index.spec.ts b/lib/util/exec/docker/index.spec.ts index 3542031c09851a..8ef86e8be920ce 100644 --- a/lib/util/exec/docker/index.spec.ts +++ b/lib/util/exec/docker/index.spec.ts @@ -12,7 +12,7 @@ import { removeDanglingContainers, removeDockerContainer, resetPrefetchedImages, - sideCarImage, + dockerSidecarImage, } from '.'; jest.mock('../../../modules/datasource'); @@ -212,7 +212,7 @@ describe('util/exec/docker/index', () => { const preCommands = [null as never, 'foo', undefined as never]; const commands = ['bar']; const envVars = ['FOO', 'BAR']; - const image = sideCarImage; + const image = dockerSidecarImage; const dockerOptions = { cwd: '/tmp/foobar', envVars, diff --git a/lib/util/exec/docker/index.ts b/lib/util/exec/docker/index.ts index 59598c92b8e82d..0ba8511e0cfd5f 100644 --- a/lib/util/exec/docker/index.ts +++ b/lib/util/exec/docker/index.ts @@ -5,7 +5,6 @@ import { logger } from '../../../logger'; import { getPkgReleases } from '../../../modules/datasource'; import * as versioning from '../../../modules/versioning'; import { newlineRegex, regEx } from '../../regex'; -import { ensureTrailingSlash } from '../../url'; import { rawExec } from '../common'; import type { DockerOptions, Opt, VolumeOption, VolumesPair } from '../types'; @@ -214,18 +213,19 @@ export async function generateDockerCommand( options: DockerOptions ): Promise { const { envVars, cwd } = options; - let image = sideCarImage; const volumes = options.volumes ?? []; + let image = sideCarImage; const { localDir, cacheDir, containerbaseDir, dockerUser, dockerChildPrefix, - sidecarImage, + dockerSidecarImage, } = GlobalConfig.get(); const result = ['docker run --rm']; - const containerName = getContainerName(image, dockerChildPrefix); + // TODO: #7154 + const containerName = getContainerName(image!, dockerChildPrefix); const containerLabel = getContainerLabel(dockerChildPrefix); result.push(`--name=${containerName}`); result.push(`--label=${containerLabel}`); @@ -259,11 +259,12 @@ export async function generateDockerCommand( result.push(`-w "${cwd}"`); } - image = sidecarImage; + // TODO: #7154 + image = dockerSidecarImage!; - // TODO: add constraint: const tag = getDockerTag(image, sideCarImageVersion, 'semver'); + // TODO: add constraint: const tag = getDockerTag(image, dockerSidecarImageVersion, 'semver'); logger.debug( - { image /*, tagConstraint: sideCarImageVersion, tag */ }, + { image /*, tagConstraint: dockerSidecarImageVersion, tag */ }, 'Resolved tag constraint' ); diff --git a/lib/util/exec/index.spec.ts b/lib/util/exec/index.spec.ts index 3e432edea7751e..828d72d77adaa7 100644 --- a/lib/util/exec/index.spec.ts +++ b/lib/util/exec/index.spec.ts @@ -53,7 +53,7 @@ describe('util/exec/index', () => { process.env = processEnvOrig; }); - const image = dockerModule.sideCarImage; + const image = dockerModule.dockerSidecarImage; const fullImage = `containerbase/${image}`; const name = `renovate_${image}`; const inCmd = 'echo hello'; @@ -413,7 +413,7 @@ describe('util/exec/index', () => { }, ], adminConfig: { - sidecarImage: 'ghcr.io/containerbase', + dockerSidecarImage: 'ghcr.io/containerbase', binarySource: 'docker', }, }, diff --git a/lib/util/exec/index.ts b/lib/util/exec/index.ts index c3e802ae892168..df920bebf56ac6 100644 --- a/lib/util/exec/index.ts +++ b/lib/util/exec/index.ts @@ -8,7 +8,7 @@ import { generateInstallCommands, isDynamicInstall } from './containerbase'; import { generateDockerCommand, removeDockerContainer, - sideCarImage, + dockerSidecarImage, } from './docker'; import { getChildProcessEnv } from './env'; import { getHermitEnvs, isHermit } from './hermit'; @@ -120,7 +120,7 @@ async function prepareRawExec( let rawCommands = typeof cmd === 'string' ? [cmd] : cmd; if (isDocker(docker)) { - logger.debug({ image: sideCarImage }, 'Using docker to execute'); + logger.debug({ image: dockerSidecarImage }, 'Using docker to execute'); const extraEnv = { ...opts.extraEnv, ...customEnvVariables, @@ -180,7 +180,7 @@ export async function exec( for (const rawCmd of rawCommands) { const startTime = Date.now(); if (useDocker) { - await removeDockerContainer(sideCarImage, dockerChildPrefix); + await removeDockerContainer(dockerSidecarImage, dockerChildPrefix); } logger.debug({ command: rawCmd }, 'Executing command'); logger.trace({ commandOptions: rawOptions }, 'Command options'); @@ -190,7 +190,7 @@ export async function exec( const durationMs = Math.round(Date.now() - startTime); logger.debug({ err, durationMs }, 'rawExec err'); if (useDocker) { - await removeDockerContainer(sideCarImage, dockerChildPrefix).catch( + await removeDockerContainer(dockerSidecarImage, dockerChildPrefix).catch( (removeErr: Error) => { const message: string = err.message; throw new Error( From 70e45cc38342cd3a1448bc4125147e34d6abec53 Mon Sep 17 00:00:00 2001 From: RahulGautamSingh Date: Mon, 12 Jun 2023 22:22:47 +0545 Subject: [PATCH 05/12] refactor --- lib/util/exec/docker/index.spec.ts | 4 ++-- lib/util/exec/docker/index.ts | 9 ++++----- lib/util/exec/index.spec.ts | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/util/exec/docker/index.spec.ts b/lib/util/exec/docker/index.spec.ts index 8ef86e8be920ce..3542031c09851a 100644 --- a/lib/util/exec/docker/index.spec.ts +++ b/lib/util/exec/docker/index.spec.ts @@ -12,7 +12,7 @@ import { removeDanglingContainers, removeDockerContainer, resetPrefetchedImages, - dockerSidecarImage, + sideCarImage, } from '.'; jest.mock('../../../modules/datasource'); @@ -212,7 +212,7 @@ describe('util/exec/docker/index', () => { const preCommands = [null as never, 'foo', undefined as never]; const commands = ['bar']; const envVars = ['FOO', 'BAR']; - const image = dockerSidecarImage; + const image = sideCarImage; const dockerOptions = { cwd: '/tmp/foobar', envVars, diff --git a/lib/util/exec/docker/index.ts b/lib/util/exec/docker/index.ts index 0ba8511e0cfd5f..b0552e18f47225 100644 --- a/lib/util/exec/docker/index.ts +++ b/lib/util/exec/docker/index.ts @@ -213,8 +213,8 @@ export async function generateDockerCommand( options: DockerOptions ): Promise { const { envVars, cwd } = options; - const volumes = options.volumes ?? []; let image = sideCarImage; + const volumes = options.volumes ?? []; const { localDir, cacheDir, @@ -224,8 +224,7 @@ export async function generateDockerCommand( dockerSidecarImage, } = GlobalConfig.get(); const result = ['docker run --rm']; - // TODO: #7154 - const containerName = getContainerName(image!, dockerChildPrefix); + const containerName = getContainerName(image, dockerChildPrefix); const containerLabel = getContainerLabel(dockerChildPrefix); result.push(`--name=${containerName}`); result.push(`--label=${containerLabel}`); @@ -262,9 +261,9 @@ export async function generateDockerCommand( // TODO: #7154 image = dockerSidecarImage!; - // TODO: add constraint: const tag = getDockerTag(image, dockerSidecarImageVersion, 'semver'); + // TODO: add constraint: const tag = getDockerTag(image, sideCarImageVersion, 'semver'); logger.debug( - { image /*, tagConstraint: dockerSidecarImageVersion, tag */ }, + { image /*, tagConstraint: sideCarImageVersion, tag */ }, 'Resolved tag constraint' ); diff --git a/lib/util/exec/index.spec.ts b/lib/util/exec/index.spec.ts index 828d72d77adaa7..295e3e0c879500 100644 --- a/lib/util/exec/index.spec.ts +++ b/lib/util/exec/index.spec.ts @@ -53,7 +53,7 @@ describe('util/exec/index', () => { process.env = processEnvOrig; }); - const image = dockerModule.dockerSidecarImage; + const image = dockerModule.sideCarImage; const fullImage = `containerbase/${image}`; const name = `renovate_${image}`; const inCmd = 'echo hello'; From d6ca23450115874851c19c010a4eb02bfc6edd2a Mon Sep 17 00:00:00 2001 From: RahulGautamSingh Date: Mon, 12 Jun 2023 22:25:08 +0545 Subject: [PATCH 06/12] refactor --- lib/util/exec/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/util/exec/index.ts b/lib/util/exec/index.ts index df920bebf56ac6..c3e802ae892168 100644 --- a/lib/util/exec/index.ts +++ b/lib/util/exec/index.ts @@ -8,7 +8,7 @@ import { generateInstallCommands, isDynamicInstall } from './containerbase'; import { generateDockerCommand, removeDockerContainer, - dockerSidecarImage, + sideCarImage, } from './docker'; import { getChildProcessEnv } from './env'; import { getHermitEnvs, isHermit } from './hermit'; @@ -120,7 +120,7 @@ async function prepareRawExec( let rawCommands = typeof cmd === 'string' ? [cmd] : cmd; if (isDocker(docker)) { - logger.debug({ image: dockerSidecarImage }, 'Using docker to execute'); + logger.debug({ image: sideCarImage }, 'Using docker to execute'); const extraEnv = { ...opts.extraEnv, ...customEnvVariables, @@ -180,7 +180,7 @@ export async function exec( for (const rawCmd of rawCommands) { const startTime = Date.now(); if (useDocker) { - await removeDockerContainer(dockerSidecarImage, dockerChildPrefix); + await removeDockerContainer(sideCarImage, dockerChildPrefix); } logger.debug({ command: rawCmd }, 'Executing command'); logger.trace({ commandOptions: rawOptions }, 'Command options'); @@ -190,7 +190,7 @@ export async function exec( const durationMs = Math.round(Date.now() - startTime); logger.debug({ err, durationMs }, 'rawExec err'); if (useDocker) { - await removeDockerContainer(dockerSidecarImage, dockerChildPrefix).catch( + await removeDockerContainer(sideCarImage, dockerChildPrefix).catch( (removeErr: Error) => { const message: string = err.message; throw new Error( From 67aa1ab0a42ec72f8e4de9dd836fce2082432799 Mon Sep 17 00:00:00 2001 From: RahulGautamSingh Date: Mon, 12 Jun 2023 22:42:23 +0545 Subject: [PATCH 07/12] add regex manager --- renovate.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/renovate.json b/renovate.json index 86850e28adc841..bf3ce95b2dd332 100644 --- a/renovate.json +++ b/renovate.json @@ -29,5 +29,15 @@ "matchPaths": ["**/__fixtures__/**"], "enabled": false } + ], + "regexManagers": [ + { + "fileMatch": ["config/options/index.ts"], + "matchStrings": [ + "default: 'ghcr.io/containerbase/sidecar:(?.*)'" + ], + "depNameTemplate": "containerbase/sidecar", + "datasourceTemplate": "docker" + } ] } From ebb8d7ea3bfd600d39a5b13e186a45db93843433 Mon Sep 17 00:00:00 2001 From: RahulGautamSingh Date: Tue, 13 Jun 2023 00:07:04 +0545 Subject: [PATCH 08/12] update regex manager --- renovate.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/renovate.json b/renovate.json index bf3ce95b2dd332..4824b2dfe9c9bf 100644 --- a/renovate.json +++ b/renovate.json @@ -34,9 +34,8 @@ { "fileMatch": ["config/options/index.ts"], "matchStrings": [ - "default: 'ghcr.io/containerbase/sidecar:(?.*)'" + "default: '(?ghcr.io/containerbase/sidecar):(?.*)'" ], - "depNameTemplate": "containerbase/sidecar", "datasourceTemplate": "docker" } ] From 76906134cbe8d1541ef8f34ac6416b3f1a74b2c1 Mon Sep 17 00:00:00 2001 From: RahulGautamSingh Date: Tue, 13 Jun 2023 00:07:37 +0545 Subject: [PATCH 09/12] Apply suggestions from code review Co-authored-by: Michael Kriese --- docs/usage/self-hosted-configuration.md | 2 +- lib/util/exec/index.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/usage/self-hosted-configuration.md b/docs/usage/self-hosted-configuration.md index 55a8f8408b1713..942833b9d90e00 100644 --- a/docs/usage/self-hosted-configuration.md +++ b/docs/usage/self-hosted-configuration.md @@ -333,7 +333,7 @@ For example, if you set `dockerChildPrefix=myprefix_` then the final container c By default Renovate pulls the sidecar Docker containers from `ghcr.io/containerbase/sidecar`. You can use the `dockerSidecarImage` option to override this default. -Say you want to pull a custom image from `ghcr.io/your_company`. +Say you want to pull a custom image from `ghcr.io/your_company/sidecar`. You would put this in your configuration file: ```json diff --git a/lib/util/exec/index.spec.ts b/lib/util/exec/index.spec.ts index 295e3e0c879500..319d6f41f886f6 100644 --- a/lib/util/exec/index.spec.ts +++ b/lib/util/exec/index.spec.ts @@ -413,7 +413,7 @@ describe('util/exec/index', () => { }, ], adminConfig: { - dockerSidecarImage: 'ghcr.io/containerbase', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', binarySource: 'docker', }, }, From ca62cbae0dec5839f01dc96485710877814602d4 Mon Sep 17 00:00:00 2001 From: RahulGautamSingh Date: Wed, 14 Jun 2023 00:18:33 +0545 Subject: [PATCH 10/12] update tests --- lib/modules/manager/bundler/artifacts.spec.ts | 29 +++++++-------- lib/modules/manager/cargo/artifacts.spec.ts | 5 +-- .../__snapshots__/artifacts.spec.ts.snap | 8 ++--- .../manager/cocoapods/artifacts.spec.ts | 5 +-- .../manager/composer/artifacts.spec.ts | 5 +-- lib/modules/manager/gomod/artifacts.spec.ts | 35 ++++++++++--------- .../manager/gradle-wrapper/artifacts.spec.ts | 10 ++++-- lib/modules/manager/gradle/artifacts.spec.ts | 7 ++-- .../manager/helmfile/artifacts.spec.ts | 5 +-- .../__snapshots__/artifacts.spec.ts.snap | 8 ++--- lib/modules/manager/helmv3/artifacts.spec.ts | 12 +++++-- .../manager/maven-wrapper/artifacts.spec.ts | 10 ++++-- .../mix/__snapshots__/artifacts.spec.ts.snap | 6 ++-- lib/modules/manager/mix/artifacts.spec.ts | 18 ++++++++-- lib/modules/manager/nix/artifacts.spec.ts | 14 +++++--- .../manager/npm/post-update/lerna.spec.ts | 10 ++++-- .../manager/npm/post-update/npm.spec.ts | 5 +-- .../manager/npm/post-update/pnpm.spec.ts | 5 +-- .../manager/npm/post-update/yarn.spec.ts | 5 +-- lib/modules/manager/nuget/artifacts.spec.ts | 10 ++++-- lib/modules/manager/pep621/artifacts.spec.ts | 10 ++++-- .../manager/pep621/processors/pdm.spec.ts | 10 ++++-- .../manager/pip-compile/artifacts.spec.ts | 14 +++++--- .../pip_requirements/artifacts.spec.ts | 10 ++++-- .../__snapshots__/artifacts.spec.ts.snap | 16 ++++----- lib/modules/manager/pipenv/artifacts.spec.ts | 6 +++- lib/modules/manager/poetry/artifacts.spec.ts | 20 +++++++---- lib/modules/manager/pub/artifacts.spec.ts | 10 ++++-- 28 files changed, 195 insertions(+), 113 deletions(-) diff --git a/lib/modules/manager/bundler/artifacts.spec.ts b/lib/modules/manager/bundler/artifacts.spec.ts index 841f8ecc899d2d..1a6ce6ac70d5fa 100644 --- a/lib/modules/manager/bundler/artifacts.spec.ts +++ b/lib/modules/manager/bundler/artifacts.spec.ts @@ -37,6 +37,7 @@ const adminConfig: RepoGlobalConfig = { localDir: join('/tmp/github/some/repo'), cacheDir: join('/tmp/cache'), containerbaseDir: join('/tmp/cache/containerbase'), + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', }; const config: UpdateArtifactsConfig = {}; @@ -279,7 +280,7 @@ describe('modules/manager/bundler/artifacts', () => { }) ).toEqual([updatedGemfileLock]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -290,7 +291,7 @@ describe('modules/manager/bundler/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar' + + 'ghcr.io/containerbase/sidecar:8.0.2' + ' bash -l -c "' + 'install-tool ruby 1.2.0' + ' && ' + @@ -339,7 +340,7 @@ describe('modules/manager/bundler/artifacts', () => { }) ).toEqual([updatedGemfileLock]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -350,7 +351,7 @@ describe('modules/manager/bundler/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar' + + 'ghcr.io/containerbase/sidecar:8.0.2' + ' bash -l -c "' + 'install-tool ruby 1.2.5' + ' && ' + @@ -401,7 +402,7 @@ describe('modules/manager/bundler/artifacts', () => { }) ).toEqual([updatedGemfileLock]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -412,7 +413,7 @@ describe('modules/manager/bundler/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar' + + 'ghcr.io/containerbase/sidecar:8.0.2' + ' bash -l -c "' + 'install-tool ruby 1.3.0' + ' && ' + @@ -462,7 +463,7 @@ describe('modules/manager/bundler/artifacts', () => { }) ).toEqual([updatedGemfileLock]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -474,7 +475,7 @@ describe('modules/manager/bundler/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar' + + 'ghcr.io/containerbase/sidecar:8.0.2' + ' bash -l -c "' + 'install-tool ruby 1.2.0' + ' && ' + @@ -533,7 +534,7 @@ describe('modules/manager/bundler/artifacts', () => { }) ).toEqual([updatedGemfileLock]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -544,7 +545,7 @@ describe('modules/manager/bundler/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar' + + 'ghcr.io/containerbase/sidecar:8.0.2' + ' bash -l -c "' + 'install-tool ruby 1.2.0' + ' && ' + @@ -605,7 +606,7 @@ describe('modules/manager/bundler/artifacts', () => { }) ).toEqual([updatedGemfileLock]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -616,7 +617,7 @@ describe('modules/manager/bundler/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar' + + 'ghcr.io/containerbase/sidecar:8.0.2' + ' bash -l -c "' + 'install-tool ruby 1.2.0' + ' && ' + @@ -676,7 +677,7 @@ describe('modules/manager/bundler/artifacts', () => { }) ).toEqual([updatedGemfileLock]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -687,7 +688,7 @@ describe('modules/manager/bundler/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar' + + 'ghcr.io/containerbase/sidecar:8.0.2' + ' bash -l -c "' + 'install-tool ruby 1.2.0' + ' && ' + diff --git a/lib/modules/manager/cargo/artifacts.spec.ts b/lib/modules/manager/cargo/artifacts.spec.ts index 1ad6453f3c6331..387958ef93b12f 100644 --- a/lib/modules/manager/cargo/artifacts.spec.ts +++ b/lib/modules/manager/cargo/artifacts.spec.ts @@ -21,6 +21,7 @@ const adminConfig: RepoGlobalConfig = { localDir: join('/tmp/github/some/repo'), cacheDir: join('/tmp/cache'), containerbaseDir: join('/tmp/cache/containerbase'), + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', }; describe('modules/manager/cargo/artifacts', () => { @@ -210,7 +211,7 @@ describe('modules/manager/cargo/artifacts', () => { }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, {}, { cmd: @@ -220,7 +221,7 @@ describe('modules/manager/cargo/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar ' + + 'ghcr.io/containerbase/sidecar:8.0.2 ' + 'bash -l -c "' + 'install-tool rust 1.65.0' + ' && ' + diff --git a/lib/modules/manager/cocoapods/__snapshots__/artifacts.spec.ts.snap b/lib/modules/manager/cocoapods/__snapshots__/artifacts.spec.ts.snap index 3dab15063ae67d..e8090f337c4166 100644 --- a/lib/modules/manager/cocoapods/__snapshots__/artifacts.spec.ts.snap +++ b/lib/modules/manager/cocoapods/__snapshots__/artifacts.spec.ts.snap @@ -57,13 +57,13 @@ exports[`modules/manager/cocoapods/artifacts returns pod exec error 1`] = ` exports[`modules/manager/cocoapods/artifacts returns updated Podfile 1`] = ` [ { - "cmd": "docker pull containerbase/sidecar", + "cmd": "docker pull ghcr.io/containerbase/sidecar:8.0.2", "options": { "encoding": "utf-8", }, }, { - "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/cache":"/tmp/cache" -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" containerbase/sidecar bash -l -c "install-tool ruby 3.1.0 && install-tool cocoapods 3.1.0 && gem install cocoapods-acknowledgements && pod install"", + "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/cache":"/tmp/cache" -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar:8.0.2 bash -l -c "install-tool ruby 3.1.0 && install-tool cocoapods 3.1.0 && gem install cocoapods-acknowledgements && pod install"", "options": { "cwd": "/tmp/github/some/repo", "encoding": "utf-8", @@ -88,13 +88,13 @@ exports[`modules/manager/cocoapods/artifacts returns updated Podfile 1`] = ` exports[`modules/manager/cocoapods/artifacts returns updated Podfile and Pods files 1`] = ` [ { - "cmd": "docker pull containerbase/sidecar", + "cmd": "docker pull ghcr.io/containerbase/sidecar:8.0.2", "options": { "encoding": "utf-8", }, }, { - "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/cache":"/tmp/cache" -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" containerbase/sidecar bash -l -c "install-tool ruby 3.1.0 && install-tool cocoapods 3.1.0 && pod install"", + "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/cache":"/tmp/cache" -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar:8.0.2 bash -l -c "install-tool ruby 3.1.0 && install-tool cocoapods 3.1.0 && pod install"", "options": { "cwd": "/tmp/github/some/repo", "encoding": "utf-8", diff --git a/lib/modules/manager/cocoapods/artifacts.spec.ts b/lib/modules/manager/cocoapods/artifacts.spec.ts index a4caf0fe10d5b8..ed1d81ad3c8fe3 100644 --- a/lib/modules/manager/cocoapods/artifacts.spec.ts +++ b/lib/modules/manager/cocoapods/artifacts.spec.ts @@ -26,6 +26,7 @@ const adminConfig: RepoGlobalConfig = { localDir: join('/tmp/github/some/repo'), cacheDir: join('/tmp/cache'), containerbaseDir: join('/tmp/cache/containerbase'), + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', }; describe('modules/manager/cocoapods/artifacts', () => { @@ -252,7 +253,7 @@ describe('modules/manager/cocoapods/artifacts', () => { config, }); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker run --rm --name=renovate_sidecar --label=renovate_child ' + @@ -261,7 +262,7 @@ describe('modules/manager/cocoapods/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar' + + 'ghcr.io/containerbase/sidecar:8.0.2' + ' bash -l -c "' + 'install-tool ruby 3.1.0' + ' && ' + diff --git a/lib/modules/manager/composer/artifacts.spec.ts b/lib/modules/manager/composer/artifacts.spec.ts index bd197b7233d21c..1c6018ba4001ee 100644 --- a/lib/modules/manager/composer/artifacts.spec.ts +++ b/lib/modules/manager/composer/artifacts.spec.ts @@ -33,6 +33,7 @@ const adminConfig: RepoGlobalConfig = { localDir: join('/tmp/github/some/repo'), cacheDir: join('/tmp/renovate/cache'), containerbaseDir: join('/tmp/renovate/cache/containerbase'), + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', }; const repoStatus = partial({ @@ -784,7 +785,7 @@ describe('modules/manager/composer/artifacts', () => { ]); expect(execSnapshots).toMatchObject([ { - cmd: 'docker pull containerbase/sidecar', + cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2', options: { encoding: 'utf-8', }, @@ -804,7 +805,7 @@ describe('modules/manager/composer/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar' + + 'ghcr.io/containerbase/sidecar:8.0.2' + ' bash -l -c "' + 'install-tool php 7.3' + ' && ' + diff --git a/lib/modules/manager/gomod/artifacts.spec.ts b/lib/modules/manager/gomod/artifacts.spec.ts index aee0645b62011a..3cdbc2a968711e 100644 --- a/lib/modules/manager/gomod/artifacts.spec.ts +++ b/lib/modules/manager/gomod/artifacts.spec.ts @@ -59,6 +59,7 @@ const adminConfig: RepoGlobalConfig = { localDir: join('/tmp/github/some/repo'), cacheDir: join('/tmp/renovate/cache'), containerbaseDir: join('/tmp/renovate/cache/containerbase'), + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', }; const config: UpdateArtifactsConfig = { @@ -308,7 +309,7 @@ describe('modules/manager/gomod/artifacts', () => { }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -325,7 +326,7 @@ describe('modules/manager/gomod/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar' + + 'ghcr.io/containerbase/sidecar:8.0.2' + ' bash -l -c "' + 'install-tool golang 1.14.0' + ' && ' + @@ -465,7 +466,7 @@ describe('modules/manager/gomod/artifacts', () => { }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -495,7 +496,7 @@ describe('modules/manager/gomod/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar' + + 'ghcr.io/containerbase/sidecar:8.0.2' + ' bash -l -c "' + 'install-tool golang 1.14.0' + ' && ' + @@ -576,7 +577,7 @@ describe('modules/manager/gomod/artifacts', () => { }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, {}, { options: { @@ -990,7 +991,7 @@ describe('modules/manager/gomod/artifacts', () => { { file: { contents: 'New go.sum 2', path: 'go.mod', type: 'addition' } }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, {}, { cmd: @@ -1007,7 +1008,7 @@ describe('modules/manager/gomod/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar' + + 'ghcr.io/containerbase/sidecar:8.0.2' + ' bash -l -c "' + 'install-tool golang 1.14.0' + ' && ' + @@ -1055,7 +1056,7 @@ describe('modules/manager/gomod/artifacts', () => { { file: { contents: 'New go.sum 2', path: 'go.mod', type: 'addition' } }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, {}, { cmd: @@ -1072,7 +1073,7 @@ describe('modules/manager/gomod/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar' + + 'ghcr.io/containerbase/sidecar:8.0.2' + ' bash -l -c "' + 'install-tool golang 1.14.0' + ' && ' + @@ -1120,7 +1121,7 @@ describe('modules/manager/gomod/artifacts', () => { { file: { contents: 'New go.sum 2', path: 'go.mod', type: 'addition' } }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, {}, { cmd: @@ -1137,7 +1138,7 @@ describe('modules/manager/gomod/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar' + + 'ghcr.io/containerbase/sidecar:8.0.2' + ' bash -l -c "' + 'install-tool golang 1.14.0' + ' && ' + @@ -1185,7 +1186,7 @@ describe('modules/manager/gomod/artifacts', () => { { file: { contents: 'New go.sum 2', path: 'go.mod', type: 'addition' } }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, {}, { cmd: @@ -1202,7 +1203,7 @@ describe('modules/manager/gomod/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar' + + 'ghcr.io/containerbase/sidecar:8.0.2' + ' bash -l -c "' + 'install-tool golang 1.14.0' + ' && ' + @@ -1842,7 +1843,7 @@ describe('modules/manager/gomod/artifacts', () => { ]); const expectedResult = [ { - cmd: 'docker pull containerbase/sidecar', + cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2', }, {}, { @@ -1860,7 +1861,7 @@ describe('modules/manager/gomod/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar' + + 'ghcr.io/containerbase/sidecar:8.0.2' + ' bash -l -c "' + 'install-tool golang 1.17.0' + ' && ' + @@ -1917,7 +1918,7 @@ describe('modules/manager/gomod/artifacts', () => { ]); const expectedResult = [ { - cmd: 'docker pull containerbase/sidecar', + cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2', }, {}, { @@ -1935,7 +1936,7 @@ describe('modules/manager/gomod/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar' + + 'ghcr.io/containerbase/sidecar:8.0.2' + ' bash -l -c "' + 'install-tool golang 1.14.0' + ' && ' + diff --git a/lib/modules/manager/gradle-wrapper/artifacts.spec.ts b/lib/modules/manager/gradle-wrapper/artifacts.spec.ts index 06bb6b64ad86be..3318ba0fef9130 100644 --- a/lib/modules/manager/gradle-wrapper/artifacts.spec.ts +++ b/lib/modules/manager/gradle-wrapper/artifacts.spec.ts @@ -179,7 +179,11 @@ describe('modules/manager/gradle-wrapper/artifacts', () => { modified: ['gradle/wrapper/gradle-wrapper.properties'], }) ); - GlobalConfig.set({ ...adminConfig, binarySource: 'docker' }); + GlobalConfig.set({ + ...adminConfig, + binarySource: 'docker', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + }); const result = await updateArtifacts({ packageFileName: 'gradle/wrapper/gradle-wrapper.properties', @@ -198,7 +202,7 @@ describe('modules/manager/gradle-wrapper/artifacts', () => { }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -209,7 +213,7 @@ describe('modules/manager/gradle-wrapper/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar' + + 'ghcr.io/containerbase/sidecar:8.0.2' + ' bash -l -c "' + 'install-tool java 11.0.1' + ' && ' + diff --git a/lib/modules/manager/gradle/artifacts.spec.ts b/lib/modules/manager/gradle/artifacts.spec.ts index 087952f444900b..ddfc312dce81f1 100644 --- a/lib/modules/manager/gradle/artifacts.spec.ts +++ b/lib/modules/manager/gradle/artifacts.spec.ts @@ -35,6 +35,7 @@ const adminConfig: RepoGlobalConfig = { localDir: join('/tmp/github/some/repo'), cacheDir: join('/tmp/cache'), containerbaseDir: join('/tmp/cache/containerbase'), + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', }; const osPlatformSpy = jest.spyOn(os, 'platform'); @@ -322,7 +323,7 @@ describe('modules/manager/gradle/artifacts', () => { }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -333,7 +334,7 @@ describe('modules/manager/gradle/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar' + + 'ghcr.io/containerbase/sidecar:8.0.2' + ' bash -l -c "' + 'install-tool java 16.0.1' + ' && ' + @@ -351,7 +352,7 @@ describe('modules/manager/gradle/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar' + + 'ghcr.io/containerbase/sidecar:8.0.2' + ' bash -l -c "' + 'install-tool java 16.0.1' + ' && ' + diff --git a/lib/modules/manager/helmfile/artifacts.spec.ts b/lib/modules/manager/helmfile/artifacts.spec.ts index f4c448451ac191..3ab4759e0b2ea4 100644 --- a/lib/modules/manager/helmfile/artifacts.spec.ts +++ b/lib/modules/manager/helmfile/artifacts.spec.ts @@ -24,6 +24,7 @@ const adminConfig: RepoGlobalConfig = { localDir: join('/tmp/github/some/repo'), // `join` fixes Windows CI cacheDir: join('/tmp/renovate/cache'), containerbaseDir: join('/tmp/renovate/cache/containerbase'), + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', }; const config: UpdateArtifactsConfig = {}; @@ -156,7 +157,7 @@ describe('modules/manager/helmfile/artifacts', () => { { binarySource: 'docker', expectedCommands: [ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -166,7 +167,7 @@ describe('modules/manager/helmfile/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar ' + + 'ghcr.io/containerbase/sidecar:8.0.2 ' + 'bash -l -c "' + 'install-tool helm v3.7.2' + ' && ' + diff --git a/lib/modules/manager/helmv3/__snapshots__/artifacts.spec.ts.snap b/lib/modules/manager/helmv3/__snapshots__/artifacts.spec.ts.snap index e3580be7b905ce..6dc88b6eaa7c1d 100644 --- a/lib/modules/manager/helmv3/__snapshots__/artifacts.spec.ts.snap +++ b/lib/modules/manager/helmv3/__snapshots__/artifacts.spec.ts.snap @@ -456,7 +456,7 @@ exports[`modules/manager/helmv3/artifacts returns updated Chart.lock for lockfil exports[`modules/manager/helmv3/artifacts returns updated Chart.lock with docker 1`] = ` [ { - "cmd": "docker pull containerbase/sidecar", + "cmd": "docker pull ghcr.io/containerbase/sidecar:8.0.2", "options": { "encoding": "utf-8", }, @@ -468,7 +468,7 @@ exports[`modules/manager/helmv3/artifacts returns updated Chart.lock with docker }, }, { - "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e HELM_EXPERIMENTAL_OCI -e HELM_REGISTRY_CONFIG -e HELM_REPOSITORY_CONFIG -e HELM_REPOSITORY_CACHE -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" containerbase/sidecar bash -l -c "install-tool helm v3.7.2 && helm repo add repo-test https://gitlab.com/api/v4/projects/xxxxxxx/packages/helm/stable && helm dependency update ''"", + "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e HELM_EXPERIMENTAL_OCI -e HELM_REGISTRY_CONFIG -e HELM_REPOSITORY_CONFIG -e HELM_REPOSITORY_CACHE -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar:8.0.2 bash -l -c "install-tool helm v3.7.2 && helm repo add repo-test https://gitlab.com/api/v4/projects/xxxxxxx/packages/helm/stable && helm dependency update ''"", "options": { "cwd": "/tmp/github/some/repo", "encoding": "utf-8", @@ -590,7 +590,7 @@ exports[`modules/manager/helmv3/artifacts sets repositories from registryAliases exports[`modules/manager/helmv3/artifacts sets repositories from registryAliases with docker 1`] = ` [ { - "cmd": "docker pull containerbase/sidecar", + "cmd": "docker pull ghcr.io/containerbase/sidecar:8.0.2", "options": { "encoding": "utf-8", }, @@ -602,7 +602,7 @@ exports[`modules/manager/helmv3/artifacts sets repositories from registryAliases }, }, { - "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e HELM_EXPERIMENTAL_OCI -e HELM_REGISTRY_CONFIG -e HELM_REPOSITORY_CONFIG -e HELM_REPOSITORY_CACHE -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" containerbase/sidecar bash -l -c "install-tool helm v3.7.2 && helm repo add stable the_stable_url && helm repo add repo1 the_repo1_url && helm repo add repo-test https://gitlab.com/api/v4/projects/xxxxxxx/packages/helm/stable && helm dependency update ''"", + "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e HELM_EXPERIMENTAL_OCI -e HELM_REGISTRY_CONFIG -e HELM_REPOSITORY_CONFIG -e HELM_REPOSITORY_CACHE -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar:8.0.2 bash -l -c "install-tool helm v3.7.2 && helm repo add stable the_stable_url && helm repo add repo1 the_repo1_url && helm repo add repo-test https://gitlab.com/api/v4/projects/xxxxxxx/packages/helm/stable && helm dependency update ''"", "options": { "cwd": "/tmp/github/some/repo", "encoding": "utf-8", diff --git a/lib/modules/manager/helmv3/artifacts.spec.ts b/lib/modules/manager/helmv3/artifacts.spec.ts index 0116d6b7c65820..c8f89ba24fcd07 100644 --- a/lib/modules/manager/helmv3/artifacts.spec.ts +++ b/lib/modules/manager/helmv3/artifacts.spec.ts @@ -153,7 +153,11 @@ describe('modules/manager/helmv3/artifacts', () => { }); it('returns updated Chart.lock with docker', async () => { - GlobalConfig.set({ ...adminConfig, binarySource: 'docker' }); + GlobalConfig.set({ + ...adminConfig, + binarySource: 'docker', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + }); fs.getSiblingFileName.mockReturnValueOnce('Chart.lock'); fs.readLocalFile.mockResolvedValueOnce(ociLockFile1 as never); const execSnapshots = mockExecAll(); @@ -585,7 +589,11 @@ describe('modules/manager/helmv3/artifacts', () => { }); it('sets repositories from registryAliases with docker', async () => { - GlobalConfig.set({ ...adminConfig, binarySource: 'docker' }); + GlobalConfig.set({ + ...adminConfig, + binarySource: 'docker', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + }); fs.getSiblingFileName.mockReturnValueOnce('Chart.lock'); fs.readLocalFile.mockResolvedValueOnce(ociLockFile1 as never); const execSnapshots = mockExecAll(); diff --git a/lib/modules/manager/maven-wrapper/artifacts.spec.ts b/lib/modules/manager/maven-wrapper/artifacts.spec.ts index a4a8c91a2fd697..4495e31132ccb1 100644 --- a/lib/modules/manager/maven-wrapper/artifacts.spec.ts +++ b/lib/modules/manager/maven-wrapper/artifacts.spec.ts @@ -174,7 +174,11 @@ describe('modules/manager/maven-wrapper/artifacts', () => { it('updates with docker', async () => { mockMavenFileChangedInGit(); - GlobalConfig.set({ localDir: './', binarySource: 'docker' }); + GlobalConfig.set({ + localDir: './', + binarySource: 'docker', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + }); const execSnapshots = mockExecAll({ stdout: '', stderr: '' }); const result = await updateArtifacts({ packageFileName: 'maven', @@ -193,7 +197,7 @@ describe('modules/manager/maven-wrapper/artifacts', () => { ]); expect(execSnapshots).toMatchObject([ { - cmd: 'docker pull containerbase/sidecar', + cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2', options: { encoding: 'utf-8' }, }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, @@ -204,7 +208,7 @@ describe('modules/manager/maven-wrapper/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "../.." ' + - 'containerbase/sidecar' + + 'ghcr.io/containerbase/sidecar:8.0.2' + ' bash -l -c "' + 'install-tool java 17.0.0 ' + '&& ' + diff --git a/lib/modules/manager/mix/__snapshots__/artifacts.spec.ts.snap b/lib/modules/manager/mix/__snapshots__/artifacts.spec.ts.snap index 903275a1220f48..65a294393cef0c 100644 --- a/lib/modules/manager/mix/__snapshots__/artifacts.spec.ts.snap +++ b/lib/modules/manager/mix/__snapshots__/artifacts.spec.ts.snap @@ -21,7 +21,7 @@ exports[`modules/manager/mix/artifacts authenticates to private repositories 2`] }, }, { - "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/cache":"/tmp/cache" -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" containerbase/sidecar bash -l -c "install-tool erlang 25.0.0.0 && install-tool elixir v1.13.4 && mix hex.organization auth renovate_test --key valid_test_token && mix deps.update private_package other_package"", + "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/cache":"/tmp/cache" -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar:8.0.2 bash -l -c "install-tool erlang 25.0.0.0 && install-tool elixir v1.13.4 && mix hex.organization auth renovate_test --key valid_test_token && mix deps.update private_package other_package"", "options": { "cwd": "/tmp/github/some/repo", "encoding": "utf-8", @@ -69,7 +69,7 @@ exports[`modules/manager/mix/artifacts returns null if unchanged 1`] = ` exports[`modules/manager/mix/artifacts returns updated mix.lock 1`] = ` [ { - "cmd": "docker pull containerbase/sidecar", + "cmd": "docker pull ghcr.io/containerbase/sidecar:8.0.2", "options": { "encoding": "utf-8", }, @@ -81,7 +81,7 @@ exports[`modules/manager/mix/artifacts returns updated mix.lock 1`] = ` }, }, { - "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/cache":"/tmp/cache" -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" containerbase/sidecar bash -l -c "install-tool erlang 25.0.0.0 && install-tool elixir 1.13.4 && mix deps.update plug"", + "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/cache":"/tmp/cache" -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar:8.0.2 bash -l -c "install-tool erlang 25.0.0.0 && install-tool elixir 1.13.4 && mix deps.update plug"", "options": { "cwd": "/tmp/github/some/repo", "encoding": "utf-8", diff --git a/lib/modules/manager/mix/artifacts.spec.ts b/lib/modules/manager/mix/artifacts.spec.ts index 29801cb9371d68..1448fa8ee0cc1e 100644 --- a/lib/modules/manager/mix/artifacts.spec.ts +++ b/lib/modules/manager/mix/artifacts.spec.ts @@ -90,7 +90,11 @@ describe('modules/manager/mix/artifacts', () => { it('returns updated mix.lock', async () => { jest.spyOn(docker, 'removeDanglingContainers').mockResolvedValueOnce(); - GlobalConfig.set({ ...adminConfig, binarySource: 'docker' }); + GlobalConfig.set({ + ...adminConfig, + binarySource: 'docker', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + }); fs.readLocalFile.mockResolvedValueOnce('Old mix.lock'); fs.findLocalSiblingOrParent.mockResolvedValueOnce('mix.lock'); const execSnapshots = mockExecAll(); @@ -161,7 +165,11 @@ describe('modules/manager/mix/artifacts', () => { it('authenticates to private repositories', async () => { jest.spyOn(docker, 'removeDanglingContainers').mockResolvedValueOnce(); - GlobalConfig.set({ ...adminConfig, binarySource: 'docker' }); + GlobalConfig.set({ + ...adminConfig, + binarySource: 'docker', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + }); fs.readLocalFile.mockResolvedValueOnce('Old mix.lock'); fs.findLocalSiblingOrParent.mockResolvedValueOnce('mix.lock'); const execSnapshots = mockExecAll(); @@ -221,7 +229,11 @@ describe('modules/manager/mix/artifacts', () => { }); it('returns updated mix.lock in subdir', async () => { - GlobalConfig.set({ ...adminConfig, binarySource: 'docker' }); + GlobalConfig.set({ + ...adminConfig, + binarySource: 'docker', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + }); fs.findLocalSiblingOrParent.mockResolvedValueOnce('subdir/mix.lock'); mockExecAll(); expect( diff --git a/lib/modules/manager/nix/artifacts.spec.ts b/lib/modules/manager/nix/artifacts.spec.ts index 35509270490ec9..ded13d3df93e45 100644 --- a/lib/modules/manager/nix/artifacts.spec.ts +++ b/lib/modules/manager/nix/artifacts.spec.ts @@ -24,7 +24,11 @@ const adminConfig: RepoGlobalConfig = { cacheDir: join('/tmp/renovate/cache'), containerbaseDir: join('/tmp/renovate/cache/containerbase'), }; -const dockerAdminConfig = { ...adminConfig, binarySource: 'docker' }; +const dockerAdminConfig = { + ...adminConfig, + binarySource: 'docker', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', +}; process.env.BUILDPACK = 'true'; @@ -177,7 +181,7 @@ describe('modules/manager/nix/artifacts', () => { }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -187,7 +191,7 @@ describe('modules/manager/nix/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar ' + + 'ghcr.io/containerbase/sidecar:8.0.2 ' + 'bash -l -c "' + 'install-tool nix 2.10.0 ' + '&& ' + @@ -308,7 +312,7 @@ describe('modules/manager/nix/artifacts', () => { }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -318,7 +322,7 @@ describe('modules/manager/nix/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar ' + + 'ghcr.io/containerbase/sidecar:8.0.2 ' + 'bash -l -c "' + 'install-tool nix 2.10.0 ' + '&& ' + diff --git a/lib/modules/manager/npm/post-update/lerna.spec.ts b/lib/modules/manager/npm/post-update/lerna.spec.ts index b6ae8f2fe77b29..8990d681b4edf3 100644 --- a/lib/modules/manager/npm/post-update/lerna.spec.ts +++ b/lib/modules/manager/npm/post-update/lerna.spec.ts @@ -134,7 +134,11 @@ describe('modules/manager/npm/post-update/lerna', () => { it('suppports docker', async () => { const execSnapshots = mockExecAll(); - GlobalConfig.set({ ...globalConfig, binarySource: 'docker' }); + GlobalConfig.set({ + ...globalConfig, + binarySource: 'docker', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + }); const res = await lernaHelper.generateLockFiles( lernaPkgFile('npm'), @@ -144,7 +148,7 @@ describe('modules/manager/npm/post-update/lerna', () => { ); expect(execSnapshots).toMatchObject([ { - cmd: 'docker pull containerbase/sidecar', + cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2', }, { cmd: 'docker ps --filter name=renovate_sidecar -aq', @@ -155,7 +159,7 @@ describe('modules/manager/npm/post-update/lerna', () => { '-v "/tmp/cache":"/tmp/cache" ' + '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + - '-w "some-dir" containerbase/sidecar ' + + '-w "some-dir" ghcr.io/containerbase/sidecar:8.0.2 ' + 'bash -l -c "' + 'install-tool node 16.16.0 ' + '&& ' + diff --git a/lib/modules/manager/npm/post-update/npm.spec.ts b/lib/modules/manager/npm/post-update/npm.spec.ts index 42d4851b9781e6..1f08780a2fbd59 100644 --- a/lib/modules/manager/npm/post-update/npm.spec.ts +++ b/lib/modules/manager/npm/post-update/npm.spec.ts @@ -246,6 +246,7 @@ describe('modules/manager/npm/post-update/npm', () => { cacheDir: '/tmp', binarySource: 'docker', allowScripts: true, + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', }); const execSnapshots = mockExecAll(); fs.readLocalFile.mockResolvedValue('package-lock-contents'); @@ -259,7 +260,7 @@ describe('modules/manager/npm/post-update/npm', () => { expect(fs.readLocalFile).toHaveBeenCalledTimes(1); expect(res.lockFile).toBe('package-lock-contents'); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -268,7 +269,7 @@ describe('modules/manager/npm/post-update/npm', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "some-dir" ' + - 'containerbase/sidecar ' + + 'ghcr.io/containerbase/sidecar:8.0.2 ' + 'bash -l -c "' + 'install-tool node 16.16.0 ' + '&& ' + diff --git a/lib/modules/manager/npm/post-update/pnpm.spec.ts b/lib/modules/manager/npm/post-update/pnpm.spec.ts index 5acd7a58a4a63c..9af4327c04d808 100644 --- a/lib/modules/manager/npm/post-update/pnpm.spec.ts +++ b/lib/modules/manager/npm/post-update/pnpm.spec.ts @@ -213,6 +213,7 @@ describe('modules/manager/npm/post-update/pnpm', () => { cacheDir: '/tmp', binarySource: 'docker', allowScripts: true, + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', }); const execSnapshots = mockExecAll(); fs.readLocalFile.mockResolvedValue('package-lock-contents'); @@ -224,7 +225,7 @@ describe('modules/manager/npm/post-update/pnpm', () => { expect(fs.readLocalFile).toHaveBeenCalledTimes(1); expect(res.lockFile).toBe('package-lock-contents'); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -233,7 +234,7 @@ describe('modules/manager/npm/post-update/pnpm', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "some-dir" ' + - 'containerbase/sidecar ' + + 'ghcr.io/containerbase/sidecar:8.0.2 ' + 'bash -l -c "' + 'install-tool node 16.16.0 ' + '&& install-tool pnpm 6.0.0 ' + diff --git a/lib/modules/manager/npm/post-update/yarn.spec.ts b/lib/modules/manager/npm/post-update/yarn.spec.ts index 3a525661942559..46102a56cfaf42 100644 --- a/lib/modules/manager/npm/post-update/yarn.spec.ts +++ b/lib/modules/manager/npm/post-update/yarn.spec.ts @@ -536,6 +536,7 @@ describe('modules/manager/npm/post-update/yarn', () => { localDir: '.', binarySource: 'docker', cacheDir: '/tmp/cache', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', }); Fixtures.mock( { @@ -555,10 +556,10 @@ describe('modules/manager/npm/post-update/yarn', () => { expect(res.lockFile).toBe(plocktest1YarnLockV1); const options = { encoding: 'utf-8' }; expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar', options }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2', options }, { cmd: - `docker run --rm --name=renovate_sidecar --label=renovate_child -v ".":"." -v "/tmp/cache":"/tmp/cache" -e CI -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "some-dir" containerbase/sidecar ` + + `docker run --rm --name=renovate_sidecar --label=renovate_child -v ".":"." -v "/tmp/cache":"/tmp/cache" -e CI -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "some-dir" ghcr.io/containerbase/sidecar:8.0.2 ` + `bash -l -c "` + `install-tool node 16.16.0` + ` && ` + diff --git a/lib/modules/manager/nuget/artifacts.spec.ts b/lib/modules/manager/nuget/artifacts.spec.ts index 5520b23a89ea87..1f32b487b88ff1 100644 --- a/lib/modules/manager/nuget/artifacts.spec.ts +++ b/lib/modules/manager/nuget/artifacts.spec.ts @@ -222,7 +222,11 @@ describe('modules/manager/nuget/artifacts', () => { }); it('supports docker mode', async () => { - GlobalConfig.set({ ...adminConfig, binarySource: 'docker' }); + GlobalConfig.set({ + ...adminConfig, + binarySource: 'docker', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + }); const execSnapshots = mockExecAll(); fs.getSiblingFileName.mockReturnValueOnce('packages.lock.json'); git.getFiles.mockResolvedValueOnce({ @@ -249,7 +253,7 @@ describe('modules/manager/nuget/artifacts', () => { ]); expect(execSnapshots).toMatchObject([ { - cmd: 'docker pull containerbase/sidecar', + cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2', }, { cmd: 'docker ps --filter name=renovate_sidecar -aq', @@ -264,7 +268,7 @@ describe('modules/manager/nuget/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar ' + + 'ghcr.io/containerbase/sidecar:8.0.2 ' + 'bash -l -c "' + 'install-tool dotnet 7.0.100' + ' && ' + diff --git a/lib/modules/manager/pep621/artifacts.spec.ts b/lib/modules/manager/pep621/artifacts.spec.ts index d28645cf794350..f9fb86531c1f8c 100644 --- a/lib/modules/manager/pep621/artifacts.spec.ts +++ b/lib/modules/manager/pep621/artifacts.spec.ts @@ -58,7 +58,11 @@ describe('modules/manager/pep621/artifacts', () => { it('return processor result', async () => { const execSnapshots = mockExecAll(); - GlobalConfig.set({ ...adminConfig, binarySource: 'docker' }); + GlobalConfig.set({ + ...adminConfig, + binarySource: 'docker', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + }); fs.getSiblingFileName.mockReturnValueOnce('pdm.lock'); fs.readLocalFile.mockResolvedValueOnce('old test content'); fs.readLocalFile.mockResolvedValueOnce('new test content'); @@ -98,7 +102,7 @@ requires-python = "<3.9" ]); expect(execSnapshots).toMatchObject([ { - cmd: 'docker pull containerbase/sidecar', + cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2', options: { encoding: 'utf-8', }, @@ -117,7 +121,7 @@ requires-python = "<3.9" '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar ' + + 'ghcr.io/containerbase/sidecar:8.0.2 ' + 'bash -l -c "' + 'install-tool python 3.8.1 ' + '&& ' + diff --git a/lib/modules/manager/pep621/processors/pdm.spec.ts b/lib/modules/manager/pep621/processors/pdm.spec.ts index 4e1c77a1f4ae4c..d3032d7fb20a6d 100644 --- a/lib/modules/manager/pep621/processors/pdm.spec.ts +++ b/lib/modules/manager/pep621/processors/pdm.spec.ts @@ -41,7 +41,11 @@ describe('modules/manager/pep621/processors/pdm', () => { it('return null if the lock file is unchanged', async () => { const execSnapshots = mockExecAll(); - GlobalConfig.set({ ...adminConfig, binarySource: 'docker' }); + GlobalConfig.set({ + ...adminConfig, + binarySource: 'docker', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + }); fs.getSiblingFileName.mockReturnValueOnce('pdm.lock'); fs.readLocalFile.mockResolvedValueOnce('test content'); fs.readLocalFile.mockResolvedValueOnce('test content'); @@ -67,7 +71,7 @@ describe('modules/manager/pep621/processors/pdm', () => { expect(result).toBeNull(); expect(execSnapshots).toMatchObject([ { - cmd: 'docker pull containerbase/sidecar', + cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2', }, { cmd: 'docker ps --filter name=renovate_sidecar -aq', @@ -80,7 +84,7 @@ describe('modules/manager/pep621/processors/pdm', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar ' + + 'ghcr.io/containerbase/sidecar:8.0.2 ' + 'bash -l -c "' + 'install-tool python 3.11.2 ' + '&& ' + diff --git a/lib/modules/manager/pip-compile/artifacts.spec.ts b/lib/modules/manager/pip-compile/artifacts.spec.ts index 94c8463f29e48d..4712e2840f284f 100644 --- a/lib/modules/manager/pip-compile/artifacts.spec.ts +++ b/lib/modules/manager/pip-compile/artifacts.spec.ts @@ -23,7 +23,11 @@ const adminConfig: RepoGlobalConfig = { cacheDir: join('/tmp/renovate/cache'), containerbaseDir: join('/tmp/renovate/cache/containerbase'), }; -const dockerAdminConfig = { ...adminConfig, binarySource: 'docker' }; +const dockerAdminConfig = { + ...adminConfig, + binarySource: 'docker', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', +}; process.env.BUILDPACK = 'true'; @@ -114,7 +118,7 @@ describe('modules/manager/pip-compile/artifacts', () => { ).not.toBeNull(); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -125,7 +129,7 @@ describe('modules/manager/pip-compile/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar ' + + 'ghcr.io/containerbase/sidecar:8.0.2 ' + 'bash -l -c "' + 'install-tool python 3.10.2 ' + '&& ' + @@ -231,7 +235,7 @@ describe('modules/manager/pip-compile/artifacts', () => { ).not.toBeNull(); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -242,7 +246,7 @@ describe('modules/manager/pip-compile/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar ' + + 'ghcr.io/containerbase/sidecar:8.0.2 ' + 'bash -l -c "' + 'install-tool python 3.10.2 ' + '&& ' + diff --git a/lib/modules/manager/pip_requirements/artifacts.spec.ts b/lib/modules/manager/pip_requirements/artifacts.spec.ts index 69e2152cea29b2..203fc62fc2246f 100644 --- a/lib/modules/manager/pip_requirements/artifacts.spec.ts +++ b/lib/modules/manager/pip_requirements/artifacts.spec.ts @@ -184,7 +184,11 @@ describe('modules/manager/pip_requirements/artifacts', () => { }); it('supports docker mode', async () => { - GlobalConfig.set({ ...adminConfig, binarySource: 'docker' }); + GlobalConfig.set({ + ...adminConfig, + binarySource: 'docker', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + }); fs.readLocalFile.mockResolvedValueOnce('new content'); fs.ensureCacheDir.mockResolvedValueOnce('/tmp/cache'); const execSnapshots = mockExecAll(); @@ -207,7 +211,7 @@ describe('modules/manager/pip_requirements/artifacts', () => { ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -218,7 +222,7 @@ describe('modules/manager/pip_requirements/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar ' + + 'ghcr.io/containerbase/sidecar:8.0.2 ' + 'bash -l -c "' + 'install-tool python 3.10.2 ' + '&& ' + diff --git a/lib/modules/manager/pipenv/__snapshots__/artifacts.spec.ts.snap b/lib/modules/manager/pipenv/__snapshots__/artifacts.spec.ts.snap index 81581b65c5806e..2f3a36d6a2ba91 100644 --- a/lib/modules/manager/pipenv/__snapshots__/artifacts.spec.ts.snap +++ b/lib/modules/manager/pipenv/__snapshots__/artifacts.spec.ts.snap @@ -99,7 +99,7 @@ exports[`modules/manager/pipenv/artifacts returns updated Pipfile.lock 1`] = ` exports[`modules/manager/pipenv/artifacts supports docker mode 1`] = ` [ { - "cmd": "docker pull containerbase/sidecar", + "cmd": "docker pull ghcr.io/containerbase/sidecar:8.0.2", "options": { "encoding": "utf-8", }, @@ -111,7 +111,7 @@ exports[`modules/manager/pipenv/artifacts supports docker mode 1`] = ` }, }, { - "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e PIPENV_CACHE_DIR -e PIP_CACHE_DIR -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" containerbase/sidecar bash -l -c "install-tool python 3.7.6 && pip install --user pipenv && pipenv lock"", + "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e PIPENV_CACHE_DIR -e PIP_CACHE_DIR -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar:8.0.2 bash -l -c "install-tool python 3.7.6 && pip install --user pipenv && pipenv lock"", "options": { "cwd": "/tmp/github/some/repo", "encoding": "utf-8", @@ -138,7 +138,7 @@ exports[`modules/manager/pipenv/artifacts supports docker mode 1`] = ` exports[`modules/manager/pipenv/artifacts uses pipenv version from Pipfile 1`] = ` [ { - "cmd": "docker pull containerbase/sidecar", + "cmd": "docker pull ghcr.io/containerbase/sidecar:8.0.2", "options": { "encoding": "utf-8", }, @@ -150,7 +150,7 @@ exports[`modules/manager/pipenv/artifacts uses pipenv version from Pipfile 1`] = }, }, { - "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e PIPENV_CACHE_DIR -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" containerbase/sidecar bash -l -c "install-tool python 3.10.2 && pip install --user pipenv==2020.8.13 && pipenv lock"", + "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e PIPENV_CACHE_DIR -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar:8.0.2 bash -l -c "install-tool python 3.10.2 && pip install --user pipenv==2020.8.13 && pipenv lock"", "options": { "cwd": "/tmp/github/some/repo", "encoding": "utf-8", @@ -176,7 +176,7 @@ exports[`modules/manager/pipenv/artifacts uses pipenv version from Pipfile 1`] = exports[`modules/manager/pipenv/artifacts uses pipenv version from Pipfile dev packages 1`] = ` [ { - "cmd": "docker pull containerbase/sidecar", + "cmd": "docker pull ghcr.io/containerbase/sidecar:8.0.2", "options": { "encoding": "utf-8", }, @@ -188,7 +188,7 @@ exports[`modules/manager/pipenv/artifacts uses pipenv version from Pipfile dev p }, }, { - "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e PIPENV_CACHE_DIR -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" containerbase/sidecar bash -l -c "install-tool python 3.10.2 && pip install --user pipenv==2020.8.13 && pipenv lock"", + "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e PIPENV_CACHE_DIR -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar:8.0.2 bash -l -c "install-tool python 3.10.2 && pip install --user pipenv==2020.8.13 && pipenv lock"", "options": { "cwd": "/tmp/github/some/repo", "encoding": "utf-8", @@ -214,7 +214,7 @@ exports[`modules/manager/pipenv/artifacts uses pipenv version from Pipfile dev p exports[`modules/manager/pipenv/artifacts uses pipenv version from config 1`] = ` [ { - "cmd": "docker pull containerbase/sidecar", + "cmd": "docker pull ghcr.io/containerbase/sidecar:8.0.2", "options": { "encoding": "utf-8", }, @@ -226,7 +226,7 @@ exports[`modules/manager/pipenv/artifacts uses pipenv version from config 1`] = }, }, { - "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e PIPENV_CACHE_DIR -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" containerbase/sidecar bash -l -c "install-tool python 3.10.2 && pip install --user pipenv==2020.1.1 && pipenv lock"", + "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e PIPENV_CACHE_DIR -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar:8.0.2 bash -l -c "install-tool python 3.10.2 && pip install --user pipenv==2020.1.1 && pipenv lock"", "options": { "cwd": "/tmp/github/some/repo", "encoding": "utf-8", diff --git a/lib/modules/manager/pipenv/artifacts.spec.ts b/lib/modules/manager/pipenv/artifacts.spec.ts index 55718c39d64a3c..91d43d3fea78d5 100644 --- a/lib/modules/manager/pipenv/artifacts.spec.ts +++ b/lib/modules/manager/pipenv/artifacts.spec.ts @@ -26,7 +26,11 @@ const adminConfig: RepoGlobalConfig = { cacheDir: join('/tmp/renovate/cache'), containerbaseDir: join('/tmp/renovate/cache/containerbase'), }; -const dockerAdminConfig = { ...adminConfig, binarySource: 'docker' }; +const dockerAdminConfig = { + ...adminConfig, + binarySource: 'docker', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', +}; const config: UpdateArtifactsConfig = {}; const lockMaintenanceConfig = { ...config, isLockFileMaintenance: true }; diff --git a/lib/modules/manager/poetry/artifacts.spec.ts b/lib/modules/manager/poetry/artifacts.spec.ts index 67cc4098f841dd..6d10d04543220d 100644 --- a/lib/modules/manager/poetry/artifacts.spec.ts +++ b/lib/modules/manager/poetry/artifacts.spec.ts @@ -250,7 +250,11 @@ describe('modules/manager/poetry/artifacts', () => { }); it('returns updated poetry.lock using docker', async () => { - GlobalConfig.set({ ...adminConfig, binarySource: 'docker' }); + GlobalConfig.set({ + ...adminConfig, + binarySource: 'docker', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + }); const execSnapshots = mockExecAll(); fs.ensureCacheDir.mockResolvedValueOnce('/tmp/renovate/cache/others/pip'); // poetry.lock @@ -288,7 +292,7 @@ describe('modules/manager/poetry/artifacts', () => { }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -299,7 +303,7 @@ describe('modules/manager/poetry/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar ' + + 'ghcr.io/containerbase/sidecar:8.0.2 ' + 'bash -l -c "' + 'install-tool python 3.4.2 ' + '&& ' + @@ -312,7 +316,11 @@ describe('modules/manager/poetry/artifacts', () => { }); it('returns updated poetry.lock using docker (constraints)', async () => { - GlobalConfig.set({ ...adminConfig, binarySource: 'docker' }); + GlobalConfig.set({ + ...adminConfig, + binarySource: 'docker', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + }); const execSnapshots = mockExecAll(); fs.ensureCacheDir.mockResolvedValueOnce('/tmp/renovate/cache/others/pip'); @@ -351,7 +359,7 @@ describe('modules/manager/poetry/artifacts', () => { }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull containerbase/sidecar' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -362,7 +370,7 @@ describe('modules/manager/poetry/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar ' + + 'ghcr.io/containerbase/sidecar:8.0.2 ' + 'bash -l -c "' + 'install-tool python 2.7.5 ' + '&& ' + diff --git a/lib/modules/manager/pub/artifacts.spec.ts b/lib/modules/manager/pub/artifacts.spec.ts index af46405b091b6e..2dd364a20ed9e7 100644 --- a/lib/modules/manager/pub/artifacts.spec.ts +++ b/lib/modules/manager/pub/artifacts.spec.ts @@ -141,7 +141,11 @@ describe('modules/manager/pub/artifacts', () => { }); it(`supports ${params.sdk} docker mode`, async () => { - GlobalConfig.set({ ...adminConfig, binarySource: 'docker' }); + GlobalConfig.set({ + ...adminConfig, + binarySource: 'docker', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + }); const execSnapshots = mockExecAll(); fs.getSiblingFileName.mockReturnValueOnce(lockFile); fs.readLocalFile.mockResolvedValueOnce(oldLockFileContent); @@ -162,7 +166,7 @@ describe('modules/manager/pub/artifacts', () => { ]); expect(execSnapshots).toMatchObject([ { - cmd: 'docker pull containerbase/sidecar', + cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2', }, { cmd: 'docker ps --filter name=renovate_sidecar -aq', @@ -175,7 +179,7 @@ describe('modules/manager/pub/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'containerbase/sidecar ' + + 'ghcr.io/containerbase/sidecar:8.0.2 ' + 'bash -l -c "' + `install-tool ${params.sdk} 3.3.9` + ' && ' + From a861ef781365069e739bcf9b277614ad2bf40629 Mon Sep 17 00:00:00 2001 From: RahulGautamSingh Date: Wed, 14 Jun 2023 03:03:22 +0545 Subject: [PATCH 11/12] apply suggestions + update test --- lib/modules/manager/bundler/artifacts.spec.ts | 30 ++++++++-------- lib/modules/manager/cargo/artifacts.spec.ts | 6 ++-- .../__snapshots__/artifacts.spec.ts.snap | 8 ++--- .../manager/cocoapods/artifacts.spec.ts | 6 ++-- .../manager/composer/artifacts.spec.ts | 6 ++-- lib/modules/manager/gomod/artifacts.spec.ts | 36 +++++++++---------- .../manager/gradle-wrapper/artifacts.spec.ts | 6 ++-- lib/modules/manager/gradle/artifacts.spec.ts | 8 ++--- .../manager/helmfile/artifacts.spec.ts | 6 ++-- .../__snapshots__/artifacts.spec.ts.snap | 8 ++--- lib/modules/manager/helmv3/artifacts.spec.ts | 4 +-- .../manager/maven-wrapper/artifacts.spec.ts | 6 ++-- .../mix/__snapshots__/artifacts.spec.ts.snap | 6 ++-- lib/modules/manager/mix/artifacts.spec.ts | 6 ++-- lib/modules/manager/nix/artifacts.spec.ts | 10 +++--- .../manager/npm/post-update/lerna.spec.ts | 6 ++-- .../manager/npm/post-update/npm.spec.ts | 6 ++-- .../manager/npm/post-update/pnpm.spec.ts | 6 ++-- .../manager/npm/post-update/yarn.spec.ts | 6 ++-- lib/modules/manager/nuget/artifacts.spec.ts | 6 ++-- lib/modules/manager/pep621/artifacts.spec.ts | 6 ++-- .../manager/pep621/processors/pdm.spec.ts | 6 ++-- .../manager/pip-compile/artifacts.spec.ts | 10 +++--- .../pip_requirements/artifacts.spec.ts | 6 ++-- .../__snapshots__/artifacts.spec.ts.snap | 16 ++++----- lib/modules/manager/pipenv/artifacts.spec.ts | 2 +- lib/modules/manager/poetry/artifacts.spec.ts | 12 +++---- lib/modules/manager/pub/artifacts.spec.ts | 6 ++-- lib/util/exec/docker/index.spec.ts | 9 +++-- 29 files changed, 130 insertions(+), 125 deletions(-) diff --git a/lib/modules/manager/bundler/artifacts.spec.ts b/lib/modules/manager/bundler/artifacts.spec.ts index 1a6ce6ac70d5fa..d131b7d5d3ec82 100644 --- a/lib/modules/manager/bundler/artifacts.spec.ts +++ b/lib/modules/manager/bundler/artifacts.spec.ts @@ -37,7 +37,7 @@ const adminConfig: RepoGlobalConfig = { localDir: join('/tmp/github/some/repo'), cacheDir: join('/tmp/cache'), containerbaseDir: join('/tmp/cache/containerbase'), - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }; const config: UpdateArtifactsConfig = {}; @@ -280,7 +280,7 @@ describe('modules/manager/bundler/artifacts', () => { }) ).toEqual([updatedGemfileLock]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -291,7 +291,7 @@ describe('modules/manager/bundler/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2' + + 'ghcr.io/containerbase/sidecar' + ' bash -l -c "' + 'install-tool ruby 1.2.0' + ' && ' + @@ -340,7 +340,7 @@ describe('modules/manager/bundler/artifacts', () => { }) ).toEqual([updatedGemfileLock]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -351,7 +351,7 @@ describe('modules/manager/bundler/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2' + + 'ghcr.io/containerbase/sidecar' + ' bash -l -c "' + 'install-tool ruby 1.2.5' + ' && ' + @@ -402,7 +402,7 @@ describe('modules/manager/bundler/artifacts', () => { }) ).toEqual([updatedGemfileLock]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -413,7 +413,7 @@ describe('modules/manager/bundler/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2' + + 'ghcr.io/containerbase/sidecar' + ' bash -l -c "' + 'install-tool ruby 1.3.0' + ' && ' + @@ -463,7 +463,7 @@ describe('modules/manager/bundler/artifacts', () => { }) ).toEqual([updatedGemfileLock]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -475,7 +475,7 @@ describe('modules/manager/bundler/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2' + + 'ghcr.io/containerbase/sidecar' + ' bash -l -c "' + 'install-tool ruby 1.2.0' + ' && ' + @@ -534,7 +534,7 @@ describe('modules/manager/bundler/artifacts', () => { }) ).toEqual([updatedGemfileLock]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -545,7 +545,7 @@ describe('modules/manager/bundler/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2' + + 'ghcr.io/containerbase/sidecar' + ' bash -l -c "' + 'install-tool ruby 1.2.0' + ' && ' + @@ -606,7 +606,7 @@ describe('modules/manager/bundler/artifacts', () => { }) ).toEqual([updatedGemfileLock]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -617,7 +617,7 @@ describe('modules/manager/bundler/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2' + + 'ghcr.io/containerbase/sidecar' + ' bash -l -c "' + 'install-tool ruby 1.2.0' + ' && ' + @@ -677,7 +677,7 @@ describe('modules/manager/bundler/artifacts', () => { }) ).toEqual([updatedGemfileLock]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -688,7 +688,7 @@ describe('modules/manager/bundler/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2' + + 'ghcr.io/containerbase/sidecar' + ' bash -l -c "' + 'install-tool ruby 1.2.0' + ' && ' + diff --git a/lib/modules/manager/cargo/artifacts.spec.ts b/lib/modules/manager/cargo/artifacts.spec.ts index 387958ef93b12f..99b32f0f359135 100644 --- a/lib/modules/manager/cargo/artifacts.spec.ts +++ b/lib/modules/manager/cargo/artifacts.spec.ts @@ -21,7 +21,7 @@ const adminConfig: RepoGlobalConfig = { localDir: join('/tmp/github/some/repo'), cacheDir: join('/tmp/cache'), containerbaseDir: join('/tmp/cache/containerbase'), - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }; describe('modules/manager/cargo/artifacts', () => { @@ -211,7 +211,7 @@ describe('modules/manager/cargo/artifacts', () => { }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, {}, { cmd: @@ -221,7 +221,7 @@ describe('modules/manager/cargo/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2 ' + + 'ghcr.io/containerbase/sidecar ' + 'bash -l -c "' + 'install-tool rust 1.65.0' + ' && ' + diff --git a/lib/modules/manager/cocoapods/__snapshots__/artifacts.spec.ts.snap b/lib/modules/manager/cocoapods/__snapshots__/artifacts.spec.ts.snap index e8090f337c4166..78c9fda40c6bca 100644 --- a/lib/modules/manager/cocoapods/__snapshots__/artifacts.spec.ts.snap +++ b/lib/modules/manager/cocoapods/__snapshots__/artifacts.spec.ts.snap @@ -57,13 +57,13 @@ exports[`modules/manager/cocoapods/artifacts returns pod exec error 1`] = ` exports[`modules/manager/cocoapods/artifacts returns updated Podfile 1`] = ` [ { - "cmd": "docker pull ghcr.io/containerbase/sidecar:8.0.2", + "cmd": "docker pull ghcr.io/containerbase/sidecar", "options": { "encoding": "utf-8", }, }, { - "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/cache":"/tmp/cache" -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar:8.0.2 bash -l -c "install-tool ruby 3.1.0 && install-tool cocoapods 3.1.0 && gem install cocoapods-acknowledgements && pod install"", + "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/cache":"/tmp/cache" -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar bash -l -c "install-tool ruby 3.1.0 && install-tool cocoapods 3.1.0 && gem install cocoapods-acknowledgements && pod install"", "options": { "cwd": "/tmp/github/some/repo", "encoding": "utf-8", @@ -88,13 +88,13 @@ exports[`modules/manager/cocoapods/artifacts returns updated Podfile 1`] = ` exports[`modules/manager/cocoapods/artifacts returns updated Podfile and Pods files 1`] = ` [ { - "cmd": "docker pull ghcr.io/containerbase/sidecar:8.0.2", + "cmd": "docker pull ghcr.io/containerbase/sidecar", "options": { "encoding": "utf-8", }, }, { - "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/cache":"/tmp/cache" -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar:8.0.2 bash -l -c "install-tool ruby 3.1.0 && install-tool cocoapods 3.1.0 && pod install"", + "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/cache":"/tmp/cache" -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar bash -l -c "install-tool ruby 3.1.0 && install-tool cocoapods 3.1.0 && pod install"", "options": { "cwd": "/tmp/github/some/repo", "encoding": "utf-8", diff --git a/lib/modules/manager/cocoapods/artifacts.spec.ts b/lib/modules/manager/cocoapods/artifacts.spec.ts index ed1d81ad3c8fe3..6abfc45974d42e 100644 --- a/lib/modules/manager/cocoapods/artifacts.spec.ts +++ b/lib/modules/manager/cocoapods/artifacts.spec.ts @@ -26,7 +26,7 @@ const adminConfig: RepoGlobalConfig = { localDir: join('/tmp/github/some/repo'), cacheDir: join('/tmp/cache'), containerbaseDir: join('/tmp/cache/containerbase'), - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }; describe('modules/manager/cocoapods/artifacts', () => { @@ -253,7 +253,7 @@ describe('modules/manager/cocoapods/artifacts', () => { config, }); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker run --rm --name=renovate_sidecar --label=renovate_child ' + @@ -262,7 +262,7 @@ describe('modules/manager/cocoapods/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2' + + 'ghcr.io/containerbase/sidecar' + ' bash -l -c "' + 'install-tool ruby 3.1.0' + ' && ' + diff --git a/lib/modules/manager/composer/artifacts.spec.ts b/lib/modules/manager/composer/artifacts.spec.ts index 1c6018ba4001ee..089389a9b57e54 100644 --- a/lib/modules/manager/composer/artifacts.spec.ts +++ b/lib/modules/manager/composer/artifacts.spec.ts @@ -33,7 +33,7 @@ const adminConfig: RepoGlobalConfig = { localDir: join('/tmp/github/some/repo'), cacheDir: join('/tmp/renovate/cache'), containerbaseDir: join('/tmp/renovate/cache/containerbase'), - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }; const repoStatus = partial({ @@ -785,7 +785,7 @@ describe('modules/manager/composer/artifacts', () => { ]); expect(execSnapshots).toMatchObject([ { - cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2', + cmd: 'docker pull ghcr.io/containerbase/sidecar', options: { encoding: 'utf-8', }, @@ -805,7 +805,7 @@ describe('modules/manager/composer/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2' + + 'ghcr.io/containerbase/sidecar' + ' bash -l -c "' + 'install-tool php 7.3' + ' && ' + diff --git a/lib/modules/manager/gomod/artifacts.spec.ts b/lib/modules/manager/gomod/artifacts.spec.ts index 3cdbc2a968711e..434e850d1aa8b5 100644 --- a/lib/modules/manager/gomod/artifacts.spec.ts +++ b/lib/modules/manager/gomod/artifacts.spec.ts @@ -59,7 +59,7 @@ const adminConfig: RepoGlobalConfig = { localDir: join('/tmp/github/some/repo'), cacheDir: join('/tmp/renovate/cache'), containerbaseDir: join('/tmp/renovate/cache/containerbase'), - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }; const config: UpdateArtifactsConfig = { @@ -309,7 +309,7 @@ describe('modules/manager/gomod/artifacts', () => { }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -326,7 +326,7 @@ describe('modules/manager/gomod/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2' + + 'ghcr.io/containerbase/sidecar' + ' bash -l -c "' + 'install-tool golang 1.14.0' + ' && ' + @@ -466,7 +466,7 @@ describe('modules/manager/gomod/artifacts', () => { }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -496,7 +496,7 @@ describe('modules/manager/gomod/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2' + + 'ghcr.io/containerbase/sidecar' + ' bash -l -c "' + 'install-tool golang 1.14.0' + ' && ' + @@ -577,7 +577,7 @@ describe('modules/manager/gomod/artifacts', () => { }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, {}, { options: { @@ -991,7 +991,7 @@ describe('modules/manager/gomod/artifacts', () => { { file: { contents: 'New go.sum 2', path: 'go.mod', type: 'addition' } }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, {}, { cmd: @@ -1008,7 +1008,7 @@ describe('modules/manager/gomod/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2' + + 'ghcr.io/containerbase/sidecar' + ' bash -l -c "' + 'install-tool golang 1.14.0' + ' && ' + @@ -1056,7 +1056,7 @@ describe('modules/manager/gomod/artifacts', () => { { file: { contents: 'New go.sum 2', path: 'go.mod', type: 'addition' } }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, {}, { cmd: @@ -1073,7 +1073,7 @@ describe('modules/manager/gomod/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2' + + 'ghcr.io/containerbase/sidecar' + ' bash -l -c "' + 'install-tool golang 1.14.0' + ' && ' + @@ -1121,7 +1121,7 @@ describe('modules/manager/gomod/artifacts', () => { { file: { contents: 'New go.sum 2', path: 'go.mod', type: 'addition' } }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, {}, { cmd: @@ -1138,7 +1138,7 @@ describe('modules/manager/gomod/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2' + + 'ghcr.io/containerbase/sidecar' + ' bash -l -c "' + 'install-tool golang 1.14.0' + ' && ' + @@ -1186,7 +1186,7 @@ describe('modules/manager/gomod/artifacts', () => { { file: { contents: 'New go.sum 2', path: 'go.mod', type: 'addition' } }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, {}, { cmd: @@ -1203,7 +1203,7 @@ describe('modules/manager/gomod/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2' + + 'ghcr.io/containerbase/sidecar' + ' bash -l -c "' + 'install-tool golang 1.14.0' + ' && ' + @@ -1843,7 +1843,7 @@ describe('modules/manager/gomod/artifacts', () => { ]); const expectedResult = [ { - cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2', + cmd: 'docker pull ghcr.io/containerbase/sidecar', }, {}, { @@ -1861,7 +1861,7 @@ describe('modules/manager/gomod/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2' + + 'ghcr.io/containerbase/sidecar' + ' bash -l -c "' + 'install-tool golang 1.17.0' + ' && ' + @@ -1918,7 +1918,7 @@ describe('modules/manager/gomod/artifacts', () => { ]); const expectedResult = [ { - cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2', + cmd: 'docker pull ghcr.io/containerbase/sidecar', }, {}, { @@ -1936,7 +1936,7 @@ describe('modules/manager/gomod/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2' + + 'ghcr.io/containerbase/sidecar' + ' bash -l -c "' + 'install-tool golang 1.14.0' + ' && ' + diff --git a/lib/modules/manager/gradle-wrapper/artifacts.spec.ts b/lib/modules/manager/gradle-wrapper/artifacts.spec.ts index 3318ba0fef9130..181362e4fd3b43 100644 --- a/lib/modules/manager/gradle-wrapper/artifacts.spec.ts +++ b/lib/modules/manager/gradle-wrapper/artifacts.spec.ts @@ -182,7 +182,7 @@ describe('modules/manager/gradle-wrapper/artifacts', () => { GlobalConfig.set({ ...adminConfig, binarySource: 'docker', - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }); const result = await updateArtifacts({ @@ -202,7 +202,7 @@ describe('modules/manager/gradle-wrapper/artifacts', () => { }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -213,7 +213,7 @@ describe('modules/manager/gradle-wrapper/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2' + + 'ghcr.io/containerbase/sidecar' + ' bash -l -c "' + 'install-tool java 11.0.1' + ' && ' + diff --git a/lib/modules/manager/gradle/artifacts.spec.ts b/lib/modules/manager/gradle/artifacts.spec.ts index ddfc312dce81f1..7c0f1be7555f9c 100644 --- a/lib/modules/manager/gradle/artifacts.spec.ts +++ b/lib/modules/manager/gradle/artifacts.spec.ts @@ -35,7 +35,7 @@ const adminConfig: RepoGlobalConfig = { localDir: join('/tmp/github/some/repo'), cacheDir: join('/tmp/cache'), containerbaseDir: join('/tmp/cache/containerbase'), - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }; const osPlatformSpy = jest.spyOn(os, 'platform'); @@ -323,7 +323,7 @@ describe('modules/manager/gradle/artifacts', () => { }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -334,7 +334,7 @@ describe('modules/manager/gradle/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2' + + 'ghcr.io/containerbase/sidecar' + ' bash -l -c "' + 'install-tool java 16.0.1' + ' && ' + @@ -352,7 +352,7 @@ describe('modules/manager/gradle/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2' + + 'ghcr.io/containerbase/sidecar' + ' bash -l -c "' + 'install-tool java 16.0.1' + ' && ' + diff --git a/lib/modules/manager/helmfile/artifacts.spec.ts b/lib/modules/manager/helmfile/artifacts.spec.ts index 3ab4759e0b2ea4..519f35784415f7 100644 --- a/lib/modules/manager/helmfile/artifacts.spec.ts +++ b/lib/modules/manager/helmfile/artifacts.spec.ts @@ -24,7 +24,7 @@ const adminConfig: RepoGlobalConfig = { localDir: join('/tmp/github/some/repo'), // `join` fixes Windows CI cacheDir: join('/tmp/renovate/cache'), containerbaseDir: join('/tmp/renovate/cache/containerbase'), - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }; const config: UpdateArtifactsConfig = {}; @@ -157,7 +157,7 @@ describe('modules/manager/helmfile/artifacts', () => { { binarySource: 'docker', expectedCommands: [ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -167,7 +167,7 @@ describe('modules/manager/helmfile/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2 ' + + 'ghcr.io/containerbase/sidecar ' + 'bash -l -c "' + 'install-tool helm v3.7.2' + ' && ' + diff --git a/lib/modules/manager/helmv3/__snapshots__/artifacts.spec.ts.snap b/lib/modules/manager/helmv3/__snapshots__/artifacts.spec.ts.snap index 6dc88b6eaa7c1d..f4e5d2e08f49c6 100644 --- a/lib/modules/manager/helmv3/__snapshots__/artifacts.spec.ts.snap +++ b/lib/modules/manager/helmv3/__snapshots__/artifacts.spec.ts.snap @@ -456,7 +456,7 @@ exports[`modules/manager/helmv3/artifacts returns updated Chart.lock for lockfil exports[`modules/manager/helmv3/artifacts returns updated Chart.lock with docker 1`] = ` [ { - "cmd": "docker pull ghcr.io/containerbase/sidecar:8.0.2", + "cmd": "docker pull ghcr.io/containerbase/sidecar", "options": { "encoding": "utf-8", }, @@ -468,7 +468,7 @@ exports[`modules/manager/helmv3/artifacts returns updated Chart.lock with docker }, }, { - "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e HELM_EXPERIMENTAL_OCI -e HELM_REGISTRY_CONFIG -e HELM_REPOSITORY_CONFIG -e HELM_REPOSITORY_CACHE -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar:8.0.2 bash -l -c "install-tool helm v3.7.2 && helm repo add repo-test https://gitlab.com/api/v4/projects/xxxxxxx/packages/helm/stable && helm dependency update ''"", + "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e HELM_EXPERIMENTAL_OCI -e HELM_REGISTRY_CONFIG -e HELM_REPOSITORY_CONFIG -e HELM_REPOSITORY_CACHE -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar bash -l -c "install-tool helm v3.7.2 && helm repo add repo-test https://gitlab.com/api/v4/projects/xxxxxxx/packages/helm/stable && helm dependency update ''"", "options": { "cwd": "/tmp/github/some/repo", "encoding": "utf-8", @@ -590,7 +590,7 @@ exports[`modules/manager/helmv3/artifacts sets repositories from registryAliases exports[`modules/manager/helmv3/artifacts sets repositories from registryAliases with docker 1`] = ` [ { - "cmd": "docker pull ghcr.io/containerbase/sidecar:8.0.2", + "cmd": "docker pull ghcr.io/containerbase/sidecar", "options": { "encoding": "utf-8", }, @@ -602,7 +602,7 @@ exports[`modules/manager/helmv3/artifacts sets repositories from registryAliases }, }, { - "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e HELM_EXPERIMENTAL_OCI -e HELM_REGISTRY_CONFIG -e HELM_REPOSITORY_CONFIG -e HELM_REPOSITORY_CACHE -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar:8.0.2 bash -l -c "install-tool helm v3.7.2 && helm repo add stable the_stable_url && helm repo add repo1 the_repo1_url && helm repo add repo-test https://gitlab.com/api/v4/projects/xxxxxxx/packages/helm/stable && helm dependency update ''"", + "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e HELM_EXPERIMENTAL_OCI -e HELM_REGISTRY_CONFIG -e HELM_REPOSITORY_CONFIG -e HELM_REPOSITORY_CACHE -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar bash -l -c "install-tool helm v3.7.2 && helm repo add stable the_stable_url && helm repo add repo1 the_repo1_url && helm repo add repo-test https://gitlab.com/api/v4/projects/xxxxxxx/packages/helm/stable && helm dependency update ''"", "options": { "cwd": "/tmp/github/some/repo", "encoding": "utf-8", diff --git a/lib/modules/manager/helmv3/artifacts.spec.ts b/lib/modules/manager/helmv3/artifacts.spec.ts index c8f89ba24fcd07..ff8e5b3ee94153 100644 --- a/lib/modules/manager/helmv3/artifacts.spec.ts +++ b/lib/modules/manager/helmv3/artifacts.spec.ts @@ -156,7 +156,7 @@ describe('modules/manager/helmv3/artifacts', () => { GlobalConfig.set({ ...adminConfig, binarySource: 'docker', - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }); fs.getSiblingFileName.mockReturnValueOnce('Chart.lock'); fs.readLocalFile.mockResolvedValueOnce(ociLockFile1 as never); @@ -592,7 +592,7 @@ describe('modules/manager/helmv3/artifacts', () => { GlobalConfig.set({ ...adminConfig, binarySource: 'docker', - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }); fs.getSiblingFileName.mockReturnValueOnce('Chart.lock'); fs.readLocalFile.mockResolvedValueOnce(ociLockFile1 as never); diff --git a/lib/modules/manager/maven-wrapper/artifacts.spec.ts b/lib/modules/manager/maven-wrapper/artifacts.spec.ts index 4495e31132ccb1..359919d3a1eae8 100644 --- a/lib/modules/manager/maven-wrapper/artifacts.spec.ts +++ b/lib/modules/manager/maven-wrapper/artifacts.spec.ts @@ -177,7 +177,7 @@ describe('modules/manager/maven-wrapper/artifacts', () => { GlobalConfig.set({ localDir: './', binarySource: 'docker', - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }); const execSnapshots = mockExecAll({ stdout: '', stderr: '' }); const result = await updateArtifacts({ @@ -197,7 +197,7 @@ describe('modules/manager/maven-wrapper/artifacts', () => { ]); expect(execSnapshots).toMatchObject([ { - cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2', + cmd: 'docker pull ghcr.io/containerbase/sidecar', options: { encoding: 'utf-8' }, }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, @@ -208,7 +208,7 @@ describe('modules/manager/maven-wrapper/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "../.." ' + - 'ghcr.io/containerbase/sidecar:8.0.2' + + 'ghcr.io/containerbase/sidecar' + ' bash -l -c "' + 'install-tool java 17.0.0 ' + '&& ' + diff --git a/lib/modules/manager/mix/__snapshots__/artifacts.spec.ts.snap b/lib/modules/manager/mix/__snapshots__/artifacts.spec.ts.snap index 65a294393cef0c..4741c076830db3 100644 --- a/lib/modules/manager/mix/__snapshots__/artifacts.spec.ts.snap +++ b/lib/modules/manager/mix/__snapshots__/artifacts.spec.ts.snap @@ -21,7 +21,7 @@ exports[`modules/manager/mix/artifacts authenticates to private repositories 2`] }, }, { - "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/cache":"/tmp/cache" -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar:8.0.2 bash -l -c "install-tool erlang 25.0.0.0 && install-tool elixir v1.13.4 && mix hex.organization auth renovate_test --key valid_test_token && mix deps.update private_package other_package"", + "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/cache":"/tmp/cache" -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar bash -l -c "install-tool erlang 25.0.0.0 && install-tool elixir v1.13.4 && mix hex.organization auth renovate_test --key valid_test_token && mix deps.update private_package other_package"", "options": { "cwd": "/tmp/github/some/repo", "encoding": "utf-8", @@ -69,7 +69,7 @@ exports[`modules/manager/mix/artifacts returns null if unchanged 1`] = ` exports[`modules/manager/mix/artifacts returns updated mix.lock 1`] = ` [ { - "cmd": "docker pull ghcr.io/containerbase/sidecar:8.0.2", + "cmd": "docker pull ghcr.io/containerbase/sidecar", "options": { "encoding": "utf-8", }, @@ -81,7 +81,7 @@ exports[`modules/manager/mix/artifacts returns updated mix.lock 1`] = ` }, }, { - "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/cache":"/tmp/cache" -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar:8.0.2 bash -l -c "install-tool erlang 25.0.0.0 && install-tool elixir 1.13.4 && mix deps.update plug"", + "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/cache":"/tmp/cache" -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar bash -l -c "install-tool erlang 25.0.0.0 && install-tool elixir 1.13.4 && mix deps.update plug"", "options": { "cwd": "/tmp/github/some/repo", "encoding": "utf-8", diff --git a/lib/modules/manager/mix/artifacts.spec.ts b/lib/modules/manager/mix/artifacts.spec.ts index 1448fa8ee0cc1e..63a5576810aec4 100644 --- a/lib/modules/manager/mix/artifacts.spec.ts +++ b/lib/modules/manager/mix/artifacts.spec.ts @@ -93,7 +93,7 @@ describe('modules/manager/mix/artifacts', () => { GlobalConfig.set({ ...adminConfig, binarySource: 'docker', - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }); fs.readLocalFile.mockResolvedValueOnce('Old mix.lock'); fs.findLocalSiblingOrParent.mockResolvedValueOnce('mix.lock'); @@ -168,7 +168,7 @@ describe('modules/manager/mix/artifacts', () => { GlobalConfig.set({ ...adminConfig, binarySource: 'docker', - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }); fs.readLocalFile.mockResolvedValueOnce('Old mix.lock'); fs.findLocalSiblingOrParent.mockResolvedValueOnce('mix.lock'); @@ -232,7 +232,7 @@ describe('modules/manager/mix/artifacts', () => { GlobalConfig.set({ ...adminConfig, binarySource: 'docker', - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }); fs.findLocalSiblingOrParent.mockResolvedValueOnce('subdir/mix.lock'); mockExecAll(); diff --git a/lib/modules/manager/nix/artifacts.spec.ts b/lib/modules/manager/nix/artifacts.spec.ts index ded13d3df93e45..0877831a679387 100644 --- a/lib/modules/manager/nix/artifacts.spec.ts +++ b/lib/modules/manager/nix/artifacts.spec.ts @@ -27,7 +27,7 @@ const adminConfig: RepoGlobalConfig = { const dockerAdminConfig = { ...adminConfig, binarySource: 'docker', - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }; process.env.BUILDPACK = 'true'; @@ -181,7 +181,7 @@ describe('modules/manager/nix/artifacts', () => { }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -191,7 +191,7 @@ describe('modules/manager/nix/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2 ' + + 'ghcr.io/containerbase/sidecar ' + 'bash -l -c "' + 'install-tool nix 2.10.0 ' + '&& ' + @@ -312,7 +312,7 @@ describe('modules/manager/nix/artifacts', () => { }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -322,7 +322,7 @@ describe('modules/manager/nix/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2 ' + + 'ghcr.io/containerbase/sidecar ' + 'bash -l -c "' + 'install-tool nix 2.10.0 ' + '&& ' + diff --git a/lib/modules/manager/npm/post-update/lerna.spec.ts b/lib/modules/manager/npm/post-update/lerna.spec.ts index 8990d681b4edf3..b783df05c30882 100644 --- a/lib/modules/manager/npm/post-update/lerna.spec.ts +++ b/lib/modules/manager/npm/post-update/lerna.spec.ts @@ -137,7 +137,7 @@ describe('modules/manager/npm/post-update/lerna', () => { GlobalConfig.set({ ...globalConfig, binarySource: 'docker', - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }); const res = await lernaHelper.generateLockFiles( @@ -148,7 +148,7 @@ describe('modules/manager/npm/post-update/lerna', () => { ); expect(execSnapshots).toMatchObject([ { - cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2', + cmd: 'docker pull ghcr.io/containerbase/sidecar', }, { cmd: 'docker ps --filter name=renovate_sidecar -aq', @@ -159,7 +159,7 @@ describe('modules/manager/npm/post-update/lerna', () => { '-v "/tmp/cache":"/tmp/cache" ' + '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + - '-w "some-dir" ghcr.io/containerbase/sidecar:8.0.2 ' + + '-w "some-dir" ghcr.io/containerbase/sidecar ' + 'bash -l -c "' + 'install-tool node 16.16.0 ' + '&& ' + diff --git a/lib/modules/manager/npm/post-update/npm.spec.ts b/lib/modules/manager/npm/post-update/npm.spec.ts index 1f08780a2fbd59..ff0f453b6635bb 100644 --- a/lib/modules/manager/npm/post-update/npm.spec.ts +++ b/lib/modules/manager/npm/post-update/npm.spec.ts @@ -246,7 +246,7 @@ describe('modules/manager/npm/post-update/npm', () => { cacheDir: '/tmp', binarySource: 'docker', allowScripts: true, - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }); const execSnapshots = mockExecAll(); fs.readLocalFile.mockResolvedValue('package-lock-contents'); @@ -260,7 +260,7 @@ describe('modules/manager/npm/post-update/npm', () => { expect(fs.readLocalFile).toHaveBeenCalledTimes(1); expect(res.lockFile).toBe('package-lock-contents'); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -269,7 +269,7 @@ describe('modules/manager/npm/post-update/npm', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "some-dir" ' + - 'ghcr.io/containerbase/sidecar:8.0.2 ' + + 'ghcr.io/containerbase/sidecar ' + 'bash -l -c "' + 'install-tool node 16.16.0 ' + '&& ' + diff --git a/lib/modules/manager/npm/post-update/pnpm.spec.ts b/lib/modules/manager/npm/post-update/pnpm.spec.ts index 9af4327c04d808..e3a9fe79ebec23 100644 --- a/lib/modules/manager/npm/post-update/pnpm.spec.ts +++ b/lib/modules/manager/npm/post-update/pnpm.spec.ts @@ -213,7 +213,7 @@ describe('modules/manager/npm/post-update/pnpm', () => { cacheDir: '/tmp', binarySource: 'docker', allowScripts: true, - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }); const execSnapshots = mockExecAll(); fs.readLocalFile.mockResolvedValue('package-lock-contents'); @@ -225,7 +225,7 @@ describe('modules/manager/npm/post-update/pnpm', () => { expect(fs.readLocalFile).toHaveBeenCalledTimes(1); expect(res.lockFile).toBe('package-lock-contents'); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -234,7 +234,7 @@ describe('modules/manager/npm/post-update/pnpm', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "some-dir" ' + - 'ghcr.io/containerbase/sidecar:8.0.2 ' + + 'ghcr.io/containerbase/sidecar ' + 'bash -l -c "' + 'install-tool node 16.16.0 ' + '&& install-tool pnpm 6.0.0 ' + diff --git a/lib/modules/manager/npm/post-update/yarn.spec.ts b/lib/modules/manager/npm/post-update/yarn.spec.ts index 46102a56cfaf42..997bd070438447 100644 --- a/lib/modules/manager/npm/post-update/yarn.spec.ts +++ b/lib/modules/manager/npm/post-update/yarn.spec.ts @@ -536,7 +536,7 @@ describe('modules/manager/npm/post-update/yarn', () => { localDir: '.', binarySource: 'docker', cacheDir: '/tmp/cache', - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }); Fixtures.mock( { @@ -556,10 +556,10 @@ describe('modules/manager/npm/post-update/yarn', () => { expect(res.lockFile).toBe(plocktest1YarnLockV1); const options = { encoding: 'utf-8' }; expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2', options }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar', options }, { cmd: - `docker run --rm --name=renovate_sidecar --label=renovate_child -v ".":"." -v "/tmp/cache":"/tmp/cache" -e CI -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "some-dir" ghcr.io/containerbase/sidecar:8.0.2 ` + + `docker run --rm --name=renovate_sidecar --label=renovate_child -v ".":"." -v "/tmp/cache":"/tmp/cache" -e CI -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "some-dir" ghcr.io/containerbase/sidecar ` + `bash -l -c "` + `install-tool node 16.16.0` + ` && ` + diff --git a/lib/modules/manager/nuget/artifacts.spec.ts b/lib/modules/manager/nuget/artifacts.spec.ts index 1f32b487b88ff1..d950b750df16d9 100644 --- a/lib/modules/manager/nuget/artifacts.spec.ts +++ b/lib/modules/manager/nuget/artifacts.spec.ts @@ -225,7 +225,7 @@ describe('modules/manager/nuget/artifacts', () => { GlobalConfig.set({ ...adminConfig, binarySource: 'docker', - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }); const execSnapshots = mockExecAll(); fs.getSiblingFileName.mockReturnValueOnce('packages.lock.json'); @@ -253,7 +253,7 @@ describe('modules/manager/nuget/artifacts', () => { ]); expect(execSnapshots).toMatchObject([ { - cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2', + cmd: 'docker pull ghcr.io/containerbase/sidecar', }, { cmd: 'docker ps --filter name=renovate_sidecar -aq', @@ -268,7 +268,7 @@ describe('modules/manager/nuget/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2 ' + + 'ghcr.io/containerbase/sidecar ' + 'bash -l -c "' + 'install-tool dotnet 7.0.100' + ' && ' + diff --git a/lib/modules/manager/pep621/artifacts.spec.ts b/lib/modules/manager/pep621/artifacts.spec.ts index f9fb86531c1f8c..717a03899c64ea 100644 --- a/lib/modules/manager/pep621/artifacts.spec.ts +++ b/lib/modules/manager/pep621/artifacts.spec.ts @@ -61,7 +61,7 @@ describe('modules/manager/pep621/artifacts', () => { GlobalConfig.set({ ...adminConfig, binarySource: 'docker', - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }); fs.getSiblingFileName.mockReturnValueOnce('pdm.lock'); fs.readLocalFile.mockResolvedValueOnce('old test content'); @@ -102,7 +102,7 @@ requires-python = "<3.9" ]); expect(execSnapshots).toMatchObject([ { - cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2', + cmd: 'docker pull ghcr.io/containerbase/sidecar', options: { encoding: 'utf-8', }, @@ -121,7 +121,7 @@ requires-python = "<3.9" '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2 ' + + 'ghcr.io/containerbase/sidecar ' + 'bash -l -c "' + 'install-tool python 3.8.1 ' + '&& ' + diff --git a/lib/modules/manager/pep621/processors/pdm.spec.ts b/lib/modules/manager/pep621/processors/pdm.spec.ts index d3032d7fb20a6d..54d028b26b72f9 100644 --- a/lib/modules/manager/pep621/processors/pdm.spec.ts +++ b/lib/modules/manager/pep621/processors/pdm.spec.ts @@ -44,7 +44,7 @@ describe('modules/manager/pep621/processors/pdm', () => { GlobalConfig.set({ ...adminConfig, binarySource: 'docker', - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }); fs.getSiblingFileName.mockReturnValueOnce('pdm.lock'); fs.readLocalFile.mockResolvedValueOnce('test content'); @@ -71,7 +71,7 @@ describe('modules/manager/pep621/processors/pdm', () => { expect(result).toBeNull(); expect(execSnapshots).toMatchObject([ { - cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2', + cmd: 'docker pull ghcr.io/containerbase/sidecar', }, { cmd: 'docker ps --filter name=renovate_sidecar -aq', @@ -84,7 +84,7 @@ describe('modules/manager/pep621/processors/pdm', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2 ' + + 'ghcr.io/containerbase/sidecar ' + 'bash -l -c "' + 'install-tool python 3.11.2 ' + '&& ' + diff --git a/lib/modules/manager/pip-compile/artifacts.spec.ts b/lib/modules/manager/pip-compile/artifacts.spec.ts index 4712e2840f284f..c9f31b0e8bbbfb 100644 --- a/lib/modules/manager/pip-compile/artifacts.spec.ts +++ b/lib/modules/manager/pip-compile/artifacts.spec.ts @@ -26,7 +26,7 @@ const adminConfig: RepoGlobalConfig = { const dockerAdminConfig = { ...adminConfig, binarySource: 'docker', - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }; process.env.BUILDPACK = 'true'; @@ -118,7 +118,7 @@ describe('modules/manager/pip-compile/artifacts', () => { ).not.toBeNull(); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -129,7 +129,7 @@ describe('modules/manager/pip-compile/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2 ' + + 'ghcr.io/containerbase/sidecar ' + 'bash -l -c "' + 'install-tool python 3.10.2 ' + '&& ' + @@ -235,7 +235,7 @@ describe('modules/manager/pip-compile/artifacts', () => { ).not.toBeNull(); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -246,7 +246,7 @@ describe('modules/manager/pip-compile/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2 ' + + 'ghcr.io/containerbase/sidecar ' + 'bash -l -c "' + 'install-tool python 3.10.2 ' + '&& ' + diff --git a/lib/modules/manager/pip_requirements/artifacts.spec.ts b/lib/modules/manager/pip_requirements/artifacts.spec.ts index 203fc62fc2246f..8d1ebb0ed7a643 100644 --- a/lib/modules/manager/pip_requirements/artifacts.spec.ts +++ b/lib/modules/manager/pip_requirements/artifacts.spec.ts @@ -187,7 +187,7 @@ describe('modules/manager/pip_requirements/artifacts', () => { GlobalConfig.set({ ...adminConfig, binarySource: 'docker', - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }); fs.readLocalFile.mockResolvedValueOnce('new content'); fs.ensureCacheDir.mockResolvedValueOnce('/tmp/cache'); @@ -211,7 +211,7 @@ describe('modules/manager/pip_requirements/artifacts', () => { ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -222,7 +222,7 @@ describe('modules/manager/pip_requirements/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2 ' + + 'ghcr.io/containerbase/sidecar ' + 'bash -l -c "' + 'install-tool python 3.10.2 ' + '&& ' + diff --git a/lib/modules/manager/pipenv/__snapshots__/artifacts.spec.ts.snap b/lib/modules/manager/pipenv/__snapshots__/artifacts.spec.ts.snap index 2f3a36d6a2ba91..98aad0bb631a0a 100644 --- a/lib/modules/manager/pipenv/__snapshots__/artifacts.spec.ts.snap +++ b/lib/modules/manager/pipenv/__snapshots__/artifacts.spec.ts.snap @@ -99,7 +99,7 @@ exports[`modules/manager/pipenv/artifacts returns updated Pipfile.lock 1`] = ` exports[`modules/manager/pipenv/artifacts supports docker mode 1`] = ` [ { - "cmd": "docker pull ghcr.io/containerbase/sidecar:8.0.2", + "cmd": "docker pull ghcr.io/containerbase/sidecar", "options": { "encoding": "utf-8", }, @@ -111,7 +111,7 @@ exports[`modules/manager/pipenv/artifacts supports docker mode 1`] = ` }, }, { - "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e PIPENV_CACHE_DIR -e PIP_CACHE_DIR -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar:8.0.2 bash -l -c "install-tool python 3.7.6 && pip install --user pipenv && pipenv lock"", + "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e PIPENV_CACHE_DIR -e PIP_CACHE_DIR -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar bash -l -c "install-tool python 3.7.6 && pip install --user pipenv && pipenv lock"", "options": { "cwd": "/tmp/github/some/repo", "encoding": "utf-8", @@ -138,7 +138,7 @@ exports[`modules/manager/pipenv/artifacts supports docker mode 1`] = ` exports[`modules/manager/pipenv/artifacts uses pipenv version from Pipfile 1`] = ` [ { - "cmd": "docker pull ghcr.io/containerbase/sidecar:8.0.2", + "cmd": "docker pull ghcr.io/containerbase/sidecar", "options": { "encoding": "utf-8", }, @@ -150,7 +150,7 @@ exports[`modules/manager/pipenv/artifacts uses pipenv version from Pipfile 1`] = }, }, { - "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e PIPENV_CACHE_DIR -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar:8.0.2 bash -l -c "install-tool python 3.10.2 && pip install --user pipenv==2020.8.13 && pipenv lock"", + "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e PIPENV_CACHE_DIR -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar bash -l -c "install-tool python 3.10.2 && pip install --user pipenv==2020.8.13 && pipenv lock"", "options": { "cwd": "/tmp/github/some/repo", "encoding": "utf-8", @@ -176,7 +176,7 @@ exports[`modules/manager/pipenv/artifacts uses pipenv version from Pipfile 1`] = exports[`modules/manager/pipenv/artifacts uses pipenv version from Pipfile dev packages 1`] = ` [ { - "cmd": "docker pull ghcr.io/containerbase/sidecar:8.0.2", + "cmd": "docker pull ghcr.io/containerbase/sidecar", "options": { "encoding": "utf-8", }, @@ -188,7 +188,7 @@ exports[`modules/manager/pipenv/artifacts uses pipenv version from Pipfile dev p }, }, { - "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e PIPENV_CACHE_DIR -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar:8.0.2 bash -l -c "install-tool python 3.10.2 && pip install --user pipenv==2020.8.13 && pipenv lock"", + "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e PIPENV_CACHE_DIR -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar bash -l -c "install-tool python 3.10.2 && pip install --user pipenv==2020.8.13 && pipenv lock"", "options": { "cwd": "/tmp/github/some/repo", "encoding": "utf-8", @@ -214,7 +214,7 @@ exports[`modules/manager/pipenv/artifacts uses pipenv version from Pipfile dev p exports[`modules/manager/pipenv/artifacts uses pipenv version from config 1`] = ` [ { - "cmd": "docker pull ghcr.io/containerbase/sidecar:8.0.2", + "cmd": "docker pull ghcr.io/containerbase/sidecar", "options": { "encoding": "utf-8", }, @@ -226,7 +226,7 @@ exports[`modules/manager/pipenv/artifacts uses pipenv version from config 1`] = }, }, { - "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e PIPENV_CACHE_DIR -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar:8.0.2 bash -l -c "install-tool python 3.10.2 && pip install --user pipenv==2020.1.1 && pipenv lock"", + "cmd": "docker run --rm --name=renovate_sidecar --label=renovate_child -v "/tmp/github/some/repo":"/tmp/github/some/repo" -v "/tmp/renovate/cache":"/tmp/renovate/cache" -e PIPENV_CACHE_DIR -e BUILDPACK_CACHE_DIR -e CONTAINERBASE_CACHE_DIR -w "/tmp/github/some/repo" ghcr.io/containerbase/sidecar bash -l -c "install-tool python 3.10.2 && pip install --user pipenv==2020.1.1 && pipenv lock"", "options": { "cwd": "/tmp/github/some/repo", "encoding": "utf-8", diff --git a/lib/modules/manager/pipenv/artifacts.spec.ts b/lib/modules/manager/pipenv/artifacts.spec.ts index 91d43d3fea78d5..0c051946a02247 100644 --- a/lib/modules/manager/pipenv/artifacts.spec.ts +++ b/lib/modules/manager/pipenv/artifacts.spec.ts @@ -29,7 +29,7 @@ const adminConfig: RepoGlobalConfig = { const dockerAdminConfig = { ...adminConfig, binarySource: 'docker', - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }; const config: UpdateArtifactsConfig = {}; diff --git a/lib/modules/manager/poetry/artifacts.spec.ts b/lib/modules/manager/poetry/artifacts.spec.ts index 6d10d04543220d..d09a0908d7a552 100644 --- a/lib/modules/manager/poetry/artifacts.spec.ts +++ b/lib/modules/manager/poetry/artifacts.spec.ts @@ -253,7 +253,7 @@ describe('modules/manager/poetry/artifacts', () => { GlobalConfig.set({ ...adminConfig, binarySource: 'docker', - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }); const execSnapshots = mockExecAll(); fs.ensureCacheDir.mockResolvedValueOnce('/tmp/renovate/cache/others/pip'); @@ -292,7 +292,7 @@ describe('modules/manager/poetry/artifacts', () => { }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -303,7 +303,7 @@ describe('modules/manager/poetry/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2 ' + + 'ghcr.io/containerbase/sidecar ' + 'bash -l -c "' + 'install-tool python 3.4.2 ' + '&& ' + @@ -319,7 +319,7 @@ describe('modules/manager/poetry/artifacts', () => { GlobalConfig.set({ ...adminConfig, binarySource: 'docker', - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }); const execSnapshots = mockExecAll(); @@ -359,7 +359,7 @@ describe('modules/manager/poetry/artifacts', () => { }, ]); expect(execSnapshots).toMatchObject([ - { cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2' }, + { cmd: 'docker pull ghcr.io/containerbase/sidecar' }, { cmd: 'docker ps --filter name=renovate_sidecar -aq' }, { cmd: @@ -370,7 +370,7 @@ describe('modules/manager/poetry/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2 ' + + 'ghcr.io/containerbase/sidecar ' + 'bash -l -c "' + 'install-tool python 2.7.5 ' + '&& ' + diff --git a/lib/modules/manager/pub/artifacts.spec.ts b/lib/modules/manager/pub/artifacts.spec.ts index 2dd364a20ed9e7..f051bb8665e049 100644 --- a/lib/modules/manager/pub/artifacts.spec.ts +++ b/lib/modules/manager/pub/artifacts.spec.ts @@ -144,7 +144,7 @@ describe('modules/manager/pub/artifacts', () => { GlobalConfig.set({ ...adminConfig, binarySource: 'docker', - dockerSidecarImage: 'ghcr.io/containerbase/sidecar:8.0.2', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }); const execSnapshots = mockExecAll(); fs.getSiblingFileName.mockReturnValueOnce(lockFile); @@ -166,7 +166,7 @@ describe('modules/manager/pub/artifacts', () => { ]); expect(execSnapshots).toMatchObject([ { - cmd: 'docker pull ghcr.io/containerbase/sidecar:8.0.2', + cmd: 'docker pull ghcr.io/containerbase/sidecar', }, { cmd: 'docker ps --filter name=renovate_sidecar -aq', @@ -179,7 +179,7 @@ describe('modules/manager/pub/artifacts', () => { '-e BUILDPACK_CACHE_DIR ' + '-e CONTAINERBASE_CACHE_DIR ' + '-w "/tmp/github/some/repo" ' + - 'ghcr.io/containerbase/sidecar:8.0.2 ' + + 'ghcr.io/containerbase/sidecar ' + 'bash -l -c "' + `install-tool ${params.sdk} 3.3.9` + ' && ' + diff --git a/lib/util/exec/docker/index.spec.ts b/lib/util/exec/docker/index.spec.ts index 3542031c09851a..150f27aa6796c7 100644 --- a/lib/util/exec/docker/index.spec.ts +++ b/lib/util/exec/docker/index.spec.ts @@ -225,11 +225,14 @@ describe('util/exec/docker/index', () => { (vol ? `${vol} ` : '') + `-e FOO -e BAR ` + `-w "/tmp/foobar" ` + - `containerbase/${img} ` + + `ghcr.io/containerbase/sidecar ` + `bash -l -c "foo && bar"`; beforeEach(() => { - GlobalConfig.set({ dockerUser: 'some-user' }); + GlobalConfig.set({ + dockerUser: 'some-user', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', + }); }); it('returns executable command', async () => { @@ -267,6 +270,7 @@ describe('util/exec/docker/index', () => { cacheDir: '/tmp/cache', containerbaseDir: '/tmp/containerbase', dockerUser: 'some-user', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }); const volumes: VolumeOption[] = ['/tmp/foo']; const res = await generateDockerCommand(commands, preCommands, { @@ -287,6 +291,7 @@ describe('util/exec/docker/index', () => { cacheDir: '/tmp/cache', containerbaseDir: '/tmp/cache/containerbase', dockerUser: 'some-user', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', }); const volumes: VolumeOption[] = ['/tmp/foo']; const res = await generateDockerCommand(commands, preCommands, { From 6817842c8535385d0b176aa8ac30e20c656f5eaa Mon Sep 17 00:00:00 2001 From: RahulGautamSingh Date: Wed, 14 Jun 2023 05:06:14 +0545 Subject: [PATCH 12/12] update test --- lib/util/exec/index.spec.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/util/exec/index.spec.ts b/lib/util/exec/index.spec.ts index 319d6f41f886f6..669c3b601c3019 100644 --- a/lib/util/exec/index.spec.ts +++ b/lib/util/exec/index.spec.ts @@ -38,7 +38,11 @@ describe('util/exec/index', () => { const defaultCacheVolume = `-v "${cacheDir}":"${cacheDir}"`; const defaultVolumes = `-v "${cwd}":"${cwd}" ${defaultCacheVolume}`; - const globalConfig: RepoGlobalConfig = { cacheDir, containerbaseDir }; + const globalConfig: RepoGlobalConfig = { + cacheDir, + containerbaseDir, + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', + }; beforeEach(() => { dockerModule.resetPrefetchedImages(); @@ -54,7 +58,7 @@ describe('util/exec/index', () => { }); const image = dockerModule.sideCarImage; - const fullImage = `containerbase/${image}`; + const fullImage = `ghcr.io/containerbase/sidecar`; const name = `renovate_${image}`; const inCmd = 'echo hello'; const outCmd = ['echo hello'];