diff --git a/.travis.yml b/.travis.yml index 35fe102..496e2df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,31 +54,40 @@ jobs: - npm i -D @commitlint/config-conventional @commitlint/travis-cli - commitlint-travis - # Interrogate - # - pip install --user interrogate - # - interrogate . ## Define the rest of the matrix based on Kitchen testing # Make sure the instances listed below match up with # the `platforms` defined in `kitchen.yml` + # NOTE: Please try to select up to six instances that add some meaningful + # testing of the formula's behaviour. If possible, try to refrain from + # the classical "chosing all the instances because I want to test on + # another/all distro/s" trap: it will just add time to the testing (see + # the discussion on #121). As an example, the set chosen below covers + # the most used distros families, systemd and non-systemd and the latest + # three supported Saltstack versions with python2 and 3. + # As for `kitchen.yml`, that should still contain all of the platforms, + # to allow for comprehensive local testing + # Ref: https://github.com/saltstack-formulas/template-formula/issues/118 + # Ref: https://github.com/saltstack-formulas/template-formula/issues/121 - env: INSTANCE=default-debian-10-master-py3 - - env: INSTANCE=default-ubuntu-1804-master-py3 - # env: INSTANCE=repo-ubuntu-1804-master-py3 - - env: INSTANCE=repo-centos-8-master-py3 - - env: INSTANCE=default-fedora-31-master-py3 - # - env: INSTANCE=default-opensuse-leap-151-master-py3 - - env: INSTANCE=default-amazonlinux-2-master-py3 - # - env: INSTANCE=default-debian-10-3000-2-py3 - # - env: INSTANCE=default-debian-9-3000-2-py3 - # - env: INSTANCE=default-ubuntu-1804-3000-2-py3 - # - env: INSTANCE=default-centos-8-3000-2-py3 - # - env: INSTANCE=default-centos-7-3000-2-py3 - # - env: INSTANCE=default-fedora-31-3000-2-py3 - # - env: INSTANCE=default-opensuse-leap-151-3000-2-py3 - # - env: INSTANCE=default-amazonlinux-2-3000-2-py3 - # - env: INSTANCE=default-ubuntu-1804-3000-2-py2 - # - env: INSTANCE=default-ubuntu-1604-3000-2-py2 - # - env: INSTANCE=arch-arch-base-latest-3000-2-py2 + # env: INSTANCE=default-ubuntu-2004-master-py3 + # - env: INSTANCE=default-ubuntu-1804-master-py3 + - env: INSTANCE=default-centos-8-master-py3 + # env: INSTANCE=default-fedora-32-master-py3 + # - env: INSTANCE=default-fedora-31-master-py3 + # - env: INSTANCE=default-opensuse-leap-152-master-py3 + # - env: INSTANCE=default-amazonlinux-2-master-py3 + # - env: INSTANCE=default-debian-10-3000-3-py3 + # - env: INSTANCE=default-debian-9-3000-3-py3 + # - env: INSTANCE=default-ubuntu-1804-3000-3-py3 + # - env: INSTANCE=default-centos-8-3000-3-py3 + # - env: INSTANCE=default-centos-7-3000-3-py3 + # - env: INSTANCE=default-fedora-31-3000-3-py3 + # env: INSTANCE=default-opensuse-leap-152-3000-3-py3 + # env: INSTANCE=default-amazonlinux-2-3000-3-py3 + # - env: INSTANCE=default-ubuntu-1804-3000-3-py2 + # - env: INSTANCE=default-ubuntu-1604-3000-3-py2 + # - env: INSTANCE=default-arch-base-latest-3000-3-py2 # - env: INSTANCE=default-debian-10-2019-2-py3 # - env: INSTANCE=default-debian-9-2019-2-py3 # - env: INSTANCE=default-ubuntu-1804-2019-2-py3 @@ -86,7 +95,7 @@ jobs: # - env: INSTANCE=default-centos-8-2019-2-py3 # - env: INSTANCE=default-centos-7-2019-2-py3 # - env: INSTANCE=default-fedora-31-2019-2-py3 - # - env: INSTANCE=default-opensuse-leap-151-2019-2-py3 + # - env: INSTANCE=default-opensuse-leap-152-2019-2-py3 # - env: INSTANCE=default-amazonlinux-2-2019-2-py3 # - env: INSTANCE=default-centos-6-2019-2-py2 # - env: INSTANCE=default-amazonlinux-1-2019-2-py2 @@ -117,15 +126,3 @@ jobs: edge: true # Run `semantic-release` script: 'npx semantic-release@15.14' - -# Notification options: `always`, `never` or `change` -notifications: - webhooks: - if: 'repo = saltstack-formulas/prometheus-formula' - urls: - - https://saltstack-formulas.zulipchat.com/api/v1/external/travis?api_key=HsIq3o5QmLxdnVCKF9is0FUIpkpAY79P&stream=CI&topic=saltstack-formulas%2Fprometheus-formula&ignore_pull_requests=true - on_success: always # default: always - on_failure: always # default: always - on_start: always # default: never - on_cancel: always # default: always - on_error: always # default: always diff --git a/AUTHORS.md b/AUTHORS.md deleted file mode 100644 index d37f039..0000000 --- a/AUTHORS.md +++ /dev/null @@ -1,10 +0,0 @@ -# Authors - -This list is sorted by the number of commits per contributor in _descending_ order. - -Avatar|Contributor|Contributions -:-:|---|:-: -@noelmcloughlin|[@noelmcloughlin](https://github.com/noelmcloughlin)|1 - ---- - diff --git a/CODEOWNERS b/CODEOWNERS index a24377d..586305f 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -2,8 +2,7 @@ # SECTION: Owner(s) for everything in the repo, unless a later match takes precedence # FILE PATTERN OWNER(S) -* @alxwr -* @noelmcloughlin +* @alxwr @noelmcloughlin # SECTION: Owner(s) for specific directories # FILE PATTERN OWNER(S) diff --git a/FORMULA b/FORMULA index 2970d20..2f98006 100644 --- a/FORMULA +++ b/FORMULA @@ -1,7 +1,7 @@ name: prometheus os: Debian, Ubuntu, Raspbian, RedHat, Fedora, CentOS, Amazon, Suse, openSUSE, Gentoo, Funtoo, Arch, Manjaro, Alpine, FreeBSD, OpenBSD, Solaris, SmartOS, Windows, MacOS os_family: Debian, RedHat, Suse, Gentoo, Arch, Alpine, FreeBSD, OpenBSD, Solaris, Windows, MacOS -version: 0.2.2 +version: 3.3.0 release: 1 minimum_version: 2019.2 summary: prometheus formula diff --git a/bin/kitchen b/bin/kitchen index 15ed088..dcfdb4c 100755 --- a/bin/kitchen +++ b/bin/kitchen @@ -18,8 +18,11 @@ if File.file?(bundle_binstub) if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ load(bundle_binstub) else - abort('Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, & run cmd again') + abort( + 'Your `bin/bundle` was not generated by Bundler, '\ + 'so this binstub cannot run. Replace `bin/bundle` by running '\ + '`bundle binstubs bundler --force`, then run this command again.' + ) end end diff --git a/docs/AUTHORS.rst b/docs/AUTHORS.rst deleted file mode 100644 index 16bc996..0000000 --- a/docs/AUTHORS.rst +++ /dev/null @@ -1,86 +0,0 @@ -.. role:: raw-html-m2r(raw) - :format: html - - -Authors -======= - -This list is sorted by the number of commits per contributor in *descending* order. - -.. list-table:: - :header-rows: 1 - - * - Avatar - - Contributor - - Contributions - * - :raw-html-m2r:`@myii` - - `@myii `_ - - 155 - * - :raw-html-m2r:`@aboe76` - - `@aboe76 `_ - - 22 - * - :raw-html-m2r:`@javierbertoli` - - `@javierbertoli `_ - - 15 - * - :raw-html-m2r:`@n-rodriguez` - - `@n-rodriguez `_ - - 8 - * - :raw-html-m2r:`@gravyboat` - - `@gravyboat `_ - - 6 - * - :raw-html-m2r:`@alxwr` - - `@alxwr `_ - - 5 - * - :raw-html-m2r:`@daks` - - `@daks `_ - - 5 - * - :raw-html-m2r:`@evvers` - - `@evvers `_ - - 4 - * - :raw-html-m2r:`@nmadhok` - - `@nmadhok `_ - - 3 - * - :raw-html-m2r:`@vutny` - - `@vutny `_ - - 2 - * - :raw-html-m2r:`@k-hamza` - - `@k-hamza `_ - - 2 - * - :raw-html-m2r:`@puneetk` - - `@puneetk `_ - - 2 - * - :raw-html-m2r:`@andygabby` - - `@andygabby `_ - - 1 - * - :raw-html-m2r:`@Jokipii` - - `@Jokipii `_ - - 1 - * - :raw-html-m2r:`@johnkeates` - - `@johnkeates `_ - - 1 - * - :raw-html-m2r:`@duk3luk3` - - `@duk3luk3 `_ - - 1 - * - :raw-html-m2r:`@marco-m` - - `@marco-m `_ - - 1 - * - :raw-html-m2r:`@noelmcloughlin` - - `@noelmcloughlin `_ - - 1 - * - :raw-html-m2r:`@whiteinge` - - `@whiteinge `_ - - 1 - * - :raw-html-m2r:`@sroegner` - - `@sroegner `_ - - 1 - * - :raw-html-m2r:`@babilen5` - - `@babilen5 `_ - - 1 - * - :raw-html-m2r:`@GMAzrael` - - `@GMAzrael `_ - - 1 - - ----- - -Auto-generated by a `forked version `_ of `gaocegege/maintainer `_ on 2019-05-31. diff --git a/docs/CHANGELOG.rst b/docs/CHANGELOG.rst deleted file mode 100644 index e69de29..0000000 diff --git a/docs/CONTRIBUTING.rst b/docs/CONTRIBUTING.rst deleted file mode 100644 index 1179c5a..0000000 --- a/docs/CONTRIBUTING.rst +++ /dev/null @@ -1,186 +0,0 @@ -.. _contributing: - -How to contribute -================= - -This document will eventually outline all aspects of guidance to make your contributing experience a fruitful and enjoyable one. -What it already contains is information about *commit message formatting* and how that directly affects the numerous automated processes that are used for this repo. -It also covers how to contribute to this *formula's documentation*. - -.. contents:: **Table of Contents** - -Overview --------- - -Submitting a pull request is more than just code! -To achieve a quality product, the *tests* and *documentation* need to be updated as well. -An excellent pull request will include these in the changes, wherever relevant. - -Commit message formatting -------------------------- - -Since every type of change requires making Git commits, -we will start by covering the importance of ensuring that all of your commit -messages are in the correct format. - -Automation of multiple processes -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -This formula uses `semantic-release `_ for automating numerous processes such as bumping the version number appropriately, creating new tags/releases and updating the changelog. -The entire process relies on the structure of commit messages to determine the version bump, which is then used for the rest of the automation. - -Full details are available in the upstream docs regarding the `Angular Commit Message Conventions `_. -The key factor is that the first line of the commit message must follow this format: - -.. code-block:: - - type(scope): subject - - -* E.g. ``docs(contributing): add commit message formatting instructions``. - -Besides the version bump, the changelog and release notes are formatted accordingly. -So based on the example above: - -.. - - .. raw:: html - -

