Merge "Update config to support RHEL/CENT8"
This commit is contained in:
commit
6983cca5fa
@ -18,12 +18,15 @@ gcc-c++ [platform:rpm]
|
||||
git [platform:rpm]
|
||||
libffi-devel [platform:rpm]
|
||||
openssl-devel [platform:rpm]
|
||||
python-devel [platform:rpm]
|
||||
python-devel [platform:rpm !platform:rhel-8]
|
||||
python3-devel [platform:rpm !platform:centos-7]
|
||||
python2-dnf [platform:fedora]
|
||||
|
||||
# For SELinux
|
||||
libselinux-python [platform:rpm]
|
||||
libsemanage-python [platform:redhat]
|
||||
libselinux-python [platform:rpm !platform:rhel-8]
|
||||
libsemanage-python [platform:redhat !platform:rhel-8]
|
||||
libselinux-python3 [platform:rpm !platform:centos-7]
|
||||
libsemanage-python3 [platform:redhat !platform:rhel-7]
|
||||
|
||||
# Required for compressing collected log files in CI
|
||||
gzip
|
||||
|
@ -26,6 +26,15 @@ export PROJECT_DIR="$(dirname $(readlink -f ${BASH_SOURCE[0]}))/../"
|
||||
export ROLE_NAME="${ROLE_NAME:-$1}"
|
||||
export TRIPLEO_JOB_ANSIBLE_ARGS=${TRIPLEO_JOB_ANSIBLE_ARGS:-"-v"}
|
||||
|
||||
## Functions -----------------------------------------------------------------
|
||||
|
||||
function run_pip {
|
||||
"${HOME}/test-python/bin/pip" install \
|
||||
-r "${PROJECT_DIR}/requirements.txt" \
|
||||
-r "${PROJECT_DIR}/test-requirements.txt" \
|
||||
-r "${PROJECT_DIR}/molecule-requirements.txt" ${@:-}
|
||||
}
|
||||
|
||||
## Main ----------------------------------------------------------------------
|
||||
|
||||
# Source distribution information
|
||||
@ -36,7 +45,7 @@ PYTHON_EXEC=$(command -v python3 || command -v python)
|
||||
# Install the one requirement we need to run any local test
|
||||
case "${ID,,}" in
|
||||
amzn|rhel|centos|fedora)
|
||||
sudo "${RHT_PKG_MGR}" install -y python*-virtualenv
|
||||
sudo "${RHT_PKG_MGR}" install -y gcc python*-virtualenv
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -51,10 +60,15 @@ esac
|
||||
if [[ -d "${HOME}/.cache/pip/wheels" ]]; then
|
||||
rm -rf "${HOME}/.cache/pip/wheels"
|
||||
fi
|
||||
"${HOME}/test-python/bin/pip" install \
|
||||
-r "${PROJECT_DIR}/requirements.txt" \
|
||||
-r "${PROJECT_DIR}/test-requirements.txt" \
|
||||
-r "${PROJECT_DIR}/molecule-requirements.txt"
|
||||
run_pip
|
||||
|
||||
# NOTE(cloudnull): In some cases ansible will not be installed due to wheel
|
||||
# building issues, caused by pip. If this happens we
|
||||
# re-install the packages with the force flag, which will
|
||||
# ensure everything is rebuilt and installed correctly.
|
||||
if [ ! -f "${HOME}/test-python/bin/ansible" ]; then
|
||||
run_pip --force
|
||||
fi
|
||||
|
||||
# Run local test
|
||||
PS1="[\u@\h \W]\$" source "${HOME}/test-python/bin/activate"
|
||||
|
23
tripleo_ansible/roles/test_deps/vars/redhat-8.yml
Normal file
23
tripleo_ansible/roles/test_deps/vars/redhat-8.yml
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
# Copyright 2019 Red Hat, Inc.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
|
||||
test_deps_repo: https://trunk.rdoproject.org/fedora/current
|
||||
test_deps_selinux_packages:
|
||||
- python3-libselinux
|
||||
test_deps_tripleo_packages:
|
||||
- python3-tripleoclient
|
||||
test_deps_tripleo_repos: current-tripleo
|
@ -35,6 +35,15 @@
|
||||
requirements: "{{ tripleo_ansible_project_path }}/molecule-requirements.txt"
|
||||
virtualenv: "{{ ansible_user_dir }}/test-python"
|
||||
virtualenv_site_packages: true
|
||||
# NOTE(cloudnull): This is being done because docker is not supported on RHEL-8
|
||||
# and tests within this repo still require docker.
|
||||
- name: Manual install container.io
|
||||
become: true
|
||||
package:
|
||||
name: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
|
||||
when:
|
||||
- (ansible_os_family | lower) == "redhat"
|
||||
- (ansible_distribution_major_version | int) >= 8
|
||||
tasks:
|
||||
- name: Get Ansible Galaxy roles
|
||||
command: >-
|
||||
|
Loading…
x
Reference in New Issue
Block a user