Skip to content

Latest commit

 

History

History
105 lines (71 loc) · 2.44 KB

DEVELOPER.md

File metadata and controls

105 lines (71 loc) · 2.44 KB

Development Guide

Table of contents:

Make sure to checkout the official developer guide for developing collections.

Prerequisites

Get the code

Ansible requires that collections are stored in {...}/ansible_collections/NAMESPACE/COLLECTION_NAME path. Therefore to be able to run tests, clone this repository to {arbitrary path}/ansible_collections/delinea/core.

Example with using home directory:

mkdir -p ~/ansible_collections/delinea/core
git clone [email protected]:DelineaXPM/ansible-core-collection.git ~/ansible_collections/delinea/core
cd ~/ansible_collections/delinea/core

Development

Configure pre-commit:

python3 -m pip install pre-commit --user && pre-commit install && pre-commit

We use Mage build tool to automate most of the tasks related to development. Mage is installed by aqua manager.

Create a new virtual environment and install ansible:

mage init

Run unit and sanity tests:

mage test

To list all available mage targets run mage -l.

Release

Follow this link to open the delinea.core collection in Ansible Galaxy hub.

  1. Bump a new version. Available arguments are "patch", "minor" and "major":

    mage bump "patch"
  2. Update installation instructions in README.md.

  3. Write a release summary:

    mage changelog
  4. Build the collection:

    mage build

    As a result a new archive will be generated (e.g. delinea-core-1.0.0.tar.gz) in the artifacts directory (.artifacts/).

  5. Publish the collection:

    mage publish

Run mage doctor to validate all the requirements for publishing are installed.