feat: add releases 2.4.4-p6, 2.4.5-p5 and 2.4.6-p3 (#169)

This commit is contained in:
Vinai Kopp
2023-10-11 06:25:00 +13:00
committed by GitHub
parent 68cbb2e752
commit 2086708ffc
8 changed files with 105 additions and 31 deletions
+4 -4
View File
File diff suppressed because one or more lines are too long
@@ -14,20 +14,6 @@ describe('getCurrentlySupportedVersions for magento-open-source', () => {
'magento/project-community-edition:2.4.4-p2', 'magento/project-community-edition:2.4.4-p2',
'magento/project-community-edition:2.4.5-p1', 'magento/project-community-edition:2.4.5-p1',
]], ]],
['2024-01-01T00:00:00Z', 'First day of 2024', [
'magento/project-community-edition:2.4.4-p5',
'magento/project-community-edition:2.4.5-p4',
'magento/project-community-edition:2.4.6-p2',
]],
['2024-12-31T00:00:00Z', 'End of 2024', [
'magento/project-community-edition:2.4.4-p5',
'magento/project-community-edition:2.4.5-p4',
'magento/project-community-edition:2.4.6-p2',
]],
['2025-08-08T00:00:00Z', 'Day Before v2.4.5 EoL', [
'magento/project-community-edition:2.4.5-p4',
'magento/project-community-edition:2.4.6-p2',
]],
['2023-03-14T00:00:00Z', 'Day of v2.4.6 Release', [ ['2023-03-14T00:00:00Z', 'Day of v2.4.6 Release', [
'magento/project-community-edition:2.4.4-p2', 'magento/project-community-edition:2.4.4-p2',
'magento/project-community-edition:2.4.5-p1' 'magento/project-community-edition:2.4.5-p1'
@@ -37,12 +23,36 @@ describe('getCurrentlySupportedVersions for magento-open-source', () => {
'magento/project-community-edition:2.4.5-p2', 'magento/project-community-edition:2.4.5-p2',
'magento/project-community-edition:2.4.6' 'magento/project-community-edition:2.4.6'
]], ]],
['2025-08-09T00:00:00Z', 'Day of v2.4.5 EoL', [ ['2023-10-09T00:00:00Z', 'Day before v2.4.6-p3 Release', [
'magento/project-community-edition:2.4.4-p5',
'magento/project-community-edition:2.4.5-p4', 'magento/project-community-edition:2.4.5-p4',
'magento/project-community-edition:2.4.6-p2', 'magento/project-community-edition:2.4.6-p2'
]],
['2023-10-11T00:00:00Z', 'Day od v2.4.6-p3 Release', [
'magento/project-community-edition:2.4.4-p6',
'magento/project-community-edition:2.4.5-p5',
'magento/project-community-edition:2.4.6-p3'
]],
['2024-01-01T00:00:00Z', 'First day of 2024', [
'magento/project-community-edition:2.4.4-p6',
'magento/project-community-edition:2.4.5-p5',
'magento/project-community-edition:2.4.6-p3',
]],
['2024-12-31T00:00:00Z', 'End of 2024', [
'magento/project-community-edition:2.4.4-p6',
'magento/project-community-edition:2.4.5-p5',
'magento/project-community-edition:2.4.6-p3',
]],
['2025-08-08T00:00:00Z', 'Day Before v2.4.5 EoL', [
'magento/project-community-edition:2.4.5-p5',
'magento/project-community-edition:2.4.6-p3',
]],
['2025-08-09T00:00:00Z', 'Day of v2.4.5 EoL', [
'magento/project-community-edition:2.4.5-p5',
'magento/project-community-edition:2.4.6-p3',
]], ]],
['2025-08-10T00:00:00Z', 'Day after v2.4.5 EoL', [ ['2025-08-10T00:00:00Z', 'Day after v2.4.5 EoL', [
'magento/project-community-edition:2.4.6-p2', 'magento/project-community-edition:2.4.6-p3',
]], ]],
['2026-03-15T00:00:00Z', 'Day after v2.4.6 EoL', [ ['2026-03-15T00:00:00Z', 'Day after v2.4.6 EoL', [
]], ]],
@@ -67,9 +77,12 @@ describe('getCurrentlySupportedVersions for mage-os', () => {
test.each([ test.each([
['2023-01-01T00:00:00Z', 'First day of 2023', [ ['2023-01-01T00:00:00Z', 'First day of 2023', [
]], ]],
['2024-01-01T00:00:00Z', 'First day of 2024', [ ['2023-10-10T15:00:00Z', 'Release of 1.0.0', [
'mage-os/project-community-edition:1.0.0', 'mage-os/project-community-edition:1.0.0',
]], ]],
['2024-01-01T00:00:00Z', 'First day of 2024', [
'mage-os/project-community-edition:1.0.1',
]],
])( ])(
'supportedVersions for %s', 'supportedVersions for %s',
(date, description ,result) => { (date, description ,result) => {
@@ -5,9 +5,9 @@ export const getCurrentlySupportedVersions = (project: string, date: Date): stri
const allVersions = getIndividualVersionsForProject(project) const allVersions = getIndividualVersionsForProject(project)
return Object.entries(<Record<string,PackageMatrixVersion>>allVersions) return Object.entries(<Record<string,PackageMatrixVersion>>allVersions)
.filter(([key, value]) => { .filter(([key, value]) => {
const dayAfterRelease = new Date(value.release); const dayOfRelease = new Date(value.release);
dayAfterRelease.setDate(dayAfterRelease.getDate() + 1); dayOfRelease.setMinutes(dayOfRelease.getMinutes() + 1);
return date >= dayAfterRelease && new Date(value.eol) >= date; return date >= dayOfRelease && new Date(value.eol) >= date;
}) })
.map(([key, value]) => key); .map(([key, value]) => key);
} }
@@ -12,4 +12,8 @@ describe('validateKind', () => {
it('throws a helpful exception if custom versions are provided with the wrong kind', () => { it('throws a helpful exception if custom versions are provided with the wrong kind', () => {
expect(() => validateKind(<any>"latest", [])).toThrowError(); expect(() => validateKind(<any>"latest", [])).toThrowError();
}) })
it('returns `true` for kind `custom` with a custom versions', () => {
expect(validateKind("custom", "mage-os/project-community-edition:1.0.0".split(","))).toBe(true);
})
}) })
@@ -30,6 +30,7 @@ describe('getMatrixForKind for mage-os', () => {
expect(result.magento).toBeDefined(); expect(result.magento).toBeDefined();
expect(result.include).toBeDefined(); expect(result.include).toBeDefined();
expect(result.magento[0]).toBe('mage-os/project-community-edition:1.0.0');
}); });
it('returns a matrix nightly`', () => { it('returns a matrix nightly`', () => {
@@ -10,8 +10,8 @@
"varnish": "varnish:7.3", "varnish": "varnish:7.3",
"nginx": "nginx:1.22", "nginx": "nginx:1.22",
"os": "ubuntu-latest", "os": "ubuntu-latest",
"release": "2023-09-15T00:00:00+0000", "release": "2023-10-10T00:00:00+0000",
"eol": "2026-09-15T00:00:00+0000" "eol": "2026-10-10T00:00:00+0000"
}, },
"mage-os/project-community-edition:next": { "mage-os/project-community-edition:next": {
"magento": "mage-os/project-community-edition:next", "magento": "mage-os/project-community-edition:next",
@@ -24,7 +24,7 @@
"varnish": "varnish:7.3", "varnish": "varnish:7.3",
"nginx": "nginx:1.22", "nginx": "nginx:1.22",
"os": "ubuntu-latest", "os": "ubuntu-latest",
"release": "2023-09-15T00:00:00+0000", "release": "2023-10-10T00:00:00+0000",
"eol": "2026-09-15T00:00:00+0000" "eol": "2026-10-10T00:00:00+0000"
} }
} }
@@ -10,7 +10,21 @@
"varnish": "varnish:7.3", "varnish": "varnish:7.3",
"nginx": "nginx:1.22", "nginx": "nginx:1.22",
"os": "ubuntu-latest", "os": "ubuntu-latest",
"release": "2023-09-15T00:00:00+0000", "release": "2023-10-10T00:00:00+0000",
"eol": "2026-09-15T00:00:00+0000" "eol": "2023-10-11T00:00:00+0000"
},
"mage-os/project-community-edition:1.0.1": {
"magento": "mage-os/project-community-edition:1.0.1",
"php": 8.1,
"composer": "2.2.21",
"mysql": "mysql:8.0",
"elasticsearch": "elasticsearch:8.5.3",
"rabbitmq": "rabbitmq:3.9-management",
"redis": "redis:7.0",
"varnish": "varnish:7.3",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-10-11T00:00:00+0000",
"eol": "2026-10-11T00:00:00+0000"
} }
} }
@@ -263,6 +263,20 @@
"nginx": "nginx:1.22", "nginx": "nginx:1.22",
"os": "ubuntu-latest", "os": "ubuntu-latest",
"release": "2023-08-08T00:00:00+0000", "release": "2023-08-08T00:00:00+0000",
"eol": "2023-10-10T00:00:00+0000"
},
"magento/project-community-edition:2.4.4-p6": {
"magento": "magento/project-community-edition:2.4.4-p6",
"php": 8.1,
"composer": "2.2.21",
"mysql": "mysql:8.0",
"elasticsearch": "elasticsearch:7.17.5",
"rabbitmq": "rabbitmq:3.9-management",
"redis": "redis:6.2",
"varnish": "varnish:7.3",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-10-10T00:00:00+0000",
"eol": "2025-04-24T00:00:00+0000" "eol": "2025-04-24T00:00:00+0000"
}, },
"magento/project-community-edition:2.4.5": { "magento/project-community-edition:2.4.5": {
@@ -333,6 +347,20 @@
"nginx": "nginx:1.22", "nginx": "nginx:1.22",
"os": "ubuntu-latest", "os": "ubuntu-latest",
"release": "2023-08-08T00:00:00+0000", "release": "2023-08-08T00:00:00+0000",
"eol": "2023-10-10T00:00:00+0000"
},
"magento/project-community-edition:2.4.5-p5": {
"magento": "magento/project-community-edition:2.4.5-p5",
"php": 8.1,
"composer": "2.2.21",
"mysql": "mysql:8.0",
"elasticsearch": "elasticsearch:7.17.5",
"rabbitmq": "rabbitmq:3.11-management",
"redis": "redis:6.2",
"varnish": "varnish:7.1",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-10-10T00:00:00+0000",
"eol": "2025-08-09T00:00:00+0000" "eol": "2025-08-09T00:00:00+0000"
}, },
"magento/project-community-edition:2.4.6": { "magento/project-community-edition:2.4.6": {
@@ -375,6 +403,20 @@
"nginx": "nginx:1.22", "nginx": "nginx:1.22",
"os": "ubuntu-latest", "os": "ubuntu-latest",
"release": "2023-08-08T00:00:00+0000", "release": "2023-08-08T00:00:00+0000",
"eol": "2023-10-10T00:00:00+0000"
},
"magento/project-community-edition:2.4.6-p3": {
"magento": "magento/project-community-edition:2.4.6-p3",
"php": 8.1,
"composer": "2.2.21",
"mysql": "mysql:8.0",
"elasticsearch": "elasticsearch:8.5.3",
"rabbitmq": "rabbitmq:3.9-management",
"redis": "redis:7.0",
"varnish": "varnish:7.3",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-10-10T00:00:00+0000",
"eol": "2026-03-14T00:00:00+0000" "eol": "2026-03-14T00:00:00+0000"
} }
} }