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:
Rhys Arkins 2018-06-29 09:02:49 +02:00
parent 01ccb03b94
commit 511fef8135
8 changed files with 38 additions and 31 deletions

View file

@ -34,7 +34,7 @@ function extractDependencies(content) {
currentDigest,
depName,
currentTag,
versionScheme: 'semver',
versionScheme: 'docker',
};
if (depName === 'node' || depName.endsWith('/node')) {
dep.commitMessageTopic = 'Node.js';

View file

@ -33,7 +33,7 @@ function extractDependencies(content) {
currentDigest,
depName,
currentTag,
versionScheme: 'semver',
versionScheme: 'docker',
};
if (depName === 'node' || depName.endsWith('/node')) {
dep.commitMessageTopic = 'Node.js';

View file

@ -82,7 +82,7 @@ function extractDependencies(content) {
currentDigest,
depName,
currentTag,
versionScheme: 'semver',
versionScheme: 'docker',
};
if (depName === 'node' || depName.endsWith('/node')) {
dep.commitMessageTopic = 'Node.js';

View file

@ -0,0 +1,5 @@
const semver = require('../semver');
module.exports = {
...semver,
};

View file

@ -1,8 +1,10 @@
const docker = require('./docker');
const semver = require('./semver');
const semverComposer = require('./semver-composer');
const pep440 = require('./pep440');
const schemes = {
docker,
semver,
semverComposer,
pep440,

View file

@ -13,7 +13,7 @@ Array [
"dockerRegistry": undefined,
"fromVersion": "node",
"lineNumber": 12,
"versionScheme": "semver",
"versionScheme": "docker",
},
Object {
"commitMessageTopic": "Node.js",
@ -26,7 +26,7 @@ Array [
"dockerRegistry": undefined,
"fromVersion": "node:4",
"lineNumber": 57,
"versionScheme": "semver",
"versionScheme": "docker",
},
Object {
"commitMessageTopic": "Node.js",
@ -39,7 +39,7 @@ Array [
"dockerRegistry": undefined,
"fromVersion": "node:6",
"lineNumber": 61,
"versionScheme": "semver",
"versionScheme": "docker",
},
Object {
"commitMessageTopic": "Node.js",
@ -52,7 +52,7 @@ Array [
"dockerRegistry": undefined,
"fromVersion": "node:8.9.0",
"lineNumber": 65,
"versionScheme": "semver",
"versionScheme": "docker",
},
]
`;

View file

@ -11,7 +11,7 @@ Array [
"depName": "something/redis",
"dockerRegistry": "quay.io",
"lineNumber": 4,
"versionScheme": "semver",
"versionScheme": "docker",
},
Object {
"commitMessageTopic": "Node.js",
@ -23,7 +23,7 @@ Array [
"depName": "node",
"dockerRegistry": undefined,
"lineNumber": 18,
"versionScheme": "semver",
"versionScheme": "docker",
},
Object {
"currentDepTag": "postgres:9.4.0",
@ -34,7 +34,7 @@ Array [
"depName": "postgres",
"dockerRegistry": undefined,
"lineNumber": 21,
"versionScheme": "semver",
"versionScheme": "docker",
},
Object {
"currentDepTag": "dockersamples/examplevotingapp_vote:before",
@ -45,7 +45,7 @@ Array [
"depName": "dockersamples/examplevotingapp_vote",
"dockerRegistry": undefined,
"lineNumber": 31,
"versionScheme": "semver",
"versionScheme": "docker",
},
Object {
"currentDepTag": "dockersamples/examplevotingapp_result:before",
@ -56,7 +56,7 @@ Array [
"depName": "dockersamples/examplevotingapp_result",
"dockerRegistry": undefined,
"lineNumber": 46,
"versionScheme": "semver",
"versionScheme": "docker",
},
Object {
"currentDepTag": "dockersamples/examplevotingapp_worker",
@ -67,7 +67,7 @@ Array [
"depName": "dockersamples/examplevotingapp_worker",
"dockerRegistry": undefined,
"lineNumber": 62,
"versionScheme": "semver",
"versionScheme": "docker",
},
Object {
"currentDepTag": "dockersamples/visualizer:stable",
@ -78,7 +78,7 @@ Array [
"depName": "dockersamples/visualizer",
"dockerRegistry": undefined,
"lineNumber": 79,
"versionScheme": "semver",
"versionScheme": "docker",
},
]
`;

View file

@ -15,7 +15,7 @@ Array [
"fromPrefix": "FROM",
"fromSuffix": "AS node",
"language": "docker",
"versionScheme": "semver",
"versionScheme": "docker",
},
Object {
"currentDepTag": "buildkite/puppeteer:1.1.1",
@ -29,7 +29,7 @@ Array [
"fromPrefix": "FROM",
"fromSuffix": "AS puppeteer",
"language": "docker",
"versionScheme": "semver",
"versionScheme": "docker",
},
]
`;
@ -49,7 +49,7 @@ Array [
"fromPrefix": "FROM",
"fromSuffix": "as frontend",
"language": "docker",
"versionScheme": "semver",
"versionScheme": "docker",
},
Object {
"currentDepTag": "python:3.6-slim",
@ -63,7 +63,7 @@ Array [
"fromPrefix": "FROM",
"fromSuffix": "",
"language": "docker",
"versionScheme": "semver",
"versionScheme": "docker",
},
]
`;
@ -83,7 +83,7 @@ Array [
"fromPrefix": "FROM",
"fromSuffix": "",
"language": "docker",
"versionScheme": "semver",
"versionScheme": "docker",
},
]
`;
@ -103,7 +103,7 @@ Array [
"fromPrefix": "FROM",
"fromSuffix": "",
"language": "docker",
"versionScheme": "semver",
"versionScheme": "docker",
},
]
`;
@ -123,7 +123,7 @@ Array [
"fromPrefix": "FROM",
"fromSuffix": "",
"language": "docker",
"versionScheme": "semver",
"versionScheme": "docker",
},
]
`;
@ -143,7 +143,7 @@ Array [
"fromPrefix": "FROM",
"fromSuffix": "",
"language": "docker",
"versionScheme": "semver",
"versionScheme": "docker",
},
]
`;
@ -163,7 +163,7 @@ Array [
"fromPrefix": "FROM",
"fromSuffix": "",
"language": "docker",
"versionScheme": "semver",
"versionScheme": "docker",
},
]
`;
@ -183,7 +183,7 @@ Array [
"fromPrefix": "FROM",
"fromSuffix": "",
"language": "docker",
"versionScheme": "semver",
"versionScheme": "docker",
},
]
`;
@ -203,7 +203,7 @@ Array [
"fromPrefix": "FROM",
"fromSuffix": "as base",
"language": "docker",
"versionScheme": "semver",
"versionScheme": "docker",
},
]
`;
@ -223,7 +223,7 @@ Array [
"fromPrefix": "FROM",
"fromSuffix": "",
"language": "docker",
"versionScheme": "semver",
"versionScheme": "docker",
},
]
`;
@ -243,7 +243,7 @@ Array [
"fromPrefix": "FROM",
"fromSuffix": "",
"language": "docker",
"versionScheme": "semver",
"versionScheme": "docker",
},
]
`;
@ -263,7 +263,7 @@ Array [
"fromPrefix": "FROM",
"fromSuffix": "",
"language": "docker",
"versionScheme": "semver",
"versionScheme": "docker",
},
]
`;
@ -283,7 +283,7 @@ Array [
"fromPrefix": "FROM",
"fromSuffix": "",
"language": "docker",
"versionScheme": "semver",
"versionScheme": "docker",
},
]
`;
@ -303,7 +303,7 @@ Array [
"fromPrefix": "From",
"fromSuffix": "",
"language": "docker",
"versionScheme": "semver",
"versionScheme": "docker",
},
]
`;
@ -323,7 +323,7 @@ Array [
"fromPrefix": "FROM",
"fromSuffix": "as frontend",
"language": "docker",
"versionScheme": "semver",
"versionScheme": "docker",
},
]
`;