mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-08 00:44:25 +01:00
Add new CI tests to ensure that the following installation methods are also tested: - "Automatic" method ([`kata-manager`](https://github.com/kata-containers/tests/tree/master/cmd/kata-manager)) - "Scripted" method ([`kata-doc-to-script`](https://github.com/kata-containers/tests/blob/master/.ci/kata-doc-to-script.sh)) **Note:** the "Automatic" method is **not** the same as the existing `kata-manager` test: the existing test executes the "Manual" installation method (which runs `kata-manager` to execute the appropriate distro-specific install guide). However, this new test executes the `install/installing-with-kata-manager.md` document, which subsequently calls the `kata-manager` script. Since the "Automatic" and "Scripted" installation methods are designed to run "standalone" (without requiring any local git repo clones), the script which runs these new tests has to take care to ensure the environment they run in is clean. It does this by using the following approach: - Removes any local Kata github repos from the standard `GOPATH` locations (to ensure the scripts do not inadvertently access local files) [1]. - Creates a temporary directory containing: - A copy of *itself*. - The scripts it generated from the "Automatic" and "Scripted" installation documents. - Re-exec's itself to run the version in the temporary directory, passing an option that tells itself to simply execute the scripts in the specified directory. - It then runs the scripts in the directory specified. --- [1] - Since the recursive delete of all local Kata github repos is potentially dangerous, the test will immediately fail if the standard `KATA_DEV_MODE` variable is set (since this denotes a developer system) and will also fail unless the standard `CI` variable is set (denoting the script is running in a Continuous Integration environment, such as JenkinsCI. Fixes #278. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>