Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Run containers on ubuntu #1260

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Commits on Jul 31, 2024

  1. utils: Rewrite run-tests.sh to use functions and extenal scripts

    To modify Azure tests and depend on shell scripts and pytest instead
    of molecule, the run-tests.sh script has been rewritten to depend on
    bash functions and on a bash script that prepare and start a testing
    container.
    
    This patch adds a new script, 'utils/setup_test_container.sh' that
    can be used to start a new container, using either podman or docker,
    based on the available ansible-freeipa images. The new container can
    then be used to run ansible-freeipa tests against it.
    
    Also the following files with bash functions were added, and are
    used by both scripts:
    
        utils/shansible: Functions to run playbooks in the container
        utils/shcontainer: Functions to setup/run a container
        utils/shfun: Generic shell helper functions (e.g.: log)
    rjeffman committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    b8bf34e View commit details
    Browse the repository at this point in the history
  2. tests: Allow to set Python interpreter to be used by Ansible

    On some systems it is required or desired to run Ansible with a specific
    Python interpreter. This patch allows the selection of the Python binary
    to use for the pytest playbook tests by setting the environment variable
    IPA_PYTHON_PATH. Set it the the full path of the Python interpreter.
    rjeffman committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    cc43dd4 View commit details
    Browse the repository at this point in the history
  3. upstream ci: Remove 'molecule' from tests.

    This patch removes 'molecule' as a dependency for tests, by using the
    scripts under `utils` to setup the environment.
    
    By not using molecule, we have more flexibility on using either docker
    or podman as the container engine, and makes it easy to reproduce the
    environment on different distros, allowing for a more consistent error
    reproduction off Azure.
    rjeffman committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    d368529 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    007be4c View commit details
    Browse the repository at this point in the history
  5. ci lint: Allow ShellCheck to test source-d scripts.

    As the scripts 'utils/run-tests.sh' and 'utils/setup_test_container.sh'
    use some scripts as function libraries, this change forces shellcheck to
    also verify those scripts.
    rjeffman committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    34622ba View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1264774 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    737806e View commit details
    Browse the repository at this point in the history