build: allow the tester command to retrieve the source and build env

variables

Co-Authored-By: Leonardo Grasso <me@leonardograsso.com>
Signed-off-by: Lorenzo Fontana <fontanalorenz@gmail.com>
This commit is contained in:
Lorenzo Fontana 2020-09-02 15:44:47 +02:00 committed by poiana
parent 492fe0c372
commit 98a5813bd7
2 changed files with 6 additions and 5 deletions

View File

@ -230,7 +230,7 @@ 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:feat-minimal-build # todo(fntlnz): change this to latest before merge, but first, update the image on docker hub
environment:
SOURCE_DIR: "/source"
BUILD_DIR: "/build"
@ -244,7 +244,7 @@ jobs:
command: /usr/bin/entrypoint test
"tests/integration-static":
docker:
- image: falcosecurity/falco-tester:latest
- image: falcosecurity/falco-tester:feat-minimal-build # todo(fntlnz): change this to latest before merge, but first, update the image on docker hub
environment:
SOURCE_DIR: "/source-static"
BUILD_DIR: "/build-static"

View File

@ -1,9 +1,10 @@
#!/usr/bin/env bash
set -eu -o pipefail
set -u -o pipefail
BUILD_DIR=${BUILD_DIR:-/build}
SOURCE_DIR=${SOURCE_DIR:-/source}
SOURCE_DIR=/source
BUILD_DIR=/build
CMD=${1:-test}
shift