This PR adds support for using the DOCKER_BUILD_PKGS env var to
better help defining what packege to build. It also adds support
for the integration-daemon so we can run it as a bundle.
Signed-off-by: Paul Liljenberg <liljenberg.paul@gmail.com>
add directory test
Adds missing directory test. This helps verifying that
DOCKER_BUILD_PKGS is a directory and exists before continueing.
Signed-off-by: Paul Liljenberg <liljenberg.paul@gmail.com>
fix indent
Signed-off-by: Paul Liljenberg <liljenberg.paul@gmail.com>
| ... | ... |
@@ -12,7 +12,14 @@ fi |
| 12 | 12 |
|
| 13 | 13 |
test_deb_install(){
|
| 14 | 14 |
# test for each Dockerfile in contrib/builder |
| 15 |
- for dir in contrib/builder/deb/${PACKAGE_ARCH}/*/; do
|
|
| 15 |
+ |
|
| 16 |
+ builderDir="contrib/builder/deb/${PACKAGE_ARCH}"
|
|
| 17 |
+ pkgs=( $(find "${builderDir}/"*/ -type d) )
|
|
| 18 |
+ if [ ! -z "$DOCKER_BUILD_PKGS" ]; then |
|
| 19 |
+ pkgs=( $(echo ${DOCKER_BUILD_PKGS[@]/#/$builderDir\/}) )
|
|
| 20 |
+ fi |
|
| 21 |
+ for dir in "${pkgs[@]}"; do
|
|
| 22 |
+ [ -d "$dir" ] || { echo >&2 "skipping nonexistent $dir"; continue; }
|
|
| 16 | 23 |
local from="$(awk 'toupper($1) == "FROM" { print $2; exit }' "$dir/Dockerfile")"
|
| 17 | 24 |
local dir=$(basename "$dir") |
| 18 | 25 |
|
| ... | ... |
@@ -54,4 +61,8 @@ test_deb_install(){
|
| 54 | 54 |
done |
| 55 | 55 |
} |
| 56 | 56 |
|
| 57 |
-test_deb_install |
|
| 57 |
+( |
|
| 58 |
+ bundle .integration-daemon-start |
|
| 59 |
+ test_deb_install |
|
| 60 |
+ bundle .integration-daemon-stop |
|
| 61 |
+) 2>&1 | tee -a "$DEST/test.log" |