Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(semantic-release): complete for this formula #30

Merged
merged 12 commits into from
Oct 12, 2019

Conversation

myii
Copy link
Member

@myii myii commented Oct 10, 2019


@noelmcloughlin This PR brings the implementation into line with the latest structure across semantic-release formulas. In includes:

  1. The new method of working with Travis, as introduced in ci: merge travis matrix, add salt-lint & rubocop to lint job template-formula#175.
  2. Lint errors corrected for both of the new linters introduced (salt-lint and rubocop).
  3. Other minor issues with documentation and standard structures.

One thing I noticed that I didn't get time to resolve is the missing tofs block in pillar.example. Something like:

  tofs:
    # The files_switch key serves as a selector for alternative
    # directories under the formula files directory. See TOFS pattern
    # doc for more info.
    # Note: Any value not evaluated by `config.get` will be used literally.
    # This can be used to set custom paths, as many levels deep as required.
    # files_switch:
    #   - any/path/can/be/used/here
    #   - id
    #   - roles
    #   - osfinger
    #   - os
    #   - os_family
    # All aspects of path/file resolution are customisable using the options below.
    # This is unnecessary in most cases; there are sensible defaults.
    # Default path: salt://< path_prefix >/< dirs.files >/< dirs.default >
    #         I.e.: salt://template/files/default
    # path_prefix: template_alt
    # dirs:
    #   files: files_alt
    #   default: default_alt
    # The entries under `source_files` are prepended to the default source files
    # given for the state
    source_files:
      template-config-file-file-managed:
        - 'example_alt.tmpl'
        - 'example_alt.tmpl.jinja'

The source_files would need to be updated for all uses of files_switch throughout this formula. Since you're the most familiar with that, I'll leave that in your capable hands.

myii added 12 commits October 10, 2019 19:07
```bash
Examining iscsi/initiator/clean.sls of type state
[201] Trailing whitespace
iscsi/initiator/clean.sls:9
  - .package.clean
```
```bash
Examining iscsi/initiator/config/files/default/iscsi.tmpl of type state
[206] Jinja variables should have spaces before and after: {{ var_name }}
iscsi/initiator/config/files/default/iscsi.tmpl:17
{{shift}}{{ key }} {  # nickname

[206] Jinja variables should have spaces before and after: {{ var_name }}
iscsi/initiator/config/files/default/iscsi.tmpl:21
{{shift}}{{ key }} = {{"'" if value is not string else ''}}{{ value }}{{"'" if value is not string else ''}}
```
```bash
Examining iscsi/initiator/config/files/default/open-iscsi.tmpl of type state
[206] Jinja variables should have spaces before and after: {{ var_name }}
iscsi/initiator/config/files/default/open-iscsi.tmpl:16
{{shift}}{{ key }} = {{ value ~ '\n' if value is string else '"' ~ value ~ '"\n' }}
```
```bash
Examining iscsi/isns/clean.sls of type state
[201] Trailing whitespace
iscsi/isns/clean.sls:8
  - .package.clean
```
```bash
Examining iscsi/isns/config/files/default/isns.tmpl of type state
[206] Jinja variables should have spaces before and after: {{ var_name }}
iscsi/isns/config/files/default/isns.tmpl:16
{{shift}}{{ key }} = {{ value }}
```
```bash
Examining iscsi/target/clean.sls of type state
[201] Trailing whitespace
iscsi/target/clean.sls:9
  - .package.clean
```
```bash
Examining iscsi/target/config/files/default/ctld.tmpl of type state
[201] Trailing whitespace
iscsi/target/config/files/default/ctld.tmpl:17
{{shift}}{{ key }} {

[206] Jinja variables should have spaces before and after: {{ var_name }}
iscsi/target/config/files/default/ctld.tmpl:17
{{shift}}{{ key }} {

[206] Jinja variables should have spaces before and after: {{ var_name }}
iscsi/target/config/files/default/ctld.tmpl:19
{{shift}}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
iscsi/target/config/files/default/ctld.tmpl:21
{{shift}}{{ key }} {{ value }}
```
```bash
Examining iscsi/target/config/files/default/ietd.tmpl of type state
[206] Jinja variables should have spaces before and after: {{ var_name }}
iscsi/target/config/files/default/ietd.tmpl:17
{{shift}}{{ key }}

[206] Jinja variables should have spaces before and after: {{ var_name }}
iscsi/target/config/files/default/ietd.tmpl:20
{{shift}}{{ key }} {{ "'" if value is not string else ''}}{{ value }}{{"'" if value is not string else ''}}
```
```bash
Examining iscsi/target/config/files/default/lio.tmpl of type state
[209] Jinja comment should have spaces before and after: {# comment #}
iscsi/target/config/files/default/lio.tmpl:1
{#######################################################}

[201] Trailing whitespace
iscsi/target/config/files/default/lio.tmpl:3
{#   salt://iscsi/target/config/files/default/lio.tmpl #}

[201] Trailing whitespace
iscsi/target/config/files/default/lio.tmpl:4
{# Your changes may get overwritten.                   #}

[209] Jinja comment should have spaces before and after: {# comment #}
iscsi/target/config/files/default/lio.tmpl:5
{#######################################################}

[201] Trailing whitespace
iscsi/target/config/files/default/lio.tmpl:7
{% set arrays = ('fabric_modules', 'storage_objects', 'alua_tpgs', 'targets', 'node_acls', 'luns', 'mapped_luns', 'portals')%}

[202] Jinja statement should have spaces before and after: {% statement %}
iscsi/target/config/files/default/lio.tmpl:7
{% set arrays = ('fabric_modules', 'storage_objects', 'alua_tpgs', 'targets', 'node_acls', 'luns', 'mapped_luns', 'portals')%}

[201] Trailing whitespace
iscsi/target/config/files/default/lio.tmpl:32
{{ '\n' ~ shift ~ '}' if last and parent|lower in ('tpgs',) else '' -}}
```
```bash
Examining iscsi/target/config/files/default/tgtd.tmpl of type state
[206] Jinja variables should have spaces before and after: {{ var_name }}
iscsi/target/config/files/default/tgtd.tmpl:17
{{shift}}{{ '<' ~  key ~ '>' }}

[206] Jinja variables should have spaces before and after: {{ var_name }}
iscsi/target/config/files/default/tgtd.tmpl:19
{{shift}}{{ '</' ~ key.split(" ")[0] ~ '>' }}

[206] Jinja variables should have spaces before and after: {{ var_name }}
iscsi/target/config/files/default/tgtd.tmpl:22
{{shift}}{{ key }} {{ value }}
```
@myii myii merged commit 6d34960 into saltstack-formulas:master Oct 12, 2019
@myii myii deleted the chore/standardise-structure branch October 12, 2019 18:47
@saltstack-formulas-travis

🎉 This PR is included in version 1.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants