Skip to content
Closed
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
32 changes: 32 additions & 0 deletions .github/actions/cleanup_docker/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
---
name: Prune all docker images and containers on Github runners
description: Installs breeze and recreates current python image from artifact
inputs:
docker-volume-location:
description: File system location where to move docker space to - defaults to second disk which has 75GB
default: /mnt/var-lib-docker
runs:
using: composite
steps:
- name: Cleanup docker
run: ./.github/actions/cleanup_docker/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: ${{ inputs.docker-volume-location }}
shell: bash
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ function cleanup_docker {
if [ -n "${TARGET_DOCKER_VOLUME_LOCATION}" ]; then
echo "Mounting ${TARGET_DOCKER_VOLUME_LOCATION} to /var/lib/docker"
sudo mkdir -p "${TARGET_DOCKER_VOLUME_LOCATION}" /var/lib/docker
sudo chmod 710 "${TARGET_DOCKER_VOLUME_LOCATION}" /var/lib/docker
sudo mount --bind "${TARGET_DOCKER_VOLUME_LOCATION}" /var/lib/docker
fi
sudo systemctl start docker
Expand Down
10 changes: 2 additions & 8 deletions .github/actions/prepare_all_ci_images/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,14 @@ inputs:
python-versions-list-as-string:
description: 'Stringified array of all Python versions to test - separated by spaces.'
required: true
docker-volume-location:
description: File system location where to move docker space to
default: /mnt/var-lib-docker
platform:
description: 'Platform for the build - linux/amd64 or linux/arm64'
required: true
runs:
using: "composite"
steps:
- name: "Cleanup docker"
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: ${{ inputs.docker-volume-location }}
shell: bash
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
# TODO: Currently we cannot loop through the list of python versions and have dynamic list of
# tasks. Instead we hardcode all possible python versions and they - but
# this should be implemented in stash action as list of keys to download.
Expand Down
8 changes: 2 additions & 6 deletions .github/actions/prepare_breeze_and_image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,8 @@ outputs:
runs:
using: "composite"
steps:
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
shell: bash
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: "Install Breeze"
uses: ./.github/actions/breeze
with:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/additional-ci-image-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,8 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: "Install Breeze"
uses: ./.github/actions/breeze
with:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/additional-prod-image-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,8 @@ jobs:
with:
fetch-depth: 2
persist-credentials: false
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: "Prepare breeze & PROD image: ${{ inputs.default-python-version }}"
uses: ./.github/actions/prepare_breeze_and_image
with:
Expand Down
42 changes: 12 additions & 30 deletions .github/workflows/basic-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,8 @@ jobs:
# Need to fetch all history for selective checks tests
fetch-depth: 0
persist-credentials: false
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: "Install Breeze"
uses: ./.github/actions/breeze
with:
Expand All @@ -100,11 +97,8 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: Setup pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
Expand Down Expand Up @@ -170,11 +164,8 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: "Setup node"
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -241,11 +232,8 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: "Install Breeze"
uses: ./.github/actions/breeze
with:
Expand Down Expand Up @@ -299,11 +287,8 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: "Install Breeze"
uses: ./.github/actions/breeze
with:
Expand Down Expand Up @@ -381,11 +366,8 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: "Install Breeze"
uses: ./.github/actions/breeze
with:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/ci-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,8 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: "Install Breeze"
uses: ./.github/actions/breeze
with:
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/ci-image-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,8 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: "Download docs prepared as artifacts"
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -407,11 +404,8 @@ jobs:
with:
fetch-depth: 2
persist-credentials: false
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v4
with:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,8 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: Fetch incoming commit ${{ github.sha }} with its parent
uses: actions/checkout@v4
with:
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/finalize-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,8 @@ jobs:
with:
# Needed to perform push action
persist-credentials: false
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: "Set constraints branch name"
id: constraints-branch
run: ./scripts/ci/constraints/ci_branch_constraints.sh >> ${GITHUB_OUTPUT}
Expand Down Expand Up @@ -194,11 +191,8 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: "Free up disk space"
shell: bash
run: ./scripts/tools/free_up_disk_space.sh
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/generate-constraints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ jobs:
with:
platform: "linux/amd64"
python-versions-list-as-string: ${{ inputs.python-versions-list-as-string }}
docker-volume-location: "" # TODO(jscheffl): Understand why it fails here and fix it
- name: "Verify all CI images ${{ inputs.python-versions-list-as-string }}"
run: breeze ci-image verify --run-in-parallel
- name: "Source constraints"
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/helm-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,8 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: "Install Breeze"
uses: ./.github/actions/breeze
with:
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/prod-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,8 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
if: inputs.upload-package-artifact == 'true'
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: "Cleanup dist and context file"
shell: bash
run: rm -fv ./dist/* ./docker-context-files/*
Expand Down Expand Up @@ -224,11 +220,8 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: "Install Breeze"
uses: ./.github/actions/breeze
with:
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/push-image-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,8 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: "Install Breeze"
uses: ./.github/actions/breeze
with:
Expand Down Expand Up @@ -204,11 +201,8 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: "Install Breeze"
uses: ./.github/actions/breeze
with:
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/release_dockerhub_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,8 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: "Install Breeze"
uses: ./.github/actions/breeze
with:
Expand Down Expand Up @@ -101,11 +98,8 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Cleanup docker"
# Move docker space to second partition to have more space
run: ./scripts/ci/cleanup_docker.sh
env:
TARGET_DOCKER_VOLUME_LOCATION: /mnt/var-lib-docker
- name: Cleanup docker
uses: ./.github/actions/cleanup_docker
- name: "Install Breeze"
uses: ./.github/actions/breeze
with:
Expand Down
Loading