mirror of
https://github.com/containers/ansible-podman-collections.git
synced 2026-02-04 07:11:49 +00:00
Add setup files for Pip installation (#100)
This commit is contained in:
parent
69b034b263
commit
8e45217465
3 changed files with 129 additions and 0 deletions
83
.github/workflows/podman_container.yml
vendored
83
.github/workflows/podman_container.yml
vendored
|
|
@ -111,3 +111,86 @@ jobs:
|
|||
|
||||
TEST2RUN=podman_container ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
|
||||
test_podman_container_with_pip:
|
||||
name: Podman container w/ pip ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
#- git+https://github.com/ansible/ansible.git@stable-2.10
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.7
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
python3 -m pip install --user --force-reinstall --upgrade .
|
||||
|
||||
|
||||
- name: Run collection tests for podman container
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
export ANSIBLE_COLLECTIONS_PATHS=~/.local/share/ansible/collections
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_container ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
|
|
|
|||
38
setup.cfg
Normal file
38
setup.cfg
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
[metadata]
|
||||
name = ansible-podman-collections.containers
|
||||
summary = Ansible collections for Podman
|
||||
description-file =
|
||||
README.md
|
||||
|
||||
author = Sagi Shnaidman (@sshnaidm)
|
||||
author-email = einarum@gmail.com
|
||||
home-page = https://github.com/containers/ansible-podman-collections/
|
||||
classifier =
|
||||
License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
||||
Development Status :: 5 - Production/Stable
|
||||
Intended Audience :: Developers
|
||||
Intended Audience :: System Administrators
|
||||
Intended Audience :: Information Technology
|
||||
Topic :: System :: Systems Administration
|
||||
Topic :: Utilities
|
||||
|
||||
[global]
|
||||
setup-hooks =
|
||||
pbr.hooks.setup_hook
|
||||
|
||||
[files]
|
||||
data_files =
|
||||
share/ansible/collections/ansible_collections/containers/podman/ = README.md
|
||||
share/ansible/collections/ansible_collections/containers/podman/roles/ = roles/*
|
||||
share/ansible/collections/ansible_collections/containers/podman/plugins/ = plugins/*
|
||||
share/ansible/collections/ansible_collections/containers/podman/playbooks/ = playbooks/*
|
||||
share/ansible/collections/ansible_collections/containers/podman/scripts/ = scripts/*
|
||||
share/ansible/collections/ansible_collections/containers/podman/docs/ = docs/*
|
||||
share/ansible/collections/ansible_collections/containers/podman/meta/ = meta/*
|
||||
|
||||
[wheel]
|
||||
universal = 1
|
||||
|
||||
[pbr]
|
||||
skip_authors = True
|
||||
skip_changelog = True
|
||||
8
setup.py
Normal file
8
setup.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# Copyright Red Hat, Inc. All Rights Reserved.
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['pbr'],
|
||||
pbr=True)
|
||||
Loading…
Add table
Add a link
Reference in a new issue