Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): remove space reclamation steps for GH runners #430

Merged
Merged
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
11 changes: 1 addition & 10 deletions .github/workflows/pr-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ jobs:
KUBECONFIG: /tmp/.kube/config
KIND_WORKER_NODES: 2

runs-on: ubuntu-latest
runs-on: ubuntu-latest-8-cores
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -224,15 +224,6 @@ jobs:
- uses: ./.github/compute-version
id: version

- name: reclaim space before running tests
run: |
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
sudo rm -rf /tmp/*
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo rm -rf /opt/hostedtoolcache/Python
df -kh

- name: Run e2e tests
run: |
./tests/run-e2e.sh --ci --no-upgrade
Expand Down
20 changes: 0 additions & 20 deletions tests/run-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ gather_olm() {

run_bundle_upgrade() {
header "Running Bundle Upgrade"
prune_images_if_ci
kind_load_images
delete_olm_subscription || true
build_bundle
Expand Down Expand Up @@ -370,7 +369,6 @@ kind_load_image() {

run docker pull "$img"
run kind load docker-image "$img"
$CI_MODE && run docker image rm "$img"
return 0
}

Expand All @@ -379,42 +377,24 @@ kind_load_images() {
while read -r img; do
kind_load_image "$img"
done < <(yq -r .spec.relatedImages[].image "$OPERATOR_CSV")
prune_images_if_ci

info "loading additional images from $TEST_IMAGES_YAML"
while read -r img; do
kind_load_image "$img"
done < <(yq -r .images[].image "$TEST_IMAGES_YAML")
prune_images_if_ci

return 0
}

prune_images_if_ci() {
header "Prune Images"
$CI_MODE || {
info "skipping pruning of docker images when not in CI mode"
return 0
}
# NOTE: ci runs out of disk space at times, hence run images
info "pruning docker images and volumes"
run df -h
run docker images
run docker system prune -a -f --volumes
run df -h
}

deploy_operator() {
header "Build and Deploy Operator"
prune_images_if_ci
ensure_imgpullpolicy_always_in_yaml
kind_load_images
delete_olm_subscription || true
build_bundle
push_bundle
run_bundle
wait_for_operator "$OPERATORS_NS"
prune_images_if_ci
}

ensure_imgpullpolicy_always_in_yaml() {
Expand Down
Loading