test: add bin package (tar.gz) to integration test

Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
This commit is contained in:
Leonardo Grasso
2020-05-12 16:30:24 +02:00
committed by poiana
parent a520a9b666
commit 05c684d68c
3 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
FROM ubuntu:18.04
LABEL maintainer="cncf-falco-dev@lists.cncf.io"
ARG FALCO_VERSION=
RUN test -n FALCO_VERSION
ENV FALCO_VERSION ${FALCO_VERSION}
RUN apt update -y
RUN apt install dkms libyaml-0-2 curl -y
ADD falco-${FALCO_VERSION}-x86_64.tar.gz /
RUN cp -R /falco-${FALCO_VERSION}-x86_64/* /
# Change the falco config within the container to enable ISO 8601 output.
RUN sed -e 's/time_format_iso_8601: false/time_format_iso_8601: true/' < /etc/falco/falco.yaml > /etc/falco/falco.yaml.new \
&& mv /etc/falco/falco.yaml.new /etc/falco/falco.yaml
COPY rules/*.yaml /rules/
COPY trace_files/*.scap /traces/
CMD ["/usr/bin/falco"]

View File

@@ -58,6 +58,7 @@ case "$CMD" in
# build docker images
build_image "$BUILD_DIR" "$BUILD_TYPE" "$FALCO_VERSION" "deb"
build_image "$BUILD_DIR" "$BUILD_TYPE" "$FALCO_VERSION" "rpm"
build_image "$BUILD_DIR" "$BUILD_TYPE" "$FALCO_VERSION" "tar.gz"
# check that source directory contains Falco
if [ ! -d "$SOURCE_DIR/falco/test" ]; then
@@ -73,6 +74,7 @@ case "$CMD" in
# clean docker images
clean_image "deb"
clean_image "rpm"
clean_image "tar.gz"
;;
"bash")
CMD=/bin/bash

View File

@@ -31,3 +31,11 @@ trace_files: !mux
rules_file: /rules/rule_names_with_spaces.yaml
trace_file: /traces/cat_write.scap
conf_file: /etc/falco/falco.yaml
docker_bin_package:
package: docker:falcosecurity/falco:test-tar.gz
detect: True
detect_level: WARNING
rules_file: /rules/rule_names_with_spaces.yaml
trace_file: /traces/cat_write.scap
conf_file: /etc/falco/falco.yaml