Documentation

- - * **contributing:** add commit message formatting instructions - - -* The ``type`` translates into a ``Documentation`` sub-heading. -* The ``(scope):`` will be shown in bold text without the brackets. -* The ``subject`` follows the ``scope`` as standard text. - -Linting commit messages in Travis CI -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -This formula uses `commitlint `_ for checking commit messages during CI testing. -This ensures that they are in accordance with the ``semantic-release`` settings. - -For more details about the default settings, refer back to the ``commitlint`` `reference rules `_. - -Relationship between commit type and version bump -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -This formula applies some customisations to the defaults, as outlined in the table below, -based upon the `type `_ of the commit: - -.. list-table:: - :name: commit-type-vs-version-bump - :header-rows: 1 - :stub-columns: 0 - :widths: 1,2,3,1,1 - - * - Type - - Heading - - Description - - Bump (default) - - Bump (custom) - * - ``build`` - - Build System - - Changes related to the build system - - – - - - * - ``chore`` - - – - - Changes to the build process or auxiliary tools and libraries such as - documentation generation - - – - - - * - ``ci`` - - Continuous Integration - - Changes to the continuous integration configuration - - – - - - * - ``docs`` - - Documentation - - Documentation only changes - - – - - 0.0.1 - * - ``feat`` - - Features - - A new feature - - 0.1.0 - - - * - ``fix`` - - Bug Fixes - - A bug fix - - 0.0.1 - - - * - ``perf`` - - Performance Improvements - - A code change that improves performance - - 0.0.1 - - - * - ``refactor`` - - Code Refactoring - - A code change that neither fixes a bug nor adds a feature - - – - - 0.0.1 - * - ``revert`` - - Reverts - - A commit used to revert a previous commit - - – - - 0.0.1 - * - ``style`` - - Styles - - Changes that do not affect the meaning of the code (white-space, - formatting, missing semi-colons, etc.) - - – - - 0.0.1 - * - ``test`` - - Tests - - Adding missing or correcting existing tests - - – - - 0.0.1 - -Use ``BREAKING CHANGE`` to trigger a ``major`` version change -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Adding ``BREAKING CHANGE`` to the footer of the extended description of the commit message will **always** trigger a ``major`` version change, no matter which type has been used. -This will be appended to the changelog and release notes as well. -To preserve good formatting of these notes, the following format is prescribed: - -* ``BREAKING CHANGE: .`` - -An example of that: - -.. code-block:: git - - ... - - BREAKING CHANGE: With the removal of all of the `.sls` files under - `template package`, this formula no longer supports the installation of - packages. - - -Semantic release formulas -------------------------- - -These formulas are already compatible with semantic-release: - -* `bind-formula `_ -* `cert-formula `_ -* `chrony-formula `_ -* `collectd-formula `_ -* `fail2ban-formula `_ -* `keepalived-formula `_ -* `nginx-formula `_ -* `postgres-formula `_ -* `prometheus-formula `_ -* `rkhunter-formula `_ -* `salt-formula `_ -* `syslog-ng-formula `_ -* `systemd-formula `_ -* `ufw-formula `_ -* `vault-formula `_ - - -Documentation -------------- - -`Documentation contributing guidelines `_ diff --git a/docs/CONTRIBUTING_DOCS.rst b/docs/CONTRIBUTING_DOCS.rst deleted file mode 100644 index 5b59b29..0000000 --- a/docs/CONTRIBUTING_DOCS.rst +++ /dev/null @@ -1,96 +0,0 @@ -.. _contributing_docs: - -Contributing documentation -========================== - -|docs| - -.. |docs| image:: https://readthedocs.org/projects/docs/badge/?version=latest - :alt: Documentation Status - :scale: 100% - :target: https://template-formula.readthedocs.io/en/latest/?badge=latest - -Toolchain -^^^^^^^^^ - -The documentation for this formula is written in -`reStructuredText `_ -(also known as RST, ReST, or reST). -It is built by -`Sphinx `_ -and hosted on -`Read the Docs `_. - -Adding a new page -^^^^^^^^^^^^^^^^^ - -Adding a new page involves two steps: - -#. Use the - :ref:`provided page template ` - to create a new page. -#. Add the page name under the ``toctree`` list in ``index.rst``. - - a. Do not just append it to the list. - #. Select the best place where it fits within the overall documentation. - -SaltStack-Formulas' RST page template -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _saltstack_formulas_rst_page_template - -Use the following template when creating a new page. -This ensures consistency across the documentation for this formula. -The heading symbols have been selected in accordance to the output rendered by the -`Markdown to reStructuredText converter `_ -we are using for some of the pages of this documentation. - -.. code-block:: rst - - .. _template: - - [Page title] - ============ - - [Introductory paragraph] - - .. contents:: **Table of Contents** - - [Heading 2] - ----------- - - [Heading 3] - ^^^^^^^^^^^ - - [Heading 4] - ~~~~~~~~~~~ - - [Heading 5] - """"""""""" - - [Heading 6] - ########### - -#. The first line is an anchor that can be used to link back to (the top of) - this file. - - a. Change this to be the lowercase version of the file name. - #. Do not include the ``.rst`` file extension. - #. Use hyphens (``-``) instead of spaces or non-letter characters. - -#. Change the ``[Page title]`` accordingly, matching the same number of equals - signs (``=``) underneath. -#. Change the ``[Introductory paragraph]`` to be a short summary of the page - content. - Use no more than three paragraphs for this. -#. Leave the ``..contents:: **Table of Contents**`` line as it is. -#. Use the remaining headings as required to break up the page content. - - a. You will rarely need to use beyond ``[Heading 4]``. - #. Again, no single heading should have more than about three paragraphs of - content before the next heading or sub-heading is used. - -Obviously, it is not necessary to follow the steps in the order above. -For example, it is usually easier to write the ``[Introductory paragraph]`` -at the end. -