Browse Source

Merge pull request #192 from myii/chore/standardise-structure

feat(yamllint): include for this repo and apply rules throughout
tags/v0.40.0
Niels Abspoel 5 years ago
parent
commit
ffc46b51ad
No account linked to committer's email address
4 changed files with 57 additions and 29 deletions
  1. +9
    -4
      .travis.yml
  2. +16
    -0
      .yamllint
  3. +29
    -25
      pillar.example
  4. +3
    -0
      test/integration/default/inspec.yml

+ 9
- 4
.travis.yml View File

--- ---
stages: stages:
- test - test
- commitlint
- lint
- name: release - name: release
if: branch = master AND type != pull_request if: branch = master AND type != pull_request




jobs: jobs:
include: include:
# Define the commitlint stage
- stage: commitlint
# Define the `lint` stage (runs `yamllint` and `commitlint`)
- stage: lint
language: node_js language: node_js
node_js: lts/* node_js: lts/*
before_install: skip before_install: skip
script: script:
# Install and run `yamllint`
- pip install --user yamllint
# yamllint disable-line rule:line-length
- yamllint -s . .yamllint pillar.example test/salt/pillar/debian.sls test/salt/pillar/redhat.sls test/salt/pillar/suse.sls
# Install and run `commitlint`
- npm install @commitlint/config-conventional -D - npm install @commitlint/config-conventional -D
- npm install @commitlint/travis-cli -D - npm install @commitlint/travis-cli -D
- commitlint-travis - commitlint-travis
# Define the release stage that runs semantic-release
# Define the release stage that runs `semantic-release`
- stage: release - stage: release
language: node_js language: node_js
node_js: lts/* node_js: lts/*

+ 16
- 0
.yamllint View File

# -*- coding: utf-8 -*-
# vim: ft=yaml
---
# Extend the `default` configuration provided by `yamllint`
extends: default

# Files to ignore completely
# 1. All YAML files under directory `node_modules/`, introduced during the Travis run
ignore: |
node_modules/

rules:
line-length:
# Increase from default of `80`
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
max: 88

+ 29
- 25
pillar.example View File

# -*- coding: utf-8 -*-
# vim: ft=yaml
---
## php.ng pillar examples ## php.ng pillar examples


php: php:
# Use the following values to mute deprecation warnings # Use the following values to mute deprecation warnings
warning_messages: #
v1.0.0: #
mute_critical: True #
mute_upcoming: True #
warning_messages:
v1.0.0:
mute_critical: true
mute_upcoming: true
# Use external repository instead the default (only Ubuntu family) # Use external repository instead the default (only Ubuntu family)
use_external_repo: True
use_external_repo: true
# Set the external repository name (valid only if use_external_repo is not none) # Set the external repository name (valid only if use_external_repo is not none)
external_repo_name: 'ondrej/php' external_repo_name: 'ondrej/php'
# Use Software Collections Repository offering PHP 5.4, 5.5, 5.6, 7.0 and 7.1 # Use Software Collections Repository offering PHP 5.4, 5.5, 5.6, 7.0 and 7.1
# https://www.softwarecollections.org/en/ for more information. # https://www.softwarecollections.org/en/ for more information.
# SCL is only supported on RHEL and CentOS and only active when using php.ng # SCL is only supported on RHEL and CentOS and only active when using php.ng
use_scl_repo: True
use_scl_repo: true
# Which PHP version from the SCL repos to use # Which PHP version from the SCL repos to use
scl_php_version: 71 scl_php_version: 71
# Set the MongoDB driver version. You can specify (optionally) the driver version # Set the MongoDB driver version. You can specify (optionally) the driver version
# to pass forward special arguments to the pkg.installed call # to pass forward special arguments to the pkg.installed call
# you MUST include the name argument for this to work # you MUST include the name argument for this to work
cli: cli:
-
name: php-cli
fromrepo: my-specialrepo
-
name: php-common
skip_verify: True
-
name: php-cli
fromrepo: my-specialrepo
-
name: php-common
skip_verify: true


# php-fpm os-specific settings # php-fpm os-specific settings
fpm: fpm:


# settings for the php-fpm service # settings for the php-fpm service
service: service:
# if True, enables the php-fpm service, if False disables it
enabled: True
# if true, enables the php-fpm service, if false disables it
enabled: true
# additional arguments passed forward to # additional arguments passed forward to
# service.enabled/disabled # service.enabled/disabled
opts: opts:
reload: True
reload: true


# settings for the relevant php-fpm configuration files # settings for the relevant php-fpm configuration files
config: config:
ini: ini:
# arguments passed through to file.managed # arguments passed through to file.managed
opts: opts:
recurse: True
recurse: true
# php.ini file contents that will be merged with the # php.ini file contents that will be merged with the
# defaults in php.ng.ini.defaults. See php.ng.ini.defaults for # defaults in php.ng.ini.defaults. See php.ng.ini.defaults for
# syntax guidelines. # syntax guidelines.
conf: conf:
# arguments passed through to file.managed # arguments passed through to file.managed
opts: opts:
recurse: True
recurse: true
# php-fpm conf file contents that will be merged with # php-fpm conf file contents that will be merged with
# php.ng.lookup.fpm.defaults. See php.ng.ini.defaults for # php.ng.lookup.fpm.defaults. See php.ng.ini.defaults for
# ini-style syntax guidelines. # ini-style syntax guidelines.


# settings for fpm-pools # settings for fpm-pools
pools: pools:
# defaults will apply for each pools settings and can be overwritten by pool settings
# defaults will apply for each pools settings and can be overwritten
# by pool settings
defaults: defaults:
user: nginx user: nginx
group: nginx group: nginx
# name of the pool file to be managed, this will be appended # name of the pool file to be managed, this will be appended
# to the path specified in php.ng.lookup.fpm.pools # to the path specified in php.ng.lookup.fpm.pools
'mypool.conf': 'mypool.conf':
# If true, the pool file will be managed, if False it will be
# If true, the pool file will be managed, if false it will be
# absent # absent
enabled: True
enabled: true


# Overwrite the filename for ext_pillar that doesn't allow # Overwrite the filename for ext_pillar that doesn't allow
# dots in fields names. # dots in fields names.


# arguments passed forward to file.managed or file.absent # arguments passed forward to file.managed or file.absent
opts: opts:
replace: False
replace: false


# pool file contents. See php.ng.ini.defaults for ini-style # pool file contents. See php.ng.ini.defaults for ini-style
# syntax guidelines. # syntax guidelines.
ini: ini:
# opts passed forward directly to file.managed # opts passed forward directly to file.managed
opts: opts:
replace: False
replace: false
# contents of the php.ini file that are merged with defaults # contents of the php.ini file that are merged with defaults
# from php.ng.ini.defaults. See php.ng.ini.defaults for ini-style # from php.ng.ini.defaults. See php.ng.ini.defaults for ini-style
# syntax guidelines # syntax guidelines
# its contents will be joined by commas in final rendering. # its contents will be joined by commas in final rendering.
defaults: defaults:
PHP: PHP:
engine: on
engine: 'On'
output_buffering: 4096 output_buffering: 4096
disable_functions: disable_functions:
- pcntl_alarm - pcntl_alarm
- mysql - mysql


# When using php.ng.apache2 on FreeBSD: # When using php.ng.apache2 on FreeBSD:
# Set this to False if you're not using apache-formula
use_apache_formula: True
# Set this to false if you're not using apache-formula
use_apache_formula: true

+ 3
- 0
test/integration/default/inspec.yml View File

# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: default name: default
title: php formula title: php formula
maintainer: SaltStack Formulas maintainer: SaltStack Formulas

Loading…
Cancel
Save