Skip to content

Commit f9fd3b1

Browse files
committed
Update 8.0-rc to Noble and remove dockerNeedsVersion logic completely
Since I implemented `dockerNeedsVersion`, upstream uploaded mongodb-mongosh into the 8.0 noble repository. 🚀
1 parent 2f67df0 commit f9fd3b1

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
@@ -268,9 +268,8 @@
268268
"8.0-rc": {
269269
"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",
270270
"date": "08/03/2024",
271-
"dockerNeedsVersion": "7.0",
272271
"githash": "c05b57203089bb276c31ab34dfc538f1da972a36",
273-
"linux": "ubuntu2204",
272+
"linux": "ubuntu2404",
274273
"notes": "https://docs.mongodb.org/master/release-notes/8.0/",
275274
"pgp": [
276275
{
@@ -279,12 +278,6 @@
279278
],
280279
"url": "https://pgp.mongodb.com/server-dev.asc"
281280
},
282-
{
283-
"fingerprints": [
284-
"E58830201F7DD82CD808AA84160D26BB1785BA38"
285-
],
286-
"url": "https://pgp.mongodb.com/server-7.0.asc"
287-
},
288281
{
289282
"fingerprints": [
290283
"4B0752C1BCA238C0B4EE14DC41DE058A4E7DCA05"
@@ -316,6 +309,14 @@
316309
"image": "ubuntu:jammy",
317310
"suite": "jammy"
318311
},
312+
"ubuntu2404": {
313+
"arches": [
314+
"amd64",
315+
"arm64v8"
316+
],
317+
"image": "ubuntu:noble",
318+
"suite": "noble"
319+
},
319320
"windows": {
320321
"arches": [
321322
"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)