github.com/flanksource/konfigadm@v0.12.0/CONTRIBUTING.md (about)

     1  # Contributing
     2  
     3  ## Signing the CLA
     4  
     5  Please sign the CLA over [here](https://cla-assistant.io/flanksource/konfigadm)
     6  before contributing. Link -
     7  
     8  https://cla-assistant.io/flanksource/konfigadm
     9  
    10  ## Developing
    11  
    12  Konfigadm is designed to make changes to the machine it runs on by default. This
    13  means that testing changes locally requires running within some sort of
    14  container or VM. This guide will use a systemd-nspawn container for rapid
    15  feedback. For running tests in the same way as the CI pipeline does, see 
    16  [Testing](#testing).
    17  
    18  ```
    19  sudo debootstrap buster /var/lib/machines/konfigadm-debian-buster/
    20  sudo systemd-nspawn -D /var/lib/machines/konfigadm-debian-buster/ --machine konfigadm
    21  ```
    22  
    23  This should present a console prompt on the container. Here we will configure
    24  the root password so that we can boot the container later. You can close the
    25  container by pressing `Ctrl + ]]]`.
    26  
    27  ```
    28  passwd
    29  ```
    30  
    31  Back on the host, run the following from within the Kubeadm directory to boot
    32  the container so that Konfigadm can run:
    33  
    34  ```
    35  make linux
    36  sudo systemd-nspawn -D /var/lib/machines/konfigadm-debian-stable --machine konfigadm --bind-ro $(pwd):/opt/konfigadm
    37  cd /opt/konfigadm
    38  .bin/konfigadm --help
    39  ```
    40  
    41  Now you can make changes and build locally and then run the resulting binary
    42  within the container to verify progress.
    43  
    44  ## Testing
    45  
    46  Make sure both unit and integration tests pass:
    47  
    48  ```bash
    49  make
    50  ```
    51  
    52  You can run unit tests only via:
    53  
    54  ```bash
    55  make test
    56  ```
    57  
    58  And only integration tests via:
    59  
    60  ```bash
    61  make e2e-all
    62  ```