diff --git a/docs/usage/self-hosted-configuration.md b/docs/usage/self-hosted-configuration.md index 52fff74b4e526b..da534135fb132d 100644 --- a/docs/usage/self-hosted-configuration.md +++ b/docs/usage/self-hosted-configuration.md @@ -326,17 +326,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 +## dockerSidecarImage -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 `ghcr.io/containerbase/sidecar`. +You can use the `dockerSidecarImage` 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/sidecar`. You would put this in your configuration file: ```json { - "dockerImagePrefix": "ghcr.io/containerbase" + "dockerSidecarImage": "ghcr.io/your_company/sidecar" } ``` diff --git a/lib/config/global.ts b/lib/config/global.ts index c1b4e92455f634..0249e60f32be98 100644 --- a/lib/config/global.ts +++ b/lib/config/global.ts @@ -14,7 +14,7 @@ export class GlobalConfig { 'containerbaseDir', 'customEnvVariables', 'dockerChildPrefix', - 'dockerImagePrefix', + 'dockerSidecarImage', 'dockerUser', 'dryRun', 'exposeAllEnv', diff --git a/lib/config/options/index.ts b/lib/config/options/index.ts index 4eddf0660922c3..82bae582950210 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: 'dockerSidecarImage', 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: 'ghcr.io/containerbase/sidecar:8.0.2', globalOnly: true, }, { diff --git a/lib/config/types.ts b/lib/config/types.ts index b822ec436f7727..ad00ee60404919 100644 --- a/lib/config/types.ts +++ b/lib/config/types.ts @@ -125,7 +125,7 @@ export interface RepoGlobalConfig { cacheHardTtlMinutes?: number; customEnvVariables?: Record; dockerChildPrefix?: string; - dockerImagePrefix?: string; + dockerSidecarImage?: string; dockerUser?: string; dryRun?: DryRunConfig; executionTimeout?: number; diff --git a/lib/modules/manager/bundler/artifacts.spec.ts b/lib/modules/manager/bundler/artifacts.spec.ts index 841f8ecc899d2d..d131b7d5d3ec82 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', }; 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' }, { 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' + ' 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' }, { 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' + ' 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' }, { 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' + ' 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' }, { 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' + ' 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' }, { 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' + ' 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' }, { 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' + ' 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' }, { 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' + ' 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..99b32f0f359135 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', }; 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' }, {}, { 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 ' + '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..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 containerbase/sidecar", + "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" 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 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", "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 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..6abfc45974d42e 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', }; 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' }, { 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' + ' 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..089389a9b57e54 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', }; 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', 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' + ' 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..434e850d1aa8b5 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', }; 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' }, { 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' + ' 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' }, { 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' + ' 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' }, {}, { 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' }, {}, { 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' + ' 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' }, {}, { 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' + ' 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' }, {}, { 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' + ' 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' }, {}, { 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' + ' 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', }, {}, { @@ -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' + ' 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', }, {}, { @@ -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' + ' 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..181362e4fd3b43 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', + }); 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' }, { 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' + ' 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..7c0f1be7555f9c 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', }; 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' }, { 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' + ' 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' + ' 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..519f35784415f7 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', }; 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' }, { 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 ' + '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..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 containerbase/sidecar", + "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" 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 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", "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 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..ff8e5b3ee94153 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', + }); 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', + }); 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..359919d3a1eae8 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', + }); 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', 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' + ' 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..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" 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 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", "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 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..63a5576810aec4 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', + }); 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', + }); 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', + }); 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..0877831a679387 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', +}; 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' }, { 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 ' + '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' }, { 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 ' + '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..b783df05c30882 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', + }); 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', }, { 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 ' + '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..ff0f453b6635bb 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', }); 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' }, { 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 ' + '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..e3a9fe79ebec23 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', }); 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' }, { 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 ' + '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..997bd070438447 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', }); 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', 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 ` + `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..d950b750df16d9 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', + }); 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', }, { 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 ' + '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..717a03899c64ea 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', + }); 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', 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 ' + '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..54d028b26b72f9 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', + }); 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', }, { 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 ' + '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..c9f31b0e8bbbfb 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', +}; 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' }, { 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 ' + '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' }, { 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 ' + '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..8d1ebb0ed7a643 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', + }); 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' }, { 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 ' + '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..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 containerbase/sidecar", + "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" 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 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", "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 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", "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 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", "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 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..0c051946a02247 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', +}; 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..d09a0908d7a552 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', + }); 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' }, { 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 ' + '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', + }); 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' }, { 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 ' + '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..f051bb8665e049 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', + }); 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', }, { 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 ' + '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, { diff --git a/lib/util/exec/docker/index.ts b/lib/util/exec/docker/index.ts index 9d192db5908359..b0552e18f47225 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'; @@ -222,7 +221,7 @@ export async function generateDockerCommand( containerbaseDir, dockerUser, dockerChildPrefix, - dockerImagePrefix, + dockerSidecarImage, } = GlobalConfig.get(); const result = ['docker run --rm']; const containerName = getContainerName(image, dockerChildPrefix); @@ -259,9 +258,8 @@ export async function generateDockerCommand( result.push(`-w "${cwd}"`); } - image = `${ensureTrailingSlash( - dockerImagePrefix ?? 'containerbase' - )}${image}`; + // TODO: #7154 + image = dockerSidecarImage!; // TODO: add constraint: const tag = getDockerTag(image, sideCarImageVersion, 'semver'); logger.debug( diff --git a/lib/util/exec/index.spec.ts b/lib/util/exec/index.spec.ts index 19f18c32268b14..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']; @@ -413,7 +417,7 @@ describe('util/exec/index', () => { }, ], adminConfig: { - dockerImagePrefix: 'ghcr.io/containerbase', + dockerSidecarImage: 'ghcr.io/containerbase/sidecar', binarySource: 'docker', }, }, diff --git a/renovate.json b/renovate.json index 86850e28adc841..4824b2dfe9c9bf 100644 --- a/renovate.json +++ b/renovate.json @@ -29,5 +29,14 @@ "matchPaths": ["**/__fixtures__/**"], "enabled": false } + ], + "regexManagers": [ + { + "fileMatch": ["config/options/index.ts"], + "matchStrings": [ + "default: '(?ghcr.io/containerbase/sidecar):(?.*)'" + ], + "datasourceTemplate": "docker" + } ] }