From 264ff284e78724dda8d07b7c8421c998d56adbfc Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Thu, 11 Feb 2021 17:49:38 +0100
Subject: [PATCH] fix(circleci): ignore machine images

Closes #8656
---
 .../circleci/__snapshots__/extract.spec.ts.snap        | 10 ----------
 lib/manager/circleci/extract.ts                        |  7 ++++++-
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/lib/manager/circleci/__snapshots__/extract.spec.ts.snap b/lib/manager/circleci/__snapshots__/extract.spec.ts.snap
index f5995278cb..00854ad874 100644
--- a/lib/manager/circleci/__snapshots__/extract.spec.ts.snap
+++ b/lib/manager/circleci/__snapshots__/extract.spec.ts.snap
@@ -13,16 +13,6 @@ Array [
     "replaceString": "cimg/node:14.8.0",
     "versioning": "docker",
   },
-  Object {
-    "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
-    "currentDigest": undefined,
-    "currentValue": "201903-01",
-    "datasource": "docker",
-    "depName": "ubuntu-1604",
-    "depType": "docker",
-    "replaceString": "ubuntu-1604:201903-01",
-    "versioning": "docker",
-  },
 ]
 `;
 
diff --git a/lib/manager/circleci/extract.ts b/lib/manager/circleci/extract.ts
index c94acb7426..6741d4349d 100644
--- a/lib/manager/circleci/extract.ts
+++ b/lib/manager/circleci/extract.ts
@@ -53,7 +53,12 @@ export function extractPackageFile(content: string): PackageFile | null {
         );
         dep.depType = 'docker';
         dep.versioning = 'docker';
-        deps.push(dep);
+        if (
+          !dep.depName?.startsWith('ubuntu-') &&
+          !dep.depName?.startsWith('windows-server-')
+        ) {
+          deps.push(dep);
+        }
       }
     }
   } catch (err) /* istanbul ignore next */ {
-- 
GitLab