Filip Pytloun | 2b6014f | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 1 | |
| 2 | =========== |
| 3 | Git formula |
| 4 | =========== |
| 5 | |
| 6 | Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. |
| 7 | |
| 8 | Sample pillars |
| 9 | ============== |
| 10 | |
| 11 | .. code-block:: yaml |
| 12 | |
| 13 | Simplest GIT setup |
| 14 | |
| 15 | git: |
| 16 | client: |
| 17 | enabled: true |
| 18 | |
| 19 | GIT with user setup |
| 20 | |
| 21 | .. code-block:: yaml |
| 22 | |
| 23 | git: |
| 24 | client: |
| 25 | enabled: true |
| 26 | user: |
| 27 | - user: |
| 28 | name: jdoe |
| 29 | email: j@doe.com |
| 30 | |
| 31 | Reclass with GIT with user setup |
| 32 | |
| 33 | .. code-block:: yaml |
| 34 | |
| 35 | git: |
| 36 | client: |
| 37 | enabled: true |
| 38 | user: |
| 39 | - user: ${linux:system:user:jdoe} |
| 40 | |
| 41 | Read more |
| 42 | ========= |
| 43 | |
| 44 | * http://git-scm.com/ |
| 45 | * http://git-scm.com/book/en/Customizing-Git-Git-Configuration |
| 46 | * https://github.com/nesi/puppet-git/tree/master/manifests |
Petr Michalec | 57dcfb7 | 2017-01-10 23:53:54 +0100 | [diff] [blame^] | 47 | |
| 48 | Development and testing |
| 49 | ======================= |
| 50 | |
| 51 | Development and test workflow with `Test Kitchen <http://kitchen.ci>`_ and |
| 52 | `kitchen-salt <https://github.com/simonmcc/kitchen-salt>`_ provisioner plugin. |
| 53 | |
| 54 | Test Kitchen is a test harness tool to execute your configured code on one or more platforms in isolation. |
| 55 | There is a ``.kitchen.yml`` in main directory that defines *platforms* to be tested and *suites* to execute on them. |
| 56 | |
| 57 | Kitchen CI can spin instances locally or remote, based on used *driver*. |
| 58 | For local development ``.kitchen.yml`` defines a `vagrant <https://github.com/test-kitchen/kitchen-vagrant>`_ or |
| 59 | `docker <https://github.com/test-kitchen/kitchen-docker>`_ driver. |
| 60 | |
| 61 | To use backend drivers or implement your CI follow the section `INTEGRATION.rst#Continuous Integration`__. |
| 62 | |
| 63 | A listing of scenarios to be executed: |
| 64 | |
| 65 | .. code-block:: shell |
| 66 | |
| 67 | $ kitchen list |
| 68 | |
| 69 | Instance Driver Provisioner Verifier Transport Last Action |
| 70 | |
| 71 | client-single-ubuntu-1404 Vagrant SaltSolo Inspec Ssh <Not Created> |
| 72 | client-single-ubuntu-1604 Vagrant SaltSolo Inspec Ssh <Not Created> |
| 73 | client-single-centos-71 Vagrant SaltSolo Inspec Ssh <Not Created> |
| 74 | |
| 75 | The `Busser <https://github.com/test-kitchen/busser>`_ *Verifier* is used to setup and run tests |
| 76 | implementated in `<repo>/test/integration`. It installs the particular driver to tested instance |
| 77 | (`Serverspec <https://github.com/neillturner/kitchen-verifier-serverspec>`_, |
| 78 | `InSpec <https://github.com/chef/kitchen-inspec>`_, Shell, Bats, ...) prior the verification is executed. |
| 79 | |
| 80 | |
| 81 | Usage: |
| 82 | |
| 83 | .. code-block:: shell |
| 84 | |
| 85 | # list instances and status |
| 86 | kitchen list |
| 87 | |
| 88 | # manually execute integration tests |
| 89 | kitchen [test || [create|converge|verify|exec|login|destroy|...]] [instance] -t tests/integration |
| 90 | |
| 91 | # use with provided Makefile (ie: within CI pipeline) |
| 92 | make kitchen |
| 93 | |