Basic testing workflow
The test script assumes you have already built the image you want to test. If required, first build the S2I image. Run one of the following commands:
-
If you use Podman, run the following command:
$ podman build -t <builder_image_name> -
If you use Docker, run the following command:
$ docker build -t <builder_image_name>
The following steps describe the default workflow to test S2I image builders:
-
Verify the
usagescript is working:-
If you use Podman, run the following command:
$ podman run <builder_image_name> . -
If you use Docker, run the following command:
$ docker run <builder_image_name> .
-
-
Build the image:
$ s2i build file:///path-to-sample-app _<BUILDER_IMAGE_NAME>_ _<OUTPUT_APPLICATION_IMAGE_NAME>_ -
Optional: if you support
save-artifacts, run step 2 once again to verify that saving and restoring artifacts works properly. -
Run the container:
-
If you use Podman, run the following command:
$ podman run <output_application_image_name> -
If you use Docker, run the following command:
$ docker run <output_application_image_name>
-
-
Verify the container is running and the application is responding.
Running these steps is generally enough to tell if the builder image is working as expected.