summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-01-16 09:24:46 +0100
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-01-16 12:18:18 +0100
commitcb3f68d8bcecb6ff55b223d16e7f91c871fb30b6 (patch)
tree65c28fa2b55b33097f4c0abfbbbbac5486ae0f0d
parent9c14b7d8aed7c055a9ef3495f5e0fe5448202631 (diff)
Decrease tests resource footprint on CI minion
Due to constrained CI minion resources docker volumes need to be pruned after each test invocation to prevent false negative which occurs in case when multiple playbook level tests are run. Heavy VNC Server image (1GB) needs to be mocked with lightweight alpine image in play-infrastructure test for same reasons. Change-Id: I1026593a375853575cf210aefe29bc320d4e5c64 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com> Issue-ID: OOM-1907
-rwxr-xr-xansible/test/bin/ci-molecule.sh9
-rw-r--r--ansible/test/play-infrastructure/molecule/default/vars.yml2
2 files changed, 5 insertions, 6 deletions
diff --git a/ansible/test/bin/ci-molecule.sh b/ansible/test/bin/ci-molecule.sh
index 7859c8dc..74296815 100755
--- a/ansible/test/bin/ci-molecule.sh
+++ b/ansible/test/bin/ci-molecule.sh
@@ -2,7 +2,7 @@
# COPYRIGHT NOTICE STARTS HERE
-# Copyright 2019 © Samsung Electronics Co., Ltd.
+# Copyright 2019-2020 © Samsung Electronics Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -19,8 +19,8 @@
# COPYRIGHT NOTICE ENDS HERE
#
-# This is a main wrapper script to run Molecule tests
-# Main usage is for the CI usage to keep interface stable and the way to call
+# This is a main wrapper script to run Molecule tests.
+# Main usage is for the CI to keep interface stable and the way to call
# Molecule can be adjusted in this script independently.
#
@@ -40,7 +40,6 @@ if [ "${MOLECULE_CONTAINER}" == "true" ]; then
echo "Build Molecule-dev docker container"
${LOCAL_PATH}/../molecule-docker/build.sh
MOLECULE_BINARY=${LOCAL_PATH}/../bin/molecule.sh
-
else # Install Molecule natively in the target platform
echo "Install Molecule with virtualenv"
source ${LOCAL_PATH}/../bin/install-molecule.sh
@@ -50,5 +49,5 @@ fi
cd ${ROLE_PATH}
${MOLECULE_BINARY} --version
${MOLECULE_BINARY} test --all
+docker volume prune --force
cd -
-
diff --git a/ansible/test/play-infrastructure/molecule/default/vars.yml b/ansible/test/play-infrastructure/molecule/default/vars.yml
index 8aa774b4..2ae49d95 100644
--- a/ansible/test/play-infrastructure/molecule/default/vars.yml
+++ b/ansible/test/play-infrastructure/molecule/default/vars.yml
@@ -1,5 +1,4 @@
---
-vnc_passwd: molecule
certificates:
organization_name: Molecule Testers
state_or_province_name: Finland
@@ -22,3 +21,4 @@ runtime_images:
registry: "{{ molecule_test_registry }}"
path: "/library/alpine"
tag: "latest"
+vnc_server_image: alpine:latest