Skip to content

Commit

Permalink
feat(formula): add arvados-formula (forked into org)
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed May 5, 2020
1 parent 6f6c3b5 commit a7cf829
Show file tree
Hide file tree
Showing 6 changed files with 426 additions and 8 deletions.
1 change: 1 addition & 0 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ssf:
- apache
- apt
- apt-cacher
- arvados
- bind
- cert
- chrony
Expand Down
40 changes: 38 additions & 2 deletions ssf/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ ssf_node_anchors:
# An alternative method could be to use:
# `git describe --abbrev=0 --tags`
# yamllint disable rule:line-length rule:quoted-strings
title: "chore(codeowners): add global codeowner [skip ci]"
body: '* Automated using https://github.com/myii/ssf-formula/pull/175'
title: "feat(semantic-release): standardise for this formula"
body: '* Automated using https://github.com/myii/ssf-formula/pull/176'
# yamllint enable rule:line-length rule:quoted-strings
github:
owner: 'saltstack-formulas'
Expand Down Expand Up @@ -308,6 +308,42 @@ ssf:
<<: *isk_suite_default
name: ''
apt-cacher: *formula_default
arvados:
<<: *formula_default
context:
<<: *context_default
inspec_suites_kitchen:
<<: *isk_default
0:
<<: *isk_suite_default
name: 'api'
1:
<<: *isk_suite_default
name: 'controller'
2:
<<: *isk_suite_default
name: 'keepproxy'
3:
<<: *isk_suite_default
name: 'keepstore'
4:
<<: *isk_suite_default
name: 'keepweb'
5:
<<: *isk_suite_default
name: 'repo'
6:
<<: *isk_suite_default
name: 'shell'
7:
<<: *isk_suite_default
name: 'websocket'
8:
<<: *isk_suite_default
name: 'workbench'
9:
<<: *isk_suite_default
name: 'workbench2'
bind: *formula_default
cert: *formula_default
chrony: *formula_default
Expand Down
92 changes: 92 additions & 0 deletions ssf/files/tofs_arvados-formula/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
## Machine config
os: 'linux'
arch: 'amd64'
dist: 'bionic'
version: '~> 1.0'

## Language and cache config
language: 'ruby'
cache: 'bundler'

## Services config
services:
- docker

## Script to run for the test stage
script:
- bin/kitchen verify "${INSTANCE}"

## Stages and jobs matrix
stages:
- test
- name: 'release'
if: 'branch = master AND type != pull_request'
jobs:
include:
## Define the test stage that runs the linters (and testing matrix, if applicable)

# Run all of the linters in a single job
- language: 'node_js'
node_js: 'lts/*'
env: 'Lint'
name: 'Lint: salt-lint, yamllint, rubocop, shellcheck & commitlint'
before_install: 'skip'
script:
# Install and run `salt-lint`
- pip install --user salt-lint
- git ls-files -- '*.sls' '*.jinja' '*.j2' '*.tmpl' '*.tst'
| xargs salt-lint
# Install and run `yamllint`
# Need at least `v1.17.0` for the `yaml-files` setting
- pip install --user yamllint>=1.17.0
- yamllint -s .
# Install and run `rubocop`
- gem install rubocop
- rubocop -d
# Run `shellcheck` (already pre-installed in Travis)
- shellcheck --version
- git ls-files -- '*.sh' '*.bash' '*.ksh'
| xargs shellcheck
# Install and run `commitlint`
- npm i -D @commitlint/config-conventional
@commitlint/travis-cli
- commitlint-travis

## 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`
- env: INSTANCE=api-debian-10-3000-2-py3
- env: INSTANCE=workbench-debian-10-3000-2-py3
- env: INSTANCE=shell-debian-10-3000-2-py3
- env: INSTANCE=keepstore-debian-10-3000-2-py3
# - env: INSTANCE=default-ubuntu-1804-3000-2-py3
# - env: INSTANCE=default-centos-7-2019-2-py3

## Define the release stage that runs `semantic-release`
- stage: 'release'
language: 'node_js'
node_js: 'lts/*'
env: 'Release'
name: 'Run semantic-release inc. file updates to AUTHORS, CHANGELOG & FORMULA'
before_install: 'skip'
script:
# Update `AUTHORS.md`
- export MAINTAINER_TOKEN=${GH_TOKEN}
- go get github.com/myii/maintainer
- maintainer contributor

# Install all dependencies required for `semantic-release`
- npm i -D @semantic-release/changelog@3
@semantic-release/exec@3
@semantic-release/git@7
deploy:
provider: 'script'
# Opt-in to `dpl v2` to complete the Travis build config validation (beta)
# * https://docs.travis-ci.com/user/build-config-validation
# Deprecated `skip_cleanup` can now be avoided, `cleanup: false` is by default
edge: true
# Run `semantic-release`
script: 'npx semantic-release@15.14'
190 changes: 190 additions & 0 deletions ssf/files/tofs_arvados-formula/kitchen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
# For help on this file's format, see https://kitchen.ci/
driver:
name: docker
use_sudo: false
privileged: true
run_command: /lib/systemd/systemd

# Make sure the platforms listed below match up with
# the `env.matrix` instances defined in `.travis.yml`
platforms:
## SALT `3000.2`
- name: debian-10-3000-2-py3
driver:
image: netmanagers/salt-3000.2-py3:debian-10

# - name: ubuntu-1804-3000-2-py3
# driver:
# image: netmanagers/salt-3000.2-py3:ubuntu-18.04

# ## SALT `2019.2`
# - name: centos-7-2019-2-py3
# driver:
# image: netmanagers/salt-2019.2-py3:centos-7

