Increase the build timeout to 50 minutes, this is required to allow more
distros to be built.
Fixes: #160
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
Reformat the usage output displayed with `help` command or `-h` option.
Trap exit codes only after options parsing, as that is used to
generate a test report.
Fixes: #169
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
- Makefile: update targets to better track build artifacts
- OSbuilder : Add support for Ubuntu rootfs
- rootfs: Include libseccomp support in rootfs
- rootfs-fedora: bump Fedora release to 28
- rootfs: Fail on non existing agent version.
344a37c Makefile: update targets to better track build artifacts
f19da63 rootfs: Include libseccomp support in rootfs
3075de4 OSbuilder : Add support for Ubuntu rootfs
89bca97 rootfs: dockerfile: Fix fedora 28 build.
5a1d946 rootfs: Fail on non existing agent version.
1ac9c07 rootfs-fedora: bump Fedora release to 28
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
Remove the redundant `--distro` argument; when needed, the distro can be
specified using a positional argument.
Fixes: #158
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
At the end of the tests, show a summary of the size of all the rootfs's,
images and initrd's.
Fixes#162.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Update Makefile so that build artifacts are actually tracked as make
targets. This is to enforce a strict prerequisite ordering and better
handle parallel builds.
Fixes: #157
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
Ensure the image used on the guest does include libseccomp,
otherwise when a seccomp profile is passed by the runtime, it
will end up with boot failure on the guest.
Fixes: #153
Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
Fedora 28 container already has coreutils-single package.
Also, the new fedora 28 container does not provide make by default.
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
Fail if we can not check out to the requested agent version.
Dont checkout to any branch by default.
Fixes: #147
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
- tests: Add ability to restrict which tests run
- rootfs.sh: Add Platform-OS matrix to help page
- initrd-builder: make initrd_builder.sh idempotent
- travis: Enable travis ci for ppc64le
- docs: Add Platform-Compatibility matrix
- rootfs: docker: Reduce build time by not reinstalling go
- CI: Install make on Ubuntu
c5e2c0f tests: Add more messages
9f2da28 docs: Updated for new test options
0cd64fb build: Added targets to run tests
0ea8ef7 tests: Rename test script
c679cae tests: Add ability to restrict which tests run
80e1997 tests: Create new function to launch tests
f077e6e tests: Rename distro test functions
adb3f57 rootfs.sh: Add Platform-OS matrix link to help page
1e5e915 docs: Add Platform-Compatibility matrix
25e9f01 rootfs: docker: Reduce build time by not reinstalling go
abb559d CI: Install make on Ubuntu
22f04db travis: Enable travis ci for ppc64le
a7bafc5 initrd-builder: make initrd_builder.sh idempotent
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
Created a new README for the tests and updated the top-level README
with brief details on how to run tests.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Updated the `Makefile` to provide the following new targets:
```
make test # Run all tests.
make test-image-only # Only run image tests.
make test-initrd-only # Only run initrd tests.
```
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Added options to the test script to allow:
- all tests for a specific distro (`--distro $distro`).
- all image tests (`--test-images-only`).
- all initrd tests (`--test-initrds-only`).
Any combination of the above is also permitted. By default, all tests
will be run.
Fixes#142.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Using docker we always add (ADD) the go tarball. But we can avoid do it
all the time if we install Go using RUN dockerfile instruction.
Use RUN to avoid repeat steps already done in dockerfile.
Fixes: #125
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
Fix CI build failures on Ubuntu 16.04 due to `make` not being installed
before the static check script runs by:
- Installing make explicitly on Ubuntu.
- Moving the static-check script after the package install setup phase.
Fixes#134.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
If initrd_builder.sh fails partway through it may not be possible to run
it again without creating a new rootfs.
This happens because initrd_builder.sh checks for the presence of
/sbin/init and refuses to run if it is missing. Later on, the script
moves /sbin/init to /init, where the kernel expects to find it in an
initramfs. After this step initrd_builder.sh will refuse to run again
since /sbin/init is now missing.
Create a symlink from /init to /sbin/init instead of moving the file.
This allows initrd_builder.sh to be run repeatedly on the same rootfs.
Fixes: #130
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
The image_builder.sh script must be run as root. The following check is
performed before the script checks for root:
[ "${AGENT_INIT}" == "yes" ] || [ -x "${ROOTFS}/usr/bin/${AGENT_BIN}" ] || \
die "/usr/bin/${AGENT_BIN} is not installed in ${ROOTFS}
use AGENT_BIN env variable to change the expected agent binary name"
The -x test is "True if the file is executable by you". It may evaluate
to true as root and false as non-root, depending on the file
permissions.
The permissions for kata-agent given in the Developer Guide are 0550
(https://github.com/kata-containers/documentation/blob/master/Developer-Guide.md#add-a-custom-agent-to-the-image---optional).
Therefore image_builder.sh fails with "/usr/bin/${AGENT_BIN} is not
installed" when run as non-root. This is confusing since the agent
binary is really installed!
Move the root check to the beginning of the script. This solves the
confusing error and prevents similar problems where the script doesn't
take into account that the user may be non-root.
Fixes: #127
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
proxy server must be specified in configuration file
of the package manager, /etc/yum.conf for yum or
/etc/dnf/dnf.conf for dnf
fixes#123
Signed-off-by: Julio Montes <julio.montes@intel.com>