mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 06:56:24 +00:00
refactor: use docker versioning
Initially docker versioning is just a node semver wrapper, but it will later be expanded with custom support for docker-specific version tags.
This commit is contained in:
parent
01ccb03b94
commit
511fef8135
8 changed files with 38 additions and 31 deletions
|
@ -34,7 +34,7 @@ function extractDependencies(content) {
|
||||||
currentDigest,
|
currentDigest,
|
||||||
depName,
|
depName,
|
||||||
currentTag,
|
currentTag,
|
||||||
versionScheme: 'semver',
|
versionScheme: 'docker',
|
||||||
};
|
};
|
||||||
if (depName === 'node' || depName.endsWith('/node')) {
|
if (depName === 'node' || depName.endsWith('/node')) {
|
||||||
dep.commitMessageTopic = 'Node.js';
|
dep.commitMessageTopic = 'Node.js';
|
||||||
|
|
|
@ -33,7 +33,7 @@ function extractDependencies(content) {
|
||||||
currentDigest,
|
currentDigest,
|
||||||
depName,
|
depName,
|
||||||
currentTag,
|
currentTag,
|
||||||
versionScheme: 'semver',
|
versionScheme: 'docker',
|
||||||
};
|
};
|
||||||
if (depName === 'node' || depName.endsWith('/node')) {
|
if (depName === 'node' || depName.endsWith('/node')) {
|
||||||
dep.commitMessageTopic = 'Node.js';
|
dep.commitMessageTopic = 'Node.js';
|
||||||
|
|
|
@ -82,7 +82,7 @@ function extractDependencies(content) {
|
||||||
currentDigest,
|
currentDigest,
|
||||||
depName,
|
depName,
|
||||||
currentTag,
|
currentTag,
|
||||||
versionScheme: 'semver',
|
versionScheme: 'docker',
|
||||||
};
|
};
|
||||||
if (depName === 'node' || depName.endsWith('/node')) {
|
if (depName === 'node' || depName.endsWith('/node')) {
|
||||||
dep.commitMessageTopic = 'Node.js';
|
dep.commitMessageTopic = 'Node.js';
|
||||||
|
|
5
lib/versioning/docker/index.js
Normal file
5
lib/versioning/docker/index.js
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
const semver = require('../semver');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
...semver,
|
||||||
|
};
|
|
@ -1,8 +1,10 @@
|
||||||
|
const docker = require('./docker');
|
||||||
const semver = require('./semver');
|
const semver = require('./semver');
|
||||||
const semverComposer = require('./semver-composer');
|
const semverComposer = require('./semver-composer');
|
||||||
const pep440 = require('./pep440');
|
const pep440 = require('./pep440');
|
||||||
|
|
||||||
const schemes = {
|
const schemes = {
|
||||||
|
docker,
|
||||||
semver,
|
semver,
|
||||||
semverComposer,
|
semverComposer,
|
||||||
pep440,
|
pep440,
|
||||||
|
|
|
@ -13,7 +13,7 @@ Array [
|
||||||
"dockerRegistry": undefined,
|
"dockerRegistry": undefined,
|
||||||
"fromVersion": "node",
|
"fromVersion": "node",
|
||||||
"lineNumber": 12,
|
"lineNumber": 12,
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"commitMessageTopic": "Node.js",
|
"commitMessageTopic": "Node.js",
|
||||||
|
@ -26,7 +26,7 @@ Array [
|
||||||
"dockerRegistry": undefined,
|
"dockerRegistry": undefined,
|
||||||
"fromVersion": "node:4",
|
"fromVersion": "node:4",
|
||||||
"lineNumber": 57,
|
"lineNumber": 57,
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"commitMessageTopic": "Node.js",
|
"commitMessageTopic": "Node.js",
|
||||||
|
@ -39,7 +39,7 @@ Array [
|
||||||
"dockerRegistry": undefined,
|
"dockerRegistry": undefined,
|
||||||
"fromVersion": "node:6",
|
"fromVersion": "node:6",
|
||||||
"lineNumber": 61,
|
"lineNumber": 61,
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"commitMessageTopic": "Node.js",
|
"commitMessageTopic": "Node.js",
|
||||||
|
@ -52,7 +52,7 @@ Array [
|
||||||
"dockerRegistry": undefined,
|
"dockerRegistry": undefined,
|
||||||
"fromVersion": "node:8.9.0",
|
"fromVersion": "node:8.9.0",
|
||||||
"lineNumber": 65,
|
"lineNumber": 65,
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -11,7 +11,7 @@ Array [
|
||||||
"depName": "something/redis",
|
"depName": "something/redis",
|
||||||
"dockerRegistry": "quay.io",
|
"dockerRegistry": "quay.io",
|
||||||
"lineNumber": 4,
|
"lineNumber": 4,
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"commitMessageTopic": "Node.js",
|
"commitMessageTopic": "Node.js",
|
||||||
|
@ -23,7 +23,7 @@ Array [
|
||||||
"depName": "node",
|
"depName": "node",
|
||||||
"dockerRegistry": undefined,
|
"dockerRegistry": undefined,
|
||||||
"lineNumber": 18,
|
"lineNumber": 18,
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"currentDepTag": "postgres:9.4.0",
|
"currentDepTag": "postgres:9.4.0",
|
||||||
|
@ -34,7 +34,7 @@ Array [
|
||||||
"depName": "postgres",
|
"depName": "postgres",
|
||||||
"dockerRegistry": undefined,
|
"dockerRegistry": undefined,
|
||||||
"lineNumber": 21,
|
"lineNumber": 21,
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"currentDepTag": "dockersamples/examplevotingapp_vote:before",
|
"currentDepTag": "dockersamples/examplevotingapp_vote:before",
|
||||||
|
@ -45,7 +45,7 @@ Array [
|
||||||
"depName": "dockersamples/examplevotingapp_vote",
|
"depName": "dockersamples/examplevotingapp_vote",
|
||||||
"dockerRegistry": undefined,
|
"dockerRegistry": undefined,
|
||||||
"lineNumber": 31,
|
"lineNumber": 31,
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"currentDepTag": "dockersamples/examplevotingapp_result:before",
|
"currentDepTag": "dockersamples/examplevotingapp_result:before",
|
||||||
|
@ -56,7 +56,7 @@ Array [
|
||||||
"depName": "dockersamples/examplevotingapp_result",
|
"depName": "dockersamples/examplevotingapp_result",
|
||||||
"dockerRegistry": undefined,
|
"dockerRegistry": undefined,
|
||||||
"lineNumber": 46,
|
"lineNumber": 46,
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"currentDepTag": "dockersamples/examplevotingapp_worker",
|
"currentDepTag": "dockersamples/examplevotingapp_worker",
|
||||||
|
@ -67,7 +67,7 @@ Array [
|
||||||
"depName": "dockersamples/examplevotingapp_worker",
|
"depName": "dockersamples/examplevotingapp_worker",
|
||||||
"dockerRegistry": undefined,
|
"dockerRegistry": undefined,
|
||||||
"lineNumber": 62,
|
"lineNumber": 62,
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"currentDepTag": "dockersamples/visualizer:stable",
|
"currentDepTag": "dockersamples/visualizer:stable",
|
||||||
|
@ -78,7 +78,7 @@ Array [
|
||||||
"depName": "dockersamples/visualizer",
|
"depName": "dockersamples/visualizer",
|
||||||
"dockerRegistry": undefined,
|
"dockerRegistry": undefined,
|
||||||
"lineNumber": 79,
|
"lineNumber": 79,
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -15,7 +15,7 @@ Array [
|
||||||
"fromPrefix": "FROM",
|
"fromPrefix": "FROM",
|
||||||
"fromSuffix": "AS node",
|
"fromSuffix": "AS node",
|
||||||
"language": "docker",
|
"language": "docker",
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"currentDepTag": "buildkite/puppeteer:1.1.1",
|
"currentDepTag": "buildkite/puppeteer:1.1.1",
|
||||||
|
@ -29,7 +29,7 @@ Array [
|
||||||
"fromPrefix": "FROM",
|
"fromPrefix": "FROM",
|
||||||
"fromSuffix": "AS puppeteer",
|
"fromSuffix": "AS puppeteer",
|
||||||
"language": "docker",
|
"language": "docker",
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
@ -49,7 +49,7 @@ Array [
|
||||||
"fromPrefix": "FROM",
|
"fromPrefix": "FROM",
|
||||||
"fromSuffix": "as frontend",
|
"fromSuffix": "as frontend",
|
||||||
"language": "docker",
|
"language": "docker",
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"currentDepTag": "python:3.6-slim",
|
"currentDepTag": "python:3.6-slim",
|
||||||
|
@ -63,7 +63,7 @@ Array [
|
||||||
"fromPrefix": "FROM",
|
"fromPrefix": "FROM",
|
||||||
"fromSuffix": "",
|
"fromSuffix": "",
|
||||||
"language": "docker",
|
"language": "docker",
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
@ -83,7 +83,7 @@ Array [
|
||||||
"fromPrefix": "FROM",
|
"fromPrefix": "FROM",
|
||||||
"fromSuffix": "",
|
"fromSuffix": "",
|
||||||
"language": "docker",
|
"language": "docker",
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
@ -103,7 +103,7 @@ Array [
|
||||||
"fromPrefix": "FROM",
|
"fromPrefix": "FROM",
|
||||||
"fromSuffix": "",
|
"fromSuffix": "",
|
||||||
"language": "docker",
|
"language": "docker",
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
@ -123,7 +123,7 @@ Array [
|
||||||
"fromPrefix": "FROM",
|
"fromPrefix": "FROM",
|
||||||
"fromSuffix": "",
|
"fromSuffix": "",
|
||||||
"language": "docker",
|
"language": "docker",
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
@ -143,7 +143,7 @@ Array [
|
||||||
"fromPrefix": "FROM",
|
"fromPrefix": "FROM",
|
||||||
"fromSuffix": "",
|
"fromSuffix": "",
|
||||||
"language": "docker",
|
"language": "docker",
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
@ -163,7 +163,7 @@ Array [
|
||||||
"fromPrefix": "FROM",
|
"fromPrefix": "FROM",
|
||||||
"fromSuffix": "",
|
"fromSuffix": "",
|
||||||
"language": "docker",
|
"language": "docker",
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
@ -183,7 +183,7 @@ Array [
|
||||||
"fromPrefix": "FROM",
|
"fromPrefix": "FROM",
|
||||||
"fromSuffix": "",
|
"fromSuffix": "",
|
||||||
"language": "docker",
|
"language": "docker",
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
@ -203,7 +203,7 @@ Array [
|
||||||
"fromPrefix": "FROM",
|
"fromPrefix": "FROM",
|
||||||
"fromSuffix": "as base",
|
"fromSuffix": "as base",
|
||||||
"language": "docker",
|
"language": "docker",
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
@ -223,7 +223,7 @@ Array [
|
||||||
"fromPrefix": "FROM",
|
"fromPrefix": "FROM",
|
||||||
"fromSuffix": "",
|
"fromSuffix": "",
|
||||||
"language": "docker",
|
"language": "docker",
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
@ -243,7 +243,7 @@ Array [
|
||||||
"fromPrefix": "FROM",
|
"fromPrefix": "FROM",
|
||||||
"fromSuffix": "",
|
"fromSuffix": "",
|
||||||
"language": "docker",
|
"language": "docker",
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
@ -263,7 +263,7 @@ Array [
|
||||||
"fromPrefix": "FROM",
|
"fromPrefix": "FROM",
|
||||||
"fromSuffix": "",
|
"fromSuffix": "",
|
||||||
"language": "docker",
|
"language": "docker",
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
@ -283,7 +283,7 @@ Array [
|
||||||
"fromPrefix": "FROM",
|
"fromPrefix": "FROM",
|
||||||
"fromSuffix": "",
|
"fromSuffix": "",
|
||||||
"language": "docker",
|
"language": "docker",
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
@ -303,7 +303,7 @@ Array [
|
||||||
"fromPrefix": "From",
|
"fromPrefix": "From",
|
||||||
"fromSuffix": "",
|
"fromSuffix": "",
|
||||||
"language": "docker",
|
"language": "docker",
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
@ -323,7 +323,7 @@ Array [
|
||||||
"fromPrefix": "FROM",
|
"fromPrefix": "FROM",
|
||||||
"fromSuffix": "as frontend",
|
"fromSuffix": "as frontend",
|
||||||
"language": "docker",
|
"language": "docker",
|
||||||
"versionScheme": "semver",
|
"versionScheme": "docker",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
|
Loading…
Reference in a new issue