[monorepo] extend cleanup in Jenkins VMs (#27793)

* [monorepo] extend docker compose cleanup

* [web] cleanup docker images

Only retain the branch builds for dependencies.

* [server-ce] jenkins: remove build specific image

Retain the branch image as cache.

* [monorepo] jenkins: prune untagged docker images and docker build cache

* [monorepo] jenkins: remove temporary files from monorepo

* [monorepo] jenkins: remove containers from sandboxed compiles

GitOrigin-RevId: c847015986a060c5c84c39cd06236fd73bbf6f3a
This commit is contained in:
Jakob Ackermann
2025-08-11 15:05:47 +02:00
committed by Copybot
parent 3060ef868f
commit 836e8b5144
15 changed files with 58 additions and 40 deletions

View File

@@ -13,6 +13,9 @@ export OVERLEAF_TAG ?= sharelatex/sharelatex:$(BRANCH_NAME)-$(MONOREPO_REVISION)
all: build-base build-community
clean:
-docker rmi $(OVERLEAF_BASE_TAG) $(OVERLEAF_TAG)
build-base:
cp .dockerignore $(MONOREPO_ROOT)
docker build \

View File

@@ -223,6 +223,10 @@ pipeline {
dir('server-ce/test') {
sh 'make clean'
}
dir('server-ce') {
sh 'make clean'
}
sh 'make clean_jenkins'
}
}
}

View File

@@ -44,10 +44,10 @@ SHARD_PROJECT_NAMES = \
CLEAN_SHARDS=$(addprefix clean/,$(SHARD_PROJECT_NAMES))
clean: $(CLEAN_SHARDS)
-docker compose run --no-deps --rm --entrypoint rm host-admin -rf docker-compose.override.yml docker-compose.*_*.yml data/
-docker compose down --volumes --timeout 0
-docker compose down --remove-orphans --rmi local --timeout 0 --volumes
$(CLEAN_SHARDS): clean/%:
-COMPOSE_PROJECT_NAME=$* docker compose down --timeout=0 --volumes
-COMPOSE_PROJECT_NAME=$* docker compose down --remove-orphans --rmi local --timeout 0 --volumes
prefetch: prefetch_default
prefetch_default: prefetch_default_compose