From 72fd4a741c121a95f8fd6ca5602f7790a15c1db9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 4 Oct 2024 12:56:49 +0000 Subject: [PATCH 1/5] chore(deps): update sigstore/cosign-installer action to v3.7.0 (#31791) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 493dcc1e68d936..a168afcb9bfc09 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -693,7 +693,7 @@ jobs: node-version: ${{ needs.setup-build.outputs.node-version }} os: ${{ runner.os }} - - uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0 + - uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0 - name: Docker registry login run: | From 3475ab4e98c93b38acbbe4b5ba1f867d8ee5c113 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 4 Oct 2024 12:57:14 +0000 Subject: [PATCH 2/5] build(deps): update dependency azure-devops-node-api to v14.1.0 (#31790) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 6fcbbb85202c5c..916dbeed053ba4 100644 --- a/package.json +++ b/package.json @@ -171,7 +171,7 @@ "async-mutex": "0.5.0", "auth-header": "1.0.0", "aws4": "1.13.2", - "azure-devops-node-api": "14.0.2", + "azure-devops-node-api": "14.1.0", "bunyan": "1.8.15", "cacache": "18.0.4", "chalk": "4.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d09615e179a767..921b479e616bd0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -108,8 +108,8 @@ importers: specifier: 1.13.2 version: 1.13.2 azure-devops-node-api: - specifier: 14.0.2 - version: 14.0.2 + specifier: 14.1.0 + version: 14.1.0 bunyan: specifier: 1.8.15 version: 1.8.15 @@ -2449,8 +2449,8 @@ packages: aws4@1.13.2: resolution: {integrity: sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==} - azure-devops-node-api@14.0.2: - resolution: {integrity: sha512-TwjAEnWnOSZ2oypkDyqppgvJw43qArEfPiJtEWLL3NBgdvAuOuB0xgFz/Eiz4H6Dk0Yv52wCodZxtZvAMhJXwQ==} + azure-devops-node-api@14.1.0: + resolution: {integrity: sha512-QhpgjH1LQ+vgDJ7oBwcmsZ3+o4ZpjLVilw0D3oJQpYpRzN+L39lk5jZDLJ464hLUgsDzWn/Ksv7zLLMKLfoBzA==} engines: {node: '>= 16.0.0'} babel-jest@29.7.0: @@ -9054,7 +9054,7 @@ snapshots: aws4@1.13.2: {} - azure-devops-node-api@14.0.2: + azure-devops-node-api@14.1.0: dependencies: tunnel: 0.0.6 typed-rest-client: 2.1.0 From 1aba1efd203c7c3c3cf662170794ca2d092a19a7 Mon Sep 17 00:00:00 2001 From: Timo Webler Date: Fri, 4 Oct 2024 15:21:14 +0200 Subject: [PATCH 3/5] test(yaml): add test for YAML tags (#31244) --- .../manager/docker-compose/extract.spec.ts | 27 +++++++++++++++++++ lib/util/yaml.spec.ts | 18 +++++++++++++ 2 files changed, 45 insertions(+) diff --git a/lib/modules/manager/docker-compose/extract.spec.ts b/lib/modules/manager/docker-compose/extract.spec.ts index b9436050d88ae1..a089c8b465a612 100644 --- a/lib/modules/manager/docker-compose/extract.spec.ts +++ b/lib/modules/manager/docker-compose/extract.spec.ts @@ -56,6 +56,33 @@ describe('modules/manager/docker-compose/extract', () => { expect(res?.deps).toHaveLength(1); }); + it('extracts can parse yaml tags for version 3', () => { + const compose = codeBlock` + web: + image: node:20.0.0 + ports: + - "80:8000" + worker: + extends: + service: web + ports: !reset null + `; + const res = extractPackageFile(compose, '', {}); + expect(res).toEqual({ + deps: [ + { + depName: 'node', + currentValue: '20.0.0', + currentDigest: undefined, + replaceString: 'node:20.0.0', + autoReplaceStringTemplate: + '{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}', + datasource: 'docker', + }, + ], + }); + }); + it('extracts image and replaces registry', () => { const compose = codeBlock` version: "3" diff --git a/lib/util/yaml.spec.ts b/lib/util/yaml.spec.ts index de9491f458054a..74f37c3e89f560 100644 --- a/lib/util/yaml.spec.ts +++ b/lib/util/yaml.spec.ts @@ -281,5 +281,23 @@ describe('util/yaml', () => { }, }); }); + + it('should parse content with yaml tags', () => { + expect( + parseSingleYaml( + codeBlock` + myObject: + aString: value + aStringWithTag: !reset null + `, + { removeTemplates: true }, + ), + ).toEqual({ + myObject: { + aString: 'value', + aStringWithTag: 'null', + }, + }); + }); }); }); From 354e6f866c1e25bece64068ad54ee2fa0ccf2d90 Mon Sep 17 00:00:00 2001 From: Timo Webler Date: Fri, 4 Oct 2024 15:50:05 +0200 Subject: [PATCH 4/5] refactor(manager/gitlabci): remove method "replaceReferenceTags" (#31787) --- lib/modules/manager/gitlabci-include/extract.ts | 3 +-- lib/modules/manager/gitlabci/common.spec.ts | 15 +++++++++++---- lib/modules/manager/gitlabci/utils.spec.ts | 11 +---------- lib/modules/manager/gitlabci/utils.ts | 13 ------------- 4 files changed, 13 insertions(+), 29 deletions(-) diff --git a/lib/modules/manager/gitlabci-include/extract.ts b/lib/modules/manager/gitlabci-include/extract.ts index 026f51e80760a9..60eb93772a183a 100644 --- a/lib/modules/manager/gitlabci-include/extract.ts +++ b/lib/modules/manager/gitlabci-include/extract.ts @@ -14,7 +14,6 @@ import type { GitlabIncludeProject, GitlabPipeline, } from '../gitlabci/types'; -import { replaceReferenceTags } from '../gitlabci/utils'; import type { PackageDependency, PackageFileContent } from '../types'; function extractDepFromIncludeFile( @@ -76,7 +75,7 @@ export function extractPackageFile( : null; try { // TODO: use schema (#9610) - const docs = parseYaml(replaceReferenceTags(content), { + const docs = parseYaml(content, { uniqueKeys: false, }); for (const doc of docs) { diff --git a/lib/modules/manager/gitlabci/common.spec.ts b/lib/modules/manager/gitlabci/common.spec.ts index 9c491ef848f968..5f55bcdb4b83ec 100644 --- a/lib/modules/manager/gitlabci/common.spec.ts +++ b/lib/modules/manager/gitlabci/common.spec.ts @@ -1,7 +1,6 @@ import { codeBlock } from 'common-tags'; import { parseSingleYaml } from '../../../util/yaml'; import type { GitlabPipeline } from '../gitlabci/types'; -import { replaceReferenceTags } from '../gitlabci/utils'; import { filterIncludeFromGitlabPipeline, isGitlabIncludeComponent, @@ -12,7 +11,7 @@ import { // TODO: use schema (#9610) const pipeline = parseSingleYaml( - replaceReferenceTags(codeBlock` + codeBlock` include: - project: mikebryant/include-source-example file: /template.yaml @@ -25,7 +24,7 @@ const pipeline = parseSingleYaml( script: - !reference [.setup, script] - - !reference [arbitrary job name with space and no starting dot, nested1, nested2, nested3]`), + - !reference [arbitrary job name with space and no starting dot, nested1, nested2, nested3]`, ); const includeLocal = { local: 'something' }; const includeProject = { project: 'something' }; @@ -37,7 +36,15 @@ describe('modules/manager/gitlabci/common', () => { const filtered_pipeline = filterIncludeFromGitlabPipeline(pipeline); expect(filtered_pipeline).not.toHaveProperty('include'); expect(filtered_pipeline).toEqual({ - script: [null, null], + script: [ + ['.setup', 'script'], + [ + 'arbitrary job name with space and no starting dot', + 'nested1', + 'nested2', + 'nested3', + ], + ], }); }); }); diff --git a/lib/modules/manager/gitlabci/utils.spec.ts b/lib/modules/manager/gitlabci/utils.spec.ts index 3c563ce93cbb93..0b89036dd8f5df 100644 --- a/lib/modules/manager/gitlabci/utils.spec.ts +++ b/lib/modules/manager/gitlabci/utils.spec.ts @@ -1,6 +1,5 @@ -import { Fixtures } from '../../../../test/fixtures'; import type { PackageDependency } from '../types'; -import { getGitlabDep, replaceReferenceTags } from './utils'; +import { getGitlabDep } from './utils'; describe('modules/manager/gitlabci/utils', () => { describe('getGitlabDep', () => { @@ -82,12 +81,4 @@ describe('modules/manager/gitlabci/utils', () => { }); }); }); - - describe('replaceReferenceTags', () => { - it('replaces all !reference tags with empty strings', () => { - const yamlFileReferenceConfig = Fixtures.get('gitlab-ci.reference.yaml'); - const replaced = replaceReferenceTags(yamlFileReferenceConfig); - expect(replaced).not.toContain('!reference'); - }); - }); }); diff --git a/lib/modules/manager/gitlabci/utils.ts b/lib/modules/manager/gitlabci/utils.ts index e69552b2a61f69..1a861897df735d 100644 --- a/lib/modules/manager/gitlabci/utils.ts +++ b/lib/modules/manager/gitlabci/utils.ts @@ -2,19 +2,6 @@ import { regEx } from '../../../util/regex'; import { getDep } from '../dockerfile/extract'; import type { PackageDependency } from '../types'; -const re = /!reference \[[^\]]+\]/g; - -/** - * Replaces GitLab reference tags before parsing, because our yaml parser cannot process them anyway. - * @param content pipeline yaml - * @returns replaced pipeline content - * https://docs.gitlab.com/ee/ci/yaml/#reference-tags - */ -export function replaceReferenceTags(content: string): string { - const res = content.replace(re, ''); - return res; -} - const depProxyRe = regEx( `(?\\$\\{?CI_DEPENDENCY_PROXY_(?:DIRECT_)?GROUP_IMAGE_PREFIX\\}?/)(?.+)`, ); From bb809d33f348adb020819e883bc6dcf2bc2d0576 Mon Sep 17 00:00:00 2001 From: Marc Philipp Date: Fri, 4 Oct 2024 15:50:15 +0200 Subject: [PATCH 5/5] feat(presets): Add jackson-module-kotlin repo to jackson monorepo (#31772) --- lib/data/monorepo.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/data/monorepo.json b/lib/data/monorepo.json index 6a9468a441bac8..1ebc7878cdb444 100644 --- a/lib/data/monorepo.json +++ b/lib/data/monorepo.json @@ -322,7 +322,8 @@ "https://github.com/FasterXML/jackson", "https://github.com/FasterXML/jackson-databind", "https://github.com/FasterXML/jackson-dataformats-binary", - "https://github.com/FasterXML/jackson-dataformats-text" + "https://github.com/FasterXML/jackson-dataformats-text", + "https://github.com/FasterXML/jackson-module-kotlin" ], "jasmine": "https://github.com/jasmine/jasmine", "javahamcrest": "https://github.com/hamcrest/JavaHamcrest",