Skip to content

Commit

Permalink
fix: new df and manual prune jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
wdconinc committed Dec 27, 2023
1 parent 3b9eb0d commit 5f8dcee
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 11 deletions.
59 changes: 48 additions & 11 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,19 +159,19 @@ status:pending:
## base job settings for all docker interactions
.docker:
image: ${DOCKER_IMAGE}
services:
services:
- docker:dind
before_script:
- # Login to registries
if [[ -n "${EXPORT_TAG}" ]] ; then
if [[ -n "${DH_REGISTRY}" ]] ; then
docker login -u ${DH_REGISTRY_USER} -p ${DH_EICWEB_TOKEN} ${DH_REGISTRY} ;
echo ${DH_EICWEB_TOKEN} | docker login -u ${DH_REGISTRY_USER} --password-stdin ${DH_REGISTRY} ;
fi ;
if [[ -n "${GH_REGISTRY}" ]] ; then
docker login -u ${GITHUB_REGISTRY_USER} -p ${GITHUB_REGISTRY_TOKEN} ${GH_REGISTRY} ;
echo ${GITHUB_REGISTRY_TOKEN} | docker login -u ${GITHUB_REGISTRY_USER} --password-stdin ${GH_REGISTRY} ;
fi ;
if [[ -n "${CI_REGISTRY}" ]] ; then
docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY} ;
echo ${CI_REGISTRY_PASSWORD} | docker login -u ${CI_REGISTRY_USER} --password-stdin ${CI_REGISTRY} ;
fi ;
fi
after_script:
Expand Down Expand Up @@ -527,7 +527,50 @@ benchmarks:detector:nightly:
project: EIC/benchmarks/detector_benchmarks
strategy: depend
allow_failure: false


df:
extends: .build
stage: config
tags:
- docker-new
needs:
- version
script:
- docker images
- docker ps --size
- docker stats --all --no-stream --no-trunc > docker-stats-all.txt
- docker context ls
- docker volume ls
- docker volume ls --filter=name=buildx_buildkit_builder
- docker buildx ls
- docker buildx inspect
- docker buildx du
- docker buildx du --verbose > docker-buildx-du-verbose.txt
- docker system df
- docker system df --verbose > docker-system-df-verbose.txt
artifacts:
paths:
- docker-stats-all.txt
- docker-buildx-du-verbose.txt
- docker-system-df-verbose.txt

prune:
extends: .build
stage: finalize
tags:
- docker-new
needs:
- clean_internal_tag
- clean_unstable_mr
- clean_pipeline
rules:
- when: manual
script:
- docker buildx prune --all --force --filter=until=24h --verbose
- docker system prune --all --force --filter=until=24h
- docker system prune --volumes --force
allow_failure: true

clean_internal_tag:
image: alpine/curl
stage: finalize
Expand Down Expand Up @@ -567,9 +610,6 @@ clean_unstable_mr:
if [ "$state" == "merged" ] ; then docker rmi $repository:$tag ; fi ;
if [ "$state" == "closed" ] ; then docker rmi $repository:$tag ; fi ;
done
- docker system prune --filter until=24h --force
- docker system df
- docker images

clean_pipeline:
extends: .docker
Expand Down Expand Up @@ -600,9 +640,6 @@ clean_pipeline:
if [ "$status" == "failed" ] ; then docker rmi $repository:$tag ; fi ;
if [ "$status" == "canceled" ] ; then docker rmi $repository:$tag ; fi ;
done
- docker system prune --filter until=24h --force
- docker system df
- docker images

status:success:
stage: status-report
Expand Down
1 change: 1 addition & 0 deletions containers/jug/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ RUN --mount=type=cache,target=/ccache,id=${TARGETPLATFORM} \
<<EOF
set -e
export CCACHE_DIR=/ccache
mkdir -p /var/cache/spack/blobs/sha256/
find /var/cache/spack/blobs/sha256/ -atime +7 -delete
JUGGLER_VERSION=$(jq -r .sha /tmp/juggler.json)
EICRECON_VERSION=$(jq -r .sha /tmp/eicrecon.json)
Expand Down

0 comments on commit 5f8dcee

Please sign in to comment.