diff --git a/lib/manager/circleci/extract.js b/lib/manager/circleci/extract.js index 0d3b875837..151784b4ae 100644 --- a/lib/manager/circleci/extract.js +++ b/lib/manager/circleci/extract.js @@ -9,7 +9,7 @@ function extractDependencies(content) { const deps = []; let lineNumber = 0; for (const line of content.split('\n')) { - const match = line.match(/^\s*- image:\s*([^\s]+)\s*$/); + const match = line.match(/^\s*- image:\s*'?"?([^\s'"]+)'?"?\s*$/); if (match) { const currentFrom = match[1]; const { diff --git a/lib/manager/circleci/update.js b/lib/manager/circleci/update.js index ac3c949fa1..99b5a093d3 100644 --- a/lib/manager/circleci/update.js +++ b/lib/manager/circleci/update.js @@ -7,7 +7,7 @@ function setNewValue(currentFileContent, upgrade) { logger.debug(`circleci.setNewValue: ${upgrade.newFrom}`); const lines = currentFileContent.split('\n'); const lineToChange = lines[upgrade.lineNumber]; - const imageLine = new RegExp(/^(\s*- image:\s*)[^\s]+(\s*)$/); + const imageLine = new RegExp(/^(\s*- image:\s*'?"?)[^\s'"]+('?"?\s*)$/); if (!lineToChange.match(imageLine)) { logger.debug('No image line found'); return null; diff --git a/test/_fixtures/circleci/config.yml b/test/_fixtures/circleci/config.yml index c9856e8474..68f5e031c7 100644 --- a/test/_fixtures/circleci/config.yml +++ b/test/_fixtures/circleci/config.yml @@ -55,7 +55,7 @@ jobs: node-v4: <<: *node-base docker: - - image: node:4 + - image: 'node:4' node-v6: <<: *node-base docker: @@ -63,4 +63,4 @@ jobs: node-v8: <<: *node-base docker: - - image: node:8.9.0 + - image: "node:8.9.0"