Skip to content

Commit

Permalink
review: Add README for image gathering
Browse files Browse the repository at this point in the history
  • Loading branch information
kimwnasptd committed Sep 5, 2024
1 parent a3a41e4 commit 29d3710
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Utility Script

This directory contains helper scripts for Charmed Kubeflow, during CI and not only.

## Gather images used by a bundle

You can get a list of all the OCI images used by the bundle by running the following command:
```bash
python3 scripts/get-all-images.py \
--append-images tests/airgapped/ckf-1.8-testing-images.txt \
releases/1.8/stable/kubeflow/bundle.yaml \
> images-all.txt
```

The script will gather the images in the following way:
1. For each `application` in the provided `bundle.yaml` file:
2. detect if it's owned by us or another team (by looking at the `_github_dependency_repo_name` and such metadata)
3. clone its repo, by looking at `_github_repo_name` and such metadata
4. If owned by another team: only parse it's `metadata.yaml` and look for `oci-resources`
5. If owned by us: run the `tools/get-images.sh` script the repo **must** have
6. If a repo does not have `tools/get-images.sh` (i.e. kubeflow-roles) then the script should skip the repo
7. If the `get-images.sh` script either fails (return code non zero) or has error logs then the script should **fail**
8. Aggregate the outputs of all `get-images.sh` scripts to one output
9. If user passed an argument `--append-images` then the script will amend a list of images we need for airgap testing

0 comments on commit 29d3710

Please sign in to comment.