Skip to content

Commit

Permalink
Update 8.0-rc to Noble and remove dockerNeedsVersion logic completely
Browse files Browse the repository at this point in the history
Since I implemented `dockerNeedsVersion`, upstream uploaded mongodb-mongosh into the 8.0 noble repository. 🚀
  • Loading branch information
tianon committed Aug 8, 2024
1 parent 2f67df0 commit f9fd3b1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 38 deletions.
12 changes: 6 additions & 6 deletions 8.0-rc/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions Dockerfile-linux.template
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,8 @@ ENV MONGO_PACKAGE=${MONGO_PACKAGE} MONGO_REPO=${MONGO_REPO}
ENV MONGO_MAJOR {{ if env.version != env.rcVersion then "testing" else env.version end }}
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"
{{ if env.version != env.rcVersion then ( -}}
{{ if .dockerNeedsVersion then ( -}}
# {{ env.rcVersion }} is not GA, so we need the previous release for mongodb-mongosh and mongodb-database-tools
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"
{{ ) else ( -}}
# add GA repo for mongodb-mongosh and mongodb-database-tools
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"
{{ ) end -}}
{{ ) else "" end -}}

{{ if .notes then ( -}}
Expand Down
17 changes: 9 additions & 8 deletions versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,8 @@
"8.0-rc": {
"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",
"date": "08/03/2024",
"dockerNeedsVersion": "7.0",
"githash": "c05b57203089bb276c31ab34dfc538f1da972a36",
"linux": "ubuntu2204",
"linux": "ubuntu2404",
"notes": "https://docs.mongodb.org/master/release-notes/8.0/",
"pgp": [
{
Expand All @@ -279,12 +278,6 @@
],
"url": "https://pgp.mongodb.com/server-dev.asc"
},
{
"fingerprints": [
"E58830201F7DD82CD808AA84160D26BB1785BA38"
],
"url": "https://pgp.mongodb.com/server-7.0.asc"
},
{
"fingerprints": [
"4B0752C1BCA238C0B4EE14DC41DE058A4E7DCA05"
Expand Down Expand Up @@ -316,6 +309,14 @@
"image": "ubuntu:jammy",
"suite": "jammy"
},
"ubuntu2404": {
"arches": [
"amd64",
"arm64v8"
],
"image": "ubuntu:noble",
"suite": "noble"
},
"windows": {
"arches": [
"amd64"
Expand Down
19 changes: 0 additions & 19 deletions versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,8 @@ shell="$(
| ($splitVersion[0] | tonumber) >= 5 and ($splitVersion[1] | tonumber) > 0
| not
)
# 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
| (.version | rtrimstr("-rc")) as $rcVersion
| if .version != $rcVersion and (.meta.version | ltrimstr($rcVersion) | startswith(".0-")) then
.meta.dockerNeedsVersion = ($rcVersion | split(".") | .[0] |= (tonumber -1 | tostring) | join("."))
else . end
]
# 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)
| (map({ key: .version, value: [ .meta.downloads[].target ] }) | from_entries) as $targets
| map(if .meta | has("dockerNeedsVersion") then
.meta.dockerNeedsVersion as $needsVersion
| .meta.downloads |= map(select(.target as $target | $targets[$needsVersion] | index($target)))
else . end)
# now convert all that data to a basic shell list + map so we can loop over/use it appropriately
| "allVersions=( " + (
map(.version | ., if endswith("-rc") then empty else . + "-rc" end)
Expand Down Expand Up @@ -138,7 +125,6 @@ for version in "${versions[@]}"; do
"githash",
"notes",
"version",
"dockerNeedsVersion",
empty
] | index($key)))
+ {
Expand All @@ -148,11 +134,6 @@ for version in "${versions[@]}"; do
$pgp.dev
else empty end,
if .dockerNeedsVersion then
# see "dockerNeedsVersion" notes above
$pgp[.dockerNeedsVersion]
else empty end,
$pgp[$rcVersion],
empty
Expand Down

0 comments on commit f9fd3b1

Please sign in to comment.