Skip to content

Commit

Permalink
Merge pull request #430 from vprashar2929/chore-ci-space
Browse files Browse the repository at this point in the history
chore(ci): remove space reclamation steps for GH runners
  • Loading branch information
sthaha authored Oct 28, 2024
2 parents a884f56 + 38a4cfa commit 3442439
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
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

0 comments on commit 3442439

Please sign in to comment.