Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 8.0-rc to Noble and remove dockerNeedsVersion logic completely #709

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading