Skip to content

Commit 9cb7754

Browse files
authored
Merge pull request #709 from infosiftr/dockerDoesntNeedVersion
Update 8.0-rc to Noble and remove `dockerNeedsVersion` logic completely
2 parents 4fee68c + f9fd3b1 commit 9cb7754

File tree

4 files changed

+15
-38
lines changed

4 files changed

+15
-38
lines changed

8.0-rc/Dockerfile

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile-linux.template

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,8 @@ ENV MONGO_PACKAGE=${MONGO_PACKAGE} MONGO_REPO=${MONGO_REPO}
8181
ENV MONGO_MAJOR {{ if env.version != env.rcVersion then "testing" else env.version end }}
8282
RUN echo "deb [ signed-by=/etc/apt/keyrings/mongodb.asc ] http://$MONGO_REPO/apt/{{ target.image | gsub(":.*$"; "") }} {{ target.suite }}/${MONGO_PACKAGE%-unstable}/$MONGO_MAJOR {{ if target.image | test("^debian") then "main" else "multiverse" end }}" | tee "/etc/apt/sources.list.d/${MONGO_PACKAGE%-unstable}.list"
8383
{{ if env.version != env.rcVersion then ( -}}
84-
{{ if .dockerNeedsVersion then ( -}}
85-
# {{ env.rcVersion }} is not GA, so we need the previous release for mongodb-mongosh and mongodb-database-tools
86-
RUN echo "deb [ signed-by=/etc/apt/keyrings/mongodb.asc ] http://$MONGO_REPO/apt/{{ target.image | gsub(":.*$"; "") }} {{ target.suite }}/${MONGO_PACKAGE%-unstable}/{{ .dockerNeedsVersion }} {{ if target.image | test("^debian") then "main" else "multiverse" end }}" | tee "/etc/apt/sources.list.d/mongodb-previous.list"
87-
{{ ) else ( -}}
8884
# add GA repo for mongodb-mongosh and mongodb-database-tools
8985
RUN echo "deb [ signed-by=/etc/apt/keyrings/mongodb.asc ] http://$MONGO_REPO/apt/{{ target.image | gsub(":.*$"; "") }} {{ target.suite }}/${MONGO_PACKAGE%-unstable}/{{ env.rcVersion }} {{ if target.image | test("^debian") then "main" else "multiverse" end }}" | tee "/etc/apt/sources.list.d/mongodb-{{ env.rcVersion }}.list"
90-
{{ ) end -}}
9186
{{ ) else "" end -}}
9287

9388
{{ if .notes then ( -}}

versions.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,8 @@
339339
"8.0-rc": {
340340
"changes": "https://jira.mongodb.org/issues/?jql=project%20%3D%20SERVER%20AND%20fixVersion%20%3D%20%228.0.0-rc16%22%20ORDER%20BY%20status%20DESC%2C%20priority%20DESC",
341341
"date": "08/03/2024",
342-
"dockerNeedsVersion": "7.0",
343342
"githash": "c05b57203089bb276c31ab34dfc538f1da972a36",
344-
"linux": "ubuntu2204",
343+
"linux": "ubuntu2404",
345344
"notes": "https://docs.mongodb.org/master/release-notes/8.0/",
346345
"pgp": [
347346
{
@@ -350,12 +349,6 @@
350349
],
351350
"url": "https://pgp.mongodb.com/server-dev.asc"
352351
},
353-
{
354-
"fingerprints": [
355-
"E58830201F7DD82CD808AA84160D26BB1785BA38"
356-
],
357-
"url": "https://pgp.mongodb.com/server-7.0.asc"
358-
},
359352
{
360353
"fingerprints": [
361354
"4B0752C1BCA238C0B4EE14DC41DE058A4E7DCA05"
@@ -387,6 +380,14 @@
387380
"image": "ubuntu:jammy",
388381
"suite": "jammy"
389382
},
383+
"ubuntu2404": {
384+
"arches": [
385+
"amd64",
386+
"arm64v8"
387+
],
388+
"image": "ubuntu:noble",
389+
"suite": "noble"
390+
},
390391
"windows": {
391392
"arches": [
392393
"amd64"

versions.sh

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,8 @@ shell="$(
6262
| ($splitVersion[0] | tonumber) >= 5 and ($splitVersion[1] | tonumber) > 0
6363
| not
6464
)
65-
66-
# if a given pre-release version has not had a GA release yet, we need the previous release for mongodb-mongosh and mongodb-database-tools
67-
| (.version | rtrimstr("-rc")) as $rcVersion
68-
| if .version != $rcVersion and (.meta.version | ltrimstr($rcVersion) | startswith(".0-")) then
69-
.meta.dockerNeedsVersion = ($rcVersion | split(".") | .[0] |= (tonumber -1 | tostring) | join("."))
70-
else . end
7165
]
7266
73-
# filter the list of "downloads" (targets) down to the set of targets of (M-1).0 if we need that previous version (see "dockerNeedsVersion" above)
74-
| (map({ key: .version, value: [ .meta.downloads[].target ] }) | from_entries) as $targets
75-
| map(if .meta | has("dockerNeedsVersion") then
76-
.meta.dockerNeedsVersion as $needsVersion
77-
| .meta.downloads |= map(select(.target as $target | $targets[$needsVersion] | index($target)))
78-
else . end)
79-
8067
# now convert all that data to a basic shell list + map so we can loop over/use it appropriately
8168
| "allVersions=( " + (
8269
map(.version | ., if endswith("-rc") then empty else . + "-rc" end)
@@ -138,7 +125,6 @@ for version in "${versions[@]}"; do
138125
"githash",
139126
"notes",
140127
"version",
141-
"dockerNeedsVersion",
142128
empty
143129
] | index($key)))
144130
+ {
@@ -148,11 +134,6 @@ for version in "${versions[@]}"; do
148134
$pgp.dev
149135
else empty end,
150136
151-
if .dockerNeedsVersion then
152-
# see "dockerNeedsVersion" notes above
153-
$pgp[.dockerNeedsVersion]
154-
else empty end,
155-
156137
$pgp[$rcVersion],
157138
158139
empty

0 commit comments

Comments
 (0)