Skip to content
Snippets Groups Projects
  1. Sep 08, 2022
  2. Sep 06, 2022
  3. Sep 03, 2022
    • Rafael Guterres Jeffman's avatar
      upstream CI: run PR tests only for affected plugins · 25141584
      Rafael Guterres Jeffman authored
      The current workflow for bug fixing or new enhancements in
      ansible-freeipa includes running Ansible playbooks tests for all the
      available plugins for every pull request, even for contained
      modifications.
      
      This patch creates a new workflow for pull requests where only the
      affected plugins are tested in the PR. Changes that might affect other
      parts of the code will trigger tests for the parts affected.
      
      A utility script, utils/filter_tests, is used to set the variables
      IPA_ENABLED_MODULES and IPA_ENABLED_TESTS before executing the tests,
      effectively limiting which tests are executed. The script uses the
      python plugin 'utils/filter_plugins.py' which lists all test modules
      that should be executed for a list of modified source files.
      
      Tests are selected for execution based on the plugin name. For example,
      a change to 'plugins/modules/ipalocation.py' would trigger all playbook
      tests under 'tests/location'. If a test playbook is modified, it is
      scheduled to be executed. Changes to any file under
      'plugins/module_utils' will force the execution of all tests, since any
      module might be affected by that change.
      
      The nature of the change is not evaluated, so a simple typo fix of a
      comment in a file under 'plugins/module_utils' would still schedule all
      test playbooks to be executed.
      
      For roles, any file changed under the role directory would set the role
      to be included in the tests. Playbook tests for roles must be created
      under 'tests/<rolename>_role', where role name in the name of the role
      without 'ipa', for example, the 'ipabackup' role test playbooks would
      be stored under 'tests/backup_role'.
      
      Since there is the possibility that the list of tests to be executed
      might be less than the number of tests groups used (3), a new pytest
      dependency was added, pytest-custom_exit_code, so that having no tests
      to run isn't a test failure.
      
      A new pipeline on Azure needs to be created to use the new test script.
      25141584
  4. Aug 31, 2022
  5. Aug 30, 2022
  6. Aug 26, 2022
  7. Aug 24, 2022
  8. Jun 14, 2022
    • Rafael Guterres Jeffman's avatar
      build-galaxy-release: Automatically create CHANGELOG. · d82abdbe
      Rafael Guterres Jeffman authored
      Recent versions of ansible-test require the existence of a CHANGELOG
      file in the root of the collection. This changes extracts the changes
      of the latest available release tag using `utils/changelog` and create
      the CHANGELOG file with the result of the command.
      
      The generated changelog will include the changes for the latest release
      and, if present, the available changes that were not part of a release.
      d82abdbe
    • Thomas Woerner's avatar
      utils/changelog: Fixed --tag option, new --galaxy option · 8b8cbdd8
      Thomas Woerner authored
      The --tag TAG option is now printing the changes for the given TAG and
      not since the given tag. The new option --galaxy is printing the changelog
      since the latest tag and also for the latest tag.
      
      These changes are simplifying the generation of the changelog file that
      is needed to pass the tests for galaxy and AutomationHub collections.
      8b8cbdd8
  9. May 12, 2022
    • Thomas Woerner's avatar
      utils/build-galaxy-release.sh: Add "-i" to install generated collection · 1ec0d1e6
      Thomas Woerner authored
      The "-i" option can be used to install the generated collection using
      the ansible-galaxy collection install command. It is using the force
      flag to install the collection if there is already a collection with the
      same name and namespace. The ansible-galaxy collection build command is
      already using the force flag to create the collection.
      1ec0d1e6
  10. Apr 12, 2022
  11. Feb 17, 2022
  12. Feb 14, 2022
  13. Jan 12, 2022
    • Rafael Guterres Jeffman's avatar
      pylint: Enable pylint for ansible-freeipa roles. · ce8487e3
      Rafael Guterres Jeffman authored
      This patch enables pylint evaluation for ansible-freeipa roles in
      both the local script 'utils/lint-check.sh' and in upstream CI.
      ce8487e3
    • Thomas Woerner's avatar
      build-galaxy-release.sh: Use build dir, new options, checks, no reset · de8d7246
      Thomas Woerner authored
      The script is now using a build dir for the creation of the Ansible
      Collection. Additionally only files known to the fit repo are pulled in
      by default. The new "-a" option is pulling in all files from local repo.
      The new -k" option can be used to keep the build dir for verification of
      the changes to the files.
      
      The colleciton is placed into the main repo dir and no git reset --hard
      is used in the repo to preserve local changes.
      de8d7246
  14. Dec 23, 2021
  15. Dec 14, 2021
  16. Nov 25, 2021
  17. Nov 24, 2021
  18. Oct 12, 2021
  19. Oct 11, 2021
  20. Oct 04, 2021
  21. Sep 29, 2021
    • Rafael Guterres Jeffman's avatar
      Make ansible-lint and yamllint use more strict rules. · e069395b
      Rafael Guterres Jeffman authored
      This patch modifies configuration of both ansible-lint and yamllint
      to check for more rules, resulting in a more strict verification.
      
      For ansible-lint verification of errors 301, 305 and 505 are skipped,
      due to false positives. For the same reason, 'experimental' rules
      are skipped.
      
      ansible-lint error 306 is skipped since the fix is to set pipefail,
      which is not available in all shells (for example dash, which runs
      ansible-freeipa CI).
      
      Yamllint disabled rules (comments, and indentation) would introduce a
      huge amount of small changes, and are left for future changes, it
      deemed necessary.
      e069395b
  22. Sep 27, 2021
  23. Sep 08, 2021
  24. Sep 01, 2021
    • Thomas Woerner's avatar
      ipamodule[+member].py.in: Use IPAAnsibleModule class, reduce calls · b4d39dfd
      Thomas Woerner authored
      Use IPAAnsibleModule and ipamodule_base_docs in the templates of
      utils/new_module.
      
      ipaadmin_password lines in the examples have been added, ipaadmin_
      variables are handled by IPAAnsibleModule, ansible_module.params_get is
      used to get the parameters and ansible_module.ipa_connect is used to
      simplify the module.
      
      ipamodule+member.py.in is additionally using gen_add_list and
      gen_intersection_list to reduce the command calls to the changes only.
      b4d39dfd
    • Rafael Guterres Jeffman's avatar
      templates: Use `become: no` in playbooks by default. · e38c3497
      Rafael Guterres Jeffman authored
      ansible-freeipa modules should work without superuser privileges in
      most cases, and to reflect this, the module tests should avoid using
      `become: yes`.
      
      This PR change the test playbook templates to use `become: no` by
      default, so only modules that require superuser privileges will need
      to change this variable.
      e38c3497
  25. Aug 24, 2021
    • Thomas Woerner's avatar
      New ipamodule_base_vars · 7a665bdb
      Thomas Woerner authored
      There are common parameters in all modules like ipaadmin_principal and
      ipaadmin_password. As this list of common parameters will be extended
      soon, there is a need to reduce the code and documentation duplicates.
      
      A ModuleDocFragment is added to provide the module documentation for the
      common parameters. This is used in the modules with
      extends_documentation_fragment.
      
      ansible_freeipa_module has additional ipamodule_base_spec and
      get_ipamodule_base_vars. ipamodule_base_spec extends argument_spec in
      the module and get_ipamodule_base_vars is used to return a dict
      containing the common parameters.
      7a665bdb
Loading