From ab729459ce65a780090571b74b3eb786fa3bdd9b Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Mon, 6 Jul 2026 20:10:41 -0300 Subject: [PATCH 1/2] fix: build script to allow gaps between versions --- build-automation.mjs | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/build-automation.mjs b/build-automation.mjs index fd2331f..9d6504b 100644 --- a/build-automation.mjs +++ b/build-automation.mjs @@ -29,13 +29,22 @@ const getSupportedVersions = async (github) => { const latest = acc.get(minor) || 0; - acc.set(minor, latest > patch ? latest : patch); + acc.set(minor, Number(latest) > Number(patch) ? latest : patch); return acc; }, new Map()); return groupedReleases; }; +const getMinor = (version) => version.split('.').slice(0, 2).join('.'); + +const compareMinors = (a, b) => { + const [aMajor, aMinor] = a.split('.').map(Number); + const [bMajor, bMinor] = b.split('.').map(Number); + + return (aMajor - bMajor) || (aMinor - bMinor); +}; + const removeCurrentVersions = async () => { const versionsOutput = await getCurrentFolders(); @@ -63,9 +72,23 @@ export default async function(github) { process.exit(0); } + // keep publishing minors that left the supported list while an older minor + // (e.g. an old LTS) is still supported, frozen at their last published patch + const oldestSupportedMinor = Array.from(supportedVersions.keys()).sort(compareMinors)[0]; + + const versionsToBuild = new Map(supportedVersions); + + for (const version of currentVersions) { + const minor = getMinor(version); + + if (!versionsToBuild.has(minor) && compareMinors(minor, oldestSupportedMinor) > 0) { + versionsToBuild.set(minor, version.split('.')[2]); + } + } + await removeCurrentVersions(); - for await (const [minor, patch] of supportedVersions) { + for await (const [minor, patch] of versionsToBuild) { const fullVersion = `${minor}.${patch}`; const { data: info } = await github.request(`https://releases.rocket.chat/${fullVersion}/info`); From 5652680f15b0af01233635ddf2025109e2edbff2 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Mon, 6 Jul 2026 20:10:54 -0300 Subject: [PATCH 2/2] chore: add gap versions back --- 7.11/Dockerfile | 83 +++++++++++++++++++++++++++++++++++++++++++++++++ 7.12/Dockerfile | 83 +++++++++++++++++++++++++++++++++++++++++++++++++ 7.13/Dockerfile | 83 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 249 insertions(+) create mode 100644 7.11/Dockerfile create mode 100644 7.12/Dockerfile create mode 100644 7.13/Dockerfile diff --git a/7.11/Dockerfile b/7.11/Dockerfile new file mode 100644 index 0000000..1dd87f5 --- /dev/null +++ b/7.11/Dockerfile @@ -0,0 +1,83 @@ +FROM node:22-bookworm-slim + +ENV DENO_VERSION=1.43.5 + +RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \ + && case "${dpkgArch##*-}" in \ + amd64) ARCH='x86_64';; \ + arm64) ARCH='aarch64';; \ + *) echo "unsupported Deno architecture"; exit 1 ;; \ + esac \ + && set -ex \ + && apt-get update && apt-get install -y --no-install-recommends ca-certificates curl unzip && rm -rf /var/lib/apt/lists/* \ + && curl -fsSL https://dl.deno.land/release/v${DENO_VERSION}/deno-${ARCH}-unknown-linux-gnu.zip --output /tmp/deno-${ARCH}-unknown-linux-gnu.zip \ + && echo "246bf818932c5e11adb85afaaf3c90e65d5cbe14bcaa8ea14d35fc085869775d /tmp/deno-x86_64-unknown-linux-gnu.zip" | sha256sum -c - \ + && unzip /tmp/deno-${ARCH}-unknown-linux-gnu.zip -d /tmp \ + && rm /tmp/deno-${ARCH}-unknown-linux-gnu.zip \ + && chmod 755 /tmp/deno \ + && mv /tmp/deno /usr/local/bin/deno \ + && apt-mark auto '.*' > /dev/null \ + && find /usr/local -type f -executable -exec ldd '{}' ';' \ + | awk '/=>/ { print $(NF-1) }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -r apt-mark manual \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false + +RUN groupadd -r rocketchat \ + && useradd -r -g rocketchat rocketchat \ + && mkdir -p /app/uploads \ + && chown rocketchat:rocketchat /app/uploads + +VOLUME /app/uploads + +WORKDIR /app + +ENV NODE_ENV=production + +ENV RC_VERSION=7.11.7 + +RUN set -eux \ + && apt-get update \ + && apt-get install -y --no-install-recommends fontconfig \ + && aptMark="$(apt-mark showmanual)" \ + && apt-get install -y --no-install-recommends g++ make python3 ca-certificates curl gnupg \ + && rm -rf /var/lib/apt/lists/* \ + # gpg: key 4FD08104: public key "Rocket.Chat Buildmaster " imported + && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 0E163286C20D07B9787EBE9FD7F9D0414FD08104 \ + && curl -fSL "https://releases.rocket.chat/${RC_VERSION}/download" -o rocket.chat.tgz \ + && curl -fSL "https://releases.rocket.chat/${RC_VERSION}/asc" -o rocket.chat.tgz.asc \ + && gpg --batch --verify rocket.chat.tgz.asc rocket.chat.tgz \ + && tar zxf rocket.chat.tgz \ + && rm rocket.chat.tgz rocket.chat.tgz.asc \ + && cd bundle/programs/server \ + && npm install --unsafe-perm=true \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $aptMark > /dev/null \ + && find /usr/local -type f -executable -exec ldd '{}' ';' \ + | awk '/=>/ { print $(NF-1) }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -r apt-mark manual \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && npm cache clear --force \ + && chown -R rocketchat:rocketchat /app + +USER rocketchat + +WORKDIR /app/bundle + +# needs a mongoinstance - defaults to container linking with alias 'db' +ENV DEPLOY_METHOD=docker-official \ + MONGO_URL=mongodb://db:27017/meteor \ + HOME=/tmp \ + PORT=3000 \ + ROOT_URL=http://localhost:3000 + +EXPOSE 3000 + +CMD ["node", "main.js"] diff --git a/7.12/Dockerfile b/7.12/Dockerfile new file mode 100644 index 0000000..dec1d40 --- /dev/null +++ b/7.12/Dockerfile @@ -0,0 +1,83 @@ +FROM node:22-bookworm-slim + +ENV DENO_VERSION=1.43.5 + +RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \ + && case "${dpkgArch##*-}" in \ + amd64) ARCH='x86_64';; \ + arm64) ARCH='aarch64';; \ + *) echo "unsupported Deno architecture"; exit 1 ;; \ + esac \ + && set -ex \ + && apt-get update && apt-get install -y --no-install-recommends ca-certificates curl unzip && rm -rf /var/lib/apt/lists/* \ + && curl -fsSL https://dl.deno.land/release/v${DENO_VERSION}/deno-${ARCH}-unknown-linux-gnu.zip --output /tmp/deno-${ARCH}-unknown-linux-gnu.zip \ + && echo "246bf818932c5e11adb85afaaf3c90e65d5cbe14bcaa8ea14d35fc085869775d /tmp/deno-x86_64-unknown-linux-gnu.zip" | sha256sum -c - \ + && unzip /tmp/deno-${ARCH}-unknown-linux-gnu.zip -d /tmp \ + && rm /tmp/deno-${ARCH}-unknown-linux-gnu.zip \ + && chmod 755 /tmp/deno \ + && mv /tmp/deno /usr/local/bin/deno \ + && apt-mark auto '.*' > /dev/null \ + && find /usr/local -type f -executable -exec ldd '{}' ';' \ + | awk '/=>/ { print $(NF-1) }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -r apt-mark manual \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false + +RUN groupadd -r rocketchat \ + && useradd -r -g rocketchat rocketchat \ + && mkdir -p /app/uploads \ + && chown rocketchat:rocketchat /app/uploads + +VOLUME /app/uploads + +WORKDIR /app + +ENV NODE_ENV=production + +ENV RC_VERSION=7.12.7 + +RUN set -eux \ + && apt-get update \ + && apt-get install -y --no-install-recommends fontconfig \ + && aptMark="$(apt-mark showmanual)" \ + && apt-get install -y --no-install-recommends g++ make python3 ca-certificates curl gnupg \ + && rm -rf /var/lib/apt/lists/* \ + # gpg: key 4FD08104: public key "Rocket.Chat Buildmaster " imported + && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 0E163286C20D07B9787EBE9FD7F9D0414FD08104 \ + && curl -fSL "https://releases.rocket.chat/${RC_VERSION}/download" -o rocket.chat.tgz \ + && curl -fSL "https://releases.rocket.chat/${RC_VERSION}/asc" -o rocket.chat.tgz.asc \ + && gpg --batch --verify rocket.chat.tgz.asc rocket.chat.tgz \ + && tar zxf rocket.chat.tgz \ + && rm rocket.chat.tgz rocket.chat.tgz.asc \ + && cd bundle/programs/server \ + && npm install --unsafe-perm=true \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $aptMark > /dev/null \ + && find /usr/local -type f -executable -exec ldd '{}' ';' \ + | awk '/=>/ { print $(NF-1) }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -r apt-mark manual \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && npm cache clear --force \ + && chown -R rocketchat:rocketchat /app + +USER rocketchat + +WORKDIR /app/bundle + +# needs a mongoinstance - defaults to container linking with alias 'db' +ENV DEPLOY_METHOD=docker-official \ + MONGO_URL=mongodb://db:27017/meteor \ + HOME=/tmp \ + PORT=3000 \ + ROOT_URL=http://localhost:3000 + +EXPOSE 3000 + +CMD ["node", "main.js"] diff --git a/7.13/Dockerfile b/7.13/Dockerfile new file mode 100644 index 0000000..da230b8 --- /dev/null +++ b/7.13/Dockerfile @@ -0,0 +1,83 @@ +FROM node:22-bookworm-slim + +ENV DENO_VERSION=1.43.5 + +RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \ + && case "${dpkgArch##*-}" in \ + amd64) ARCH='x86_64';; \ + arm64) ARCH='aarch64';; \ + *) echo "unsupported Deno architecture"; exit 1 ;; \ + esac \ + && set -ex \ + && apt-get update && apt-get install -y --no-install-recommends ca-certificates curl unzip && rm -rf /var/lib/apt/lists/* \ + && curl -fsSL https://dl.deno.land/release/v${DENO_VERSION}/deno-${ARCH}-unknown-linux-gnu.zip --output /tmp/deno-${ARCH}-unknown-linux-gnu.zip \ + && echo "246bf818932c5e11adb85afaaf3c90e65d5cbe14bcaa8ea14d35fc085869775d /tmp/deno-x86_64-unknown-linux-gnu.zip" | sha256sum -c - \ + && unzip /tmp/deno-${ARCH}-unknown-linux-gnu.zip -d /tmp \ + && rm /tmp/deno-${ARCH}-unknown-linux-gnu.zip \ + && chmod 755 /tmp/deno \ + && mv /tmp/deno /usr/local/bin/deno \ + && apt-mark auto '.*' > /dev/null \ + && find /usr/local -type f -executable -exec ldd '{}' ';' \ + | awk '/=>/ { print $(NF-1) }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -r apt-mark manual \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false + +RUN groupadd -r rocketchat \ + && useradd -r -g rocketchat rocketchat \ + && mkdir -p /app/uploads \ + && chown rocketchat:rocketchat /app/uploads + +VOLUME /app/uploads + +WORKDIR /app + +ENV NODE_ENV=production + +ENV RC_VERSION=7.13.9 + +RUN set -eux \ + && apt-get update \ + && apt-get install -y --no-install-recommends fontconfig \ + && aptMark="$(apt-mark showmanual)" \ + && apt-get install -y --no-install-recommends g++ make python3 ca-certificates curl gnupg \ + && rm -rf /var/lib/apt/lists/* \ + # gpg: key 4FD08104: public key "Rocket.Chat Buildmaster " imported + && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 0E163286C20D07B9787EBE9FD7F9D0414FD08104 \ + && curl -fSL "https://releases.rocket.chat/${RC_VERSION}/download" -o rocket.chat.tgz \ + && curl -fSL "https://releases.rocket.chat/${RC_VERSION}/asc" -o rocket.chat.tgz.asc \ + && gpg --batch --verify rocket.chat.tgz.asc rocket.chat.tgz \ + && tar zxf rocket.chat.tgz \ + && rm rocket.chat.tgz rocket.chat.tgz.asc \ + && cd bundle/programs/server \ + && npm install --unsafe-perm=true \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $aptMark > /dev/null \ + && find /usr/local -type f -executable -exec ldd '{}' ';' \ + | awk '/=>/ { print $(NF-1) }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -r apt-mark manual \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + && npm cache clear --force \ + && chown -R rocketchat:rocketchat /app + +USER rocketchat + +WORKDIR /app/bundle + +# needs a mongoinstance - defaults to container linking with alias 'db' +ENV DEPLOY_METHOD=docker-official \ + MONGO_URL=mongodb://db:27017/meteor \ + HOME=/tmp \ + PORT=3000 \ + ROOT_URL=http://localhost:3000 + +EXPOSE 3000 + +CMD ["node", "main.js"]