Test setup variable inclusion reworked for better sanity.
General Molecule docker image is used instead of pre-built one.
Change-Id: I013b9d7b92ded86220e6f2092ce75ee47b094d89
Issue-ID: OOM-2665
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
--- /dev/null
+# Molecule managed
+
+{% if item.registry is defined %}
+FROM {{ item.registry.url }}/{{ item.image }}
+{% else %}
+FROM {{ item.image }}
+{% endif %}
+
+RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
+ elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
+ elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
+ elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
+ elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \
+ elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates && xbps-remove -O; fi
+++ /dev/null
-../../../../../group_vars/infrastructure.yml
\ No newline at end of file
name: yamllint
platforms:
- name: infrastructure-server
- image: molecule-${PREBUILD_PLATFORM_DISTRO:-centos}:${PREBUILD_DISTRO_VERSION:-centos7.6}
- pre_build_image: True
- privileged: true
- override_command: False
+ image: centos:7
groups:
- infrastructure
provisioner:
all:
app_name: onap
app_data_path: "/opt/{{ app_name }}"
- helm_bin_dir: /usr/local/bin
scenario:
name: default
verifier:
---
- name: Converge
hosts: all
+ pre_tasks:
+ - name: Include infrastructure group variables
+ include_vars: ../../../../group_vars/infrastructure.yml
+ - name: Include test scenario variables
+ include_vars: vars.yml
roles:
- helm
pre_tasks:
- name: Include infrastructure group variables
include_vars: ../../../../group_vars/infrastructure.yml
+ - name: Include test scenario variables
+ include_vars: vars.yml
roles:
- prepare-helm
--- /dev/null
+../default/Dockerfile.j2
\ No newline at end of file
+++ /dev/null
-../default/group_vars/
\ No newline at end of file
name: yamllint
platforms:
- name: infrastructure-server
- image: molecule-${PREBUILD_PLATFORM_DISTRO:-ubuntu}:${PREBUILD_DISTRO_VERSION:-18.04}
- pre_build_image: True
- privileged: true
- override_command: False
+ image: ubuntu:18.04
groups:
- infrastructure
provisioner:
all:
app_name: onap
app_data_path: "/opt/{{ app_name }}"
- helm_bin_dir: /usr/local/bin
scenario:
name: ubuntu
verifier: