From 928adfd09ff757e453e6a7fe3503f9cfc8723d75 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Fri, 6 Sep 2024 10:28:15 +0100 Subject: [PATCH] Suppress pnpm upgrade notices in logs (#866) --- image/base/release.Dockerfile | 2 +- image/discourse_dev/Dockerfile | 2 +- image/discourse_test/Dockerfile | 2 +- launcher_go/v2/test/templates/web.template.yml | 2 +- templates/web.template.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/image/base/release.Dockerfile b/image/base/release.Dockerfile index 612f4a5..c9945b0 100644 --- a/image/base/release.Dockerfile +++ b/image/base/release.Dockerfile @@ -10,6 +10,6 @@ RUN cd /var/www/discourse &&\ sudo -u discourse bundle config --local path ./vendor/bundle &&\ sudo -u discourse bundle config --local without test development &&\ sudo -u discourse bundle install --jobs $(($(nproc) - 1)) &&\ - sudo -u discourse /bin/bash -c 'if [ -f yarn.lock ]; then yarn install --frozen-lockfile && yarn cache clean; else pnpm install --frozen-lockfile; fi' &&\ + sudo -u discourse /bin/bash -c 'if [ -f yarn.lock ]; then yarn install --frozen-lockfile && yarn cache clean; else CI=1 pnpm install --frozen-lockfile; fi' &&\ find /var/www/discourse/vendor/bundle -name cache -not -path '*/gems/*' -type d -exec rm -rf {} + &&\ find /var/www/discourse/vendor/bundle -name tmp -type d -exec rm -rf {} + diff --git a/image/discourse_dev/Dockerfile b/image/discourse_dev/Dockerfile index eeb0698..57545f3 100644 --- a/image/discourse_dev/Dockerfile +++ b/image/discourse_dev/Dockerfile @@ -73,6 +73,6 @@ RUN --mount=type=bind,src=/repo,from=repo-fetcher,target=/tmp/discourse-clone,re # Warm global yarn cache RUN --mount=type=bind,src=/repo,from=repo-fetcher,target=/tmp/discourse-clone,readwrite \ cd /tmp/discourse-clone \ - && (if [ -f yarn.lock ]; then yarn install; else pnpm install; fi) + && (if [ -f yarn.lock ]; then yarn install; else CI=1 pnpm install; fi) USER root diff --git a/image/discourse_test/Dockerfile b/image/discourse_test/Dockerfile index 843d92b..019fb3e 100644 --- a/image/discourse_test/Dockerfile +++ b/image/discourse_test/Dockerfile @@ -30,7 +30,7 @@ FROM with_browsers AS release RUN cd /var/www/discourse &&\ sudo -u discourse bundle install --jobs $(($(nproc) - 1)) &&\ - sudo -E -u discourse -H /bin/bash -c 'if [ -f yarn.lock ]; then (yarn install && yarn cache clean); else pnpm install; fi' + sudo -E -u discourse -H /bin/bash -c 'if [ -f yarn.lock ]; then (yarn install && yarn cache clean); else CI=1 pnpm install; fi' RUN cd /var/www/discourse && sudo -E -u discourse -H bundle exec rake plugin:install_all_official &&\ LOAD_PLUGINS=1 sudo -E -u discourse -H bundle exec rake plugin:install_all_gems &&\ diff --git a/launcher_go/v2/test/templates/web.template.yml b/launcher_go/v2/test/templates/web.template.yml index 1106204..b0794d8 100644 --- a/launcher_go/v2/test/templates/web.template.yml +++ b/launcher_go/v2/test/templates/web.template.yml @@ -188,7 +188,7 @@ run: if [ -f yarn.lock ]; then su discourse -c 'yarn install --frozen-lockfile && yarn cache clean' else - su discourse -c 'pnpm install --frozen-lockfile' + su discourse -c 'CI=1 pnpm install --frozen-lockfile' fi - exec: diff --git a/templates/web.template.yml b/templates/web.template.yml index 01dc69c..d2f67d2 100644 --- a/templates/web.template.yml +++ b/templates/web.template.yml @@ -189,7 +189,7 @@ run: if [ -f yarn.lock ]; then su discourse -c 'yarn install --frozen-lockfile && yarn cache clean' else - su discourse -c 'pnpm install --frozen-lockfile' + su discourse -c 'CI=1 pnpm install --frozen-lockfile' fi - exec: -- 2.25.1