diff --git a/.travis.yml b/.travis.yml index 4684730..78c0c68 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ language: python services: docker install: - - pip install molecule[docker] --pre + - pip install molecule[docker] testinfra yamllint ansible-lint script: - molecule test diff --git a/filter_plugins/main.py b/filter_plugins/main.py index f2c636d..a1e5c1e 100644 --- a/filter_plugins/main.py +++ b/filter_plugins/main.py @@ -2,7 +2,8 @@ # Packages from Xilinx website _PACKAGES = { - '2019.2': 'xrt_201920.2.3.1301', + '2020.1': 'xrt_202010.2.5.227', + '2019.2': 'xrt_201920.2.5.309', '2019.1': 'xrt_201910.2.2.2250', '2018.3': 'xrt_201830.2.1.1794', '2018.2': 'xrt_201802.2.1.127' @@ -66,6 +67,9 @@ def _pkg_info(version, name, env, ansible_facts): '7.4.1708' if is_rhel7 else # Ubuntu packages use distribution version (ex: "18.04") ansible_facts['distribution_version']) + if version >= "2019.2": + # Architecture information + dist += '-x86_64' if family == 'RedHat' else '-amd64' # Define the package file name package = ''.join(( diff --git a/molecule/default/Dockerfile.j2 b/molecule/default/Dockerfile.j2 index e6aa95d..5124aa5 100644 --- a/molecule/default/Dockerfile.j2 +++ b/molecule/default/Dockerfile.j2 @@ -6,9 +6,17 @@ FROM {{ item.registry.url }}/{{ item.image }} 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 +{% if item.env is defined %} +{% for var, value in item.env.items() %} +{% if value %} +ENV {{ var }} {{ value }} +{% endif %} +{% endfor %} +{% endif %} + +RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python3 sudo bash ca-certificates iproute2 python3-apt aptitude && apt-get clean; \ + elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install /usr/bin/python3 /usr/bin/python3-config /usr/bin/dnf-3 sudo bash iproute && dnf clean all; \ + elif [ $(command -v yum) ]; then yum makecache fast && yum install -y /usr/bin/python /usr/bin/python2-config sudo yum-plugin-ovl bash iproute && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \ + elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python3 sudo bash iproute2 && zypper clean -a; \ + elif [ $(command -v apk) ]; then apk update && apk add --no-cache python3 sudo bash ca-certificates; \ + elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python3 sudo bash ca-certificates iproute2 && xbps-remove -O; fi diff --git a/molecule/default/playbook.yml b/molecule/default/converge.yml similarity index 100% rename from molecule/default/playbook.yml rename to molecule/default/converge.yml diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 4b26c00..152fb09 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -6,77 +6,89 @@ dependency: driver: name: docker -lint: - name: yamllint - platforms: + - name: ubuntu_bionic-2020.1 + image: ubuntu:bionic + groups: + - xrt_2020_1 + - name: ubuntu_bionic-2019.2 image: ubuntu:bionic groups: - - xrt_2019.1 + - xrt_2019_2 - name: ubuntu_bionic-2019.1 image: ubuntu:bionic groups: - - xrt_2019.1 + - xrt_2019_1 - name: ubuntu_bionic-2018.3 image: ubuntu:bionic groups: - - xrt_2018.3 + - xrt_2018_3 - name: ubuntu_bionic-2018.3-aws image: ubuntu:bionic groups: # Warning: # The "aws" package is not provided for all XRT versions by Xilinx - - xrt_2018.3 + - xrt_2018_3 - aws - name: ubuntu_bionic-2018.2 image: ubuntu:bionic groups: - - xrt_2018.2 + - xrt_2018_2 + + - name: ubuntu_xenial-2020.1 + image: ubuntu:xenial + groups: + - xrt_2020_1 - name: ubuntu_xenial-2019.2 image: ubuntu:xenial groups: - - xrt_2019.2 + - xrt_2019_2 - name: ubuntu_xenial-2019.1 image: ubuntu:xenial groups: - - xrt_2019.1 + - xrt_2019_1 - name: ubuntu_xenial-2018.3 image: ubuntu:xenial groups: - - xrt_2018.3 + - xrt_2018_3 - name: ubuntu_xenial-2018.2 image: ubuntu:xenial groups: - - xrt_2018.2 + - xrt_2018_2 + + - name: centos_7-2020.1 + image: centos:7 + groups: + - xrt_2020_1 - name: centos_7-2019.2 image: centos:7 groups: - - xrt_2019.2 + - xrt_2019_2 - name: centos_7-2019.1 image: centos:7 groups: - - xrt_2019.1 + - xrt_2019_1 - name: centos_7-2018.3 image: centos:7 groups: - - xrt_2018.3 + - xrt_2018_3 - name: centos_7-2018.2 image: centos:7 groups: - - xrt_2018.2 + - xrt_2018_2 - name: centos_7-aws image: centos:7 @@ -84,7 +96,7 @@ platforms: - aws # Disabled in Travis-CI: # Download is only authorized from an AWS EC2 instance - # - no_xrt + - no_xrt - name: centos_7-aws_fpga_src image: centos:7 @@ -94,17 +106,17 @@ platforms: provisioner: name: ansible - lint: - name: ansible-lint inventory: group_vars: - xrt_2019.2: + xrt_2020_1: + xilinx_xrt_version: 2020.1 + xrt_2019_2: xilinx_xrt_version: 2019.2 - xrt_2019.1: + xrt_2019_1: xilinx_xrt_version: 2019.1 - xrt_2018.3: + xrt_2018_3: xilinx_xrt_version: 2018.3 - xrt_2018.2: + xrt_2018_2: xilinx_xrt_version: 2018.2 no_xrt: xilinx_xrt_install: false @@ -116,5 +128,3 @@ provisioner: verifier: name: testinfra - lint: - name: flake8 diff --git a/tasks/aws.yml b/tasks/aws.yml index 00db821..1b0af79 100644 --- a/tasks/aws.yml +++ b/tasks/aws.yml @@ -19,6 +19,7 @@ failed_when: false # May be not available register: aws_package_sig when: + - false # Disabled, fails on all packages since 2019.2 - xilinx_xrt_install | bool - not xbutil.stat.exists @@ -41,6 +42,7 @@ failed_when: false # May be not available register: aws_package_digests when: + - false # Disabled, fails on all packages since 2019.2 - xilinx_xrt_install | bool - not xbutil.stat.exists diff --git a/tasks/main.yml b/tasks/main.yml index 504793e..d07c06a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -35,6 +35,7 @@ failed_when: false # May be not available register: xrt_package_sig when: + - false # Disabled, fails on all packages since 2019.2 - xilinx_xrt_install | bool - not xbutil.stat.exists @@ -86,6 +87,7 @@ failed_when: false # May be not available register: xrt_package_digests when: + - false # Disabled, fails on all packages since 2019.2 - xilinx_xrt_install | bool - not xbutil.stat.exists