diff --git a/lib/modules/manager/buildkite/extract.spec.ts b/lib/modules/manager/buildkite/extract.spec.ts index 812e02390fbbe41f2a6261ce2309b3dc3088e921..04eb38b6e82e7d1a86629c30359e4fbca9916320 100644 --- a/lib/modules/manager/buildkite/extract.spec.ts +++ b/lib/modules/manager/buildkite/extract.spec.ts @@ -174,5 +174,38 @@ describe('modules/manager/buildkite/extract', () => { }; expect(res).toEqual([bitbucketDependency, githubDependency]); }); + + it('extracts plugin tags with quotes', () => { + const fileContent = codeBlock` + steps: + - name: "When single quoted" + command: true + plugins: + - 'test-collector#v1.8.0': + files: junit.xml + format: junit + + - name: "Docker Test %n" + command: test.sh + parallelism: 25 + plugins: + "docker-compose#v1.3.2": + run: app + `; + const res = extractPackageFile(fileContent)?.deps; + const singleQuotesDependency: PackageDependency = { + currentValue: 'v1.8.0', + datasource: 'github-tags', + depName: 'test-collector', + packageName: 'buildkite-plugins/test-collector-buildkite-plugin', + }; + const doubleQuotesDependency: PackageDependency = { + currentValue: 'v1.3.2', + datasource: 'github-tags', + depName: 'docker-compose', + packageName: 'buildkite-plugins/docker-compose-buildkite-plugin', + }; + expect(res).toEqual([singleQuotesDependency, doubleQuotesDependency]); + }); }); }); diff --git a/lib/modules/manager/buildkite/extract.ts b/lib/modules/manager/buildkite/extract.ts index a70e90611157983c31112cc2cb2fd8cfb6ed8e86..92717481245ac6649a10c885566ec67f0f82f415 100644 --- a/lib/modules/manager/buildkite/extract.ts +++ b/lib/modules/manager/buildkite/extract.ts @@ -17,7 +17,7 @@ export function extractPackageFile( for (const line of lines) { // Search each line for plugin names const depLineMatch = regEx( - /^\s*(?:-\s+(?:\?\s+)?)?(?<depName>[^#\s]+)#(?<currentValue>[^:]+)/, + /^\s*(?:-\s+(?:\?\s+)?)?['"]?(?<depName>[^#\s'"]+)#(?<currentValue>[^:'"]+)['"]?/, ).exec(line); if (depLineMatch?.groups) {