...and a process to create future ones. Thanks to Nalin for a short patch to skopeo that allows pushing images with dups. This commit updates make-v2sN to add "with-dups" functionality; it simply creates a v2s1 image, then uses jq (JSON tool) to duplicate the first .fsLayers and .history elements. Updated instructions so others can (we hope) do this in the future should it ever be necessary (we hope not). Update the checks that confirm that the image we pull has dup layers - this is a guarantee that we're testing what we think we're testing. Signed-off-by: Ed Santiago <santiago@redhat.com> |
||
---|---|---|
.. | ||
README.md | ||
make-v2s1 | ||
make-v2s1-with-dups | ||
make-v2s2 | ||
make-v2sN |
README.md
This subdirectory contains a script used to create images for testing.
To rephrase: this script is used before testing, not used in testing. Much before testing (days/weeks/months/years), and manually.
The script is make-v2sN
but it is never invoked as such. Instead,
various different symlinks point to the script, and the script
figures out its use by picking apart the name under which it is called.
As of the initial commit on 2020-02-10 there are three symlinks:
- make-v2s1 - Create a schema 1 image
- make-v2s2 - Create a schema 2 image
- make-v2s1-with-dups - Create a schema 1 image with two identical layers
If the script is successful, it will emit instructions on how to push the images to quay and what else you might need to do.
Updating
Should you need new image types, e.g. schema version 3 or an image with purple elephant GIFs in it:
- Decide on a name. Create a new symlink pointing to
make-v2sN
- Add the relevant code to
make-v2sN
: a conditional check at the top, the actual image-creating code, and if possible a new test to make sure the generated image is good - Run the script. Verify that the generated image is what you expect.
- Add new test(s) to
digest.bats