Skip to content

Commit

Permalink
feat(template): improve reusability
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Dec 23, 2019
1 parent 0fcd836 commit 491791c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ssf/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ ssf_node_anchors:
# An alternative method could be to use:
# `git describe --abbrev=0 --tags`
# yamllint disable rule:line-length
title: 'ci(travis): use `major.minor` for `semantic-release` version [skip ci]'
body: '* Automated using https://github.com/myii/ssf-formula/pull/112'
title: 'feat: improve reusability'
body: '* Checked using https://github.com/myii/ssf-formula/pull/113'
# yamllint enable rule:line-length
github:
owner: 'saltstack-formulas'
Expand Down
6 changes: 6 additions & 0 deletions ssf/files/default/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ AllCops:
{%- endif %}

# Any offenses that should be fixed, e.g. collected via. `rubocop --auto-gen-config`
{%- if semrel_formula == 'template' %}
# <REMOVEME
{%- endif %}
{%- for cop, config in rubocop.Cops.items() if cop not in [MLL] %}
{{ cop }}:
{#- This is purposefully simplistic for the time being,
Expand All @@ -35,3 +38,6 @@ AllCops:
{{ k }}: {{ v }}
{%- endfor %}
{%- endfor %}
{%- if semrel_formula == 'template' %}
# REMOVEME>
{%- endif %}
16 changes: 16 additions & 0 deletions ssf/files/default/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,22 @@ jobs:
{{- format_ci_matrix(platforms, inspec_suites_kitchen, inspec_suites_matrix, platforms_matrix, platforms_matrix_commented_includes, semrel_formula, use_new_travis_format=True) }}
{%- endif %}

{%- if semrel_formula == 'template' %}
# <REMOVEME

# Test the conversion of `template-formula` into another formula
# ready for development
- env: 'Conversion'
name: 'Test: bin/convert-formula.sh'
script:
- git clone . tmp/converted-formula
- cd tmp/converted-formula
- DEBUG=true bin/convert-formula.sh converted
- '[ $(git rev-list HEAD --count) -eq 2 ]'
- bin/kitchen verify default-debian-10-2019-2-py3
# REMOVEME>
{%- endif %}

## Define the release stage that runs `semantic-release`
- stage: 'release'
language: 'node_js'
Expand Down

0 comments on commit 491791c

Please sign in to comment.