From 366ae55abe8b6d1e44020627f49b19498e83c8cb Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Thu, 22 Nov 2018 13:18:43 +0200 Subject: [PATCH] Add make targets for Jenkins these targets help hooking up things in Jenkins and enable us to perform build & deploy tests for cloud images. NOTE: use sudo -E to preserve the environment --- Makefile | 16 ++++++++++++++++ tests/test_cli.sh | 6 ------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index bcdae1dd..59ff1ddd 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,23 @@ test: ./tests/test_cli.sh +# need `losetup`, which needs Docker to be in privileged mode (--privileged) +# but even so fails in Travis CI +test_images: + sudo -E ./tests/test_cli.sh tests/cli/test_compose_ext4-filesystem.sh \ + tests/cli/test_compose_partitioned-disk.sh +test_aws: + sudo -E ./tests/test_cli.sh tests/cli/test_build_and_deploy_aws.sh + +test_azure: + sudo -E ./tests/test_cli.sh tests/cli/test_build_and_deploy_azure.sh + +test_openstack: + sudo -E ./tests/test_cli.sh tests/cli/test_build_and_deploy_openstack.sh + +test_vmware: + sudo -E ./tests/test_cli.sh tests/cli/test_build_and_deploy_vmware.sh clean: -rm -rf build src/pylorax/version.py diff --git a/tests/test_cli.sh b/tests/test_cli.sh index 13115a0b..c7876886 100755 --- a/tests/test_cli.sh +++ b/tests/test_cli.sh @@ -25,12 +25,6 @@ if [ -z "$*" ]; then # invoke cli/ tests which can be executed without special preparation ./tests/cli/test_blueprints_sanity.sh ./tests/cli/test_compose_sanity.sh - # need `losetup`, which needs Docker to be in privileged mode (--privileged), - # which is available only for `docker run`, however we use `docker build`! - # And all of this may not even work on Travis CI so disabling execution for now! - # maybe we will figure out how to execute these two scripts on internal Jenkins instance - #./tests/cli/test_compose_ext4-filesystem.sh - #./tests/cli/test_compose_partitioned-disk.sh else # execute other cli tests which need more adjustments in the calling environment # or can't be executed inside Travis CI