build: falco tester automatic version

Signed-off-by: Lorenzo Fontana <lo@linux.com>
This commit is contained in:
Lorenzo Fontana 2020-01-15 14:29:10 +01:00 committed by Leo Di Donato
parent 14337670a5
commit b8335b510d
3 changed files with 14 additions and 7 deletions

View File

@ -59,17 +59,20 @@ jobs:
# execute integration tests based on the build results coming from the "build/centos7" job
"tests/integration":
docker:
- image: falcosecurity/falco-tester:latest
- image: falcosecurity/falco-tester:dynamic-builds # todo(fntlnz): replace this with the actual image once PR #968 is merged
environment:
SOURCE_DIR: "/source"
BUILD_DIR: "/build"
BUILD_TYPE: "release"
steps:
- setup_remote_docker
- checkout:
path: /source/falco
- attach_workspace:
at: /
- run:
name: execute integration tests
command: |
ls -la /
ls -la /build
command: /usr/bin/entrypoint test
workflows:
version: 2
build_and_test:

View File

@ -24,7 +24,11 @@ case "$CMD" in
exit 1
fi
if [ -z "$FALCO_VERSION" ]; then
echo "Missing Falco version." >&2
echo "Automatically figuring out Falco version."
FALCO_VERSION=$($BUILD_DIR/$BUILD_TYPE/userspace/falco/falco --version | cut -d' ' -f3 | tr -d '\r')
fi
if [ -z "$FALCO_VERSION" ]; then
echo "Falco version cannot be guessed, please provide it with the FALCO_VERSION environment variable." >&2
exit 1
fi
PACKAGE="$BUILD_DIR/$BUILD_TYPE/falco-$FALCO_VERSION-x86_64.deb"