provisioner:
name: salt_solo
log_level: debug
salt_install: none
require_chef: false
formula: arvados
salt_copy_filter:
- .kitchen
- .git

verifier:
# https://www.inspec.io/
name: inspec
sudo: true
# cli, documentation, html, progress, json, json-min, json-rspec, junit
reporter:
- cli

suites:
#### api,websocket,keepproxy,keepweb,controller
- name: api
driver:
hostname: example.net
provisioner:
state_top:
base:
'*':
- example_add_snakeoil_certs
- nginx.passenger
- postgres
- arvados.repo
- arvados.api
- arvados.websocket
# keepproxy complains when using snakeoil certs, so we can't
# properly test it here until next version removes this limitation
# - arvados.keepproxy
- arvados.keepweb
- arvados.controller
pillars:
top.sls:
base:
'*':
- arvados
- example_postgres
- example_nginx
- example_nginx_api
- example_nginx_websocket
- example_nginx_keepweb
- example_nginx_controller
# keepproxy expects to retrieve a list of services from API, so
# installing/testing it without an api server running will fail
# - example_nginx_keepproxy
pillars_from_files:
# yamllint disable rule:line-length
arvados.sls: pillar.example
example_postgres.sls: test/salt/pillar/examples/postgresql.sls
example_nginx.sls: test/salt/pillar/examples/nginx_passenger.sls
example_nginx_api.sls: test/salt/pillar/examples/nginx_api_configuration.sls
example_nginx_websocket.sls: test/salt/pillar/examples/nginx_websocket_configuration.sls
example_nginx_keepweb.sls: test/salt/pillar/examples/nginx_keepweb_configuration.sls
# example_nginx_keepproxy.sls: test/salt/pillar/examples/nginx_keepproxy_configuration.sls
example_nginx_controller.sls: test/salt/pillar/examples/nginx_controller_configuration.sls
# yamllint enable rule:line-length
dependencies:
- name: example_add_snakeoil_certs
path: test/salt/states
- name: postgres
repo: git
source: https://github.com/saltstack-formulas/postgres-formula.git
- name: nginx
repo: git
source: https://github.com/saltstack-formulas/nginx-formula.git
verifier:
inspec_tests:
- path: test/integration/api
- path: test/integration/websocket
# - path: test/integration/keepproxy
- path: test/integration/keepweb
- path: test/integration/controller

#### workbench,workbench2
- name: workbench
driver:
hostname: workbench.example.net
provisioner:
state_top:
base:
'*':
- example_add_snakeoil_certs
- nginx.passenger
- arvados.repo
- arvados.workbench
- arvados.workbench2
pillars:
top.sls:
base:
'*':
- arvados
- example_nginx
- example_nginx_workbench
- example_nginx_workbench2
pillars_from_files:
# yamllint disable rule:line-length
arvados.sls: pillar.example
example_nginx.sls: test/salt/pillar/examples/nginx_passenger.sls
example_nginx_workbench.sls: test/salt/pillar/examples/nginx_workbench_configuration.sls
example_nginx_workbench2.sls: test/salt/pillar/examples/nginx_workbench2_configuration.sls
# yamllint enable rule:line-length
dependencies:
- name: example_add_snakeoil_certs
path: test/salt/states
- name: nginx
repo: git
source: https://github.com/saltstack-formulas/nginx-formula.git
verifier:
inspec_tests:
- path: test/integration/workbench
- path: test/integration/workbench2

#### shell
- name: shell
driver:
hostname: shell.example.net
provisioner:
state_top:
base:
'*':
# We also test repo here. No sense for a whole separate suite
- arvados.repo
- arvados.shell
pillars:
top.sls:
base:
'*':
- arvados
pillars_from_files:
arvados.sls: pillar.example
verifier:
inspec_tests:
- path: test/integration/repo
- path: test/integration/shell

#### keepstore
- name: keepstore
driver:
hostname: keep0.example.net
provisioner:
state_top:
base:
'*':
- arvados.repo
- arvados.keepstore.service
# - arvados.clean
pillars:
top.sls:
base:
'*':
- arvados
pillars_from_files:
arvados.sls: pillar.example
verifier:
inspec_tests:
- path: test/integration/keepstore
3 changes: 2 additions & 1 deletion ssf/files/tofs_template-formula/docs/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ Semantic release formulas
These formulas are already compatible with semantic-release *and* have global ``CODEOWNERS`` defined:

#. `apt-formula <https://github.com/saltstack-formulas/apt-formula>`_
#. `arvados-formula <https://github.com/saltstack-formulas/arvados-formula>`_
#. `bind-formula <https://github.com/saltstack-formulas/bind-formula>`_
#. `deepsea-formula <https://github.com/saltstack-formulas/deepsea-formula>`_
#. `fail2ban-formula <https://github.com/saltstack-formulas/fail2ban-formula>`_
Expand All @@ -184,7 +185,7 @@ These formulas are already compatible with semantic-release *and* have global ``

These formulas are also compatible with semantic-release:

19. `apache-formula <https://github.com/saltstack-formulas/apache-formula>`_
20. `apache-formula <https://github.com/saltstack-formulas/apache-formula>`_
#. `apt-cacher-formula <https://github.com/saltstack-formulas/apt-cacher-formula>`_
#. `cert-formula <https://github.com/saltstack-formulas/cert-formula>`_
#. `chrony-formula <https://github.com/saltstack-formulas/chrony-formula>`_
Expand Down
Loading

0 comments on commit a7cf829

Please sign in to comment.