1
0
Fork 0
mirror of synced 2024-12-21 21:51:09 -05:00

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

feat(yamllint): include for this repo and apply rules throughout
This commit is contained in:
Niels Abspoel 2019-08-10 21:39:51 +02:00 committed by GitHub
commit f60dec4c5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 55 additions and 26 deletions

View file

@ -3,7 +3,7 @@
--- ---
stages: stages:
- test - test
- commitlint - lint
- name: release - name: release
if: branch = master AND type != pull_request if: branch = master AND type != pull_request
@ -45,16 +45,21 @@ script:
jobs: jobs:
include: include:
# Define the commitlint stage # Define the `lint` stage (runs `yamllint` and `commitlint`)
- stage: 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
# 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
.yamllint Normal file
View file

@ -0,0 +1,16 @@
# -*- 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

View file

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# vim: ft=yaml # vim: ft=yaml
---
logrotate: logrotate:
pkg: logrotate pkg: logrotate
conf_file: '/etc/logrotate.conf' conf_file: '/etc/logrotate.conf'
@ -8,9 +8,8 @@ logrotate:
user: root user: root
group: root group: root
service: cron service: cron
login_records_jobs: True login_records_jobs: true
default_config: default_config:
weekly: True weekly: true
rotate: 4 rotate: 4
create: True create: true

View file

@ -1,19 +1,22 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
Arch: Arch:
service: logrotate.timer service: logrotate.timer
default_config: default_config:
tabooext: + .pacorig .pacnew .pacsave tabooext: + .pacorig .pacnew .pacsave
Debian: Debian:
default_config: default_config:
compress: True compress: true
RedHat: RedHat:
pkg: cronie pkg: cronie
service: crond service: crond
default_config: default_config:
dateext: True dateext: true
Suse: Suse:
login_records_jobs: False login_records_jobs: false
default_config: default_config:
dateext: True dateext: true
compresscmd: /usr/bin/xz compresscmd: /usr/bin/xz
uncompresscmd: /usr/bin/xzdec uncompresscmd: /usr/bin/xzdec
Gentoo: Gentoo:
@ -21,7 +24,7 @@ Gentoo:
service: cronie service: cronie
default_config: default_config:
tabooext: + .keep tabooext: + .keep
dateext: True dateext: true
FreeBSD: FreeBSD:
conf_file: /usr/local/etc/logrotate.conf conf_file: /usr/local/etc/logrotate.conf
include_dir: /usr/local/etc/logrotate.d include_dir: /usr/local/etc/logrotate.d

View file

@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
Ubuntu: Ubuntu:
default_config: default_config:
su: root syslog su: root syslog

View file

@ -1,16 +1,17 @@
# vim: sts=2 ts=2 sw=2 et ai # -*- coding: utf-8 -*-
# vim: ft=yaml
---
logrotate: logrotate:
# default OS values can be overridden in 'lookup' dict # default OS values can be overridden in 'lookup' dict
#lookup: # lookup:
#pkg: logrotate # pkg: logrotate
#service: crond # service: crond
default_config: default_config:
weekly: True weekly: true
rotate: 52 rotate: 52
create: True create: true
compress: True compress: true
dateext: True dateext: true
jobs: jobs:
/tmp/var/log/mysql/error: /tmp/var/log/mysql/error:
config: config:
@ -66,4 +67,3 @@ logrotate:
invoke-rc.d nginx rotate >/dev/null 2>&1 invoke-rc.d nginx rotate >/dev/null 2>&1
endscript endscript
} }

View file

@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: default name: default
title: logrotate formula title: logrotate formula
maintainer: SaltStack Formulas maintainer: SaltStack Formulas