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): implement for this formula #235

Merged
merged 7 commits into from
Oct 23, 2019

Conversation

myii
Copy link
Member

@myii myii commented Oct 17, 2019

PR progress checklist (to be filled in by reviewers)

  • Changes to documentation are appropriate (or tick if not required)
  • Changes to tests are appropriate (or tick if not required)
  • Reviews completed

What type of PR is this?

Primary type

  • [build] Changes related to the build system
  • [chore] Changes to the build process or auxiliary tools and libraries such as documentation generation
  • [ci] Changes to the continuous integration configuration
  • [feat] A new feature
  • [fix] A bug fix
  • [perf] A code change that improves performance
  • [refactor] A code change that neither fixes a bug nor adds a feature
  • [revert] A change used to revert a previous commit
  • [style] Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)

Secondary type

  • [docs] Documentation changes
  • [test] Adding missing or correcting existing tests

Does this PR introduce a BREAKING CHANGE?

No.

Related issues and/or pull requests

Describe the changes you're proposing

As is familiar by now, semantic-release PRs do not modify the functionality of the formula itself.

Note: InSpec has replaced testinfra

All of the testinfra implementation has been removed and InSpec has been established in its place.

Lint issues resolved

yamllint
  • Fix (or ignore) yamllint errors:
docker-formula$ yamllint -s .
./pillar.example
  5:1       warning  missing document start "---"  (document-start)
  10:8      warning  missing starting space in comment  (comments)
  12:11     error    empty value in block mapping  (empty-values)
  13:89     error    line too long (92 > 88 characters)  (line-length)
  14:26     warning  truthy value should be one of [false, true]  (truthy)
  28:1      error    trailing spaces  (trailing-spaces)
  32:11     error    empty value in block mapping  (empty-values)
  36:89     error    line too long (92 > 88 characters)  (line-length)
  37:26     warning  truthy value should be one of [false, true]  (truthy)
  58:4      warning  missing starting space in comment  (comments)
  59:4      warning  missing starting space in comment  (comments)
  61:4      warning  missing starting space in comment  (comments)
  62:4      warning  missing starting space in comment  (comments)
  63:21     warning  truthy value should be one of [false, true]  (truthy)
  64:1      error    trailing spaces  (trailing-spaces)
  65:89     error    line too long (93 > 88 characters)  (line-length)
  66:4      warning  missing starting space in comment  (comments)
  76:3      warning  comment not indented like content  (comments-indentation)
  77:6      warning  missing starting space in comment  (comments)
  78:6      warning  missing starting space in comment  (comments)
  79:23     warning  truthy value should be one of [false, true]  (truthy)
  87:20     warning  truthy value should be one of [false, true]  (truthy)
  88:20     warning  truthy value should be one of [false, true]  (truthy)
  92:12     warning  truthy value should be one of [false, true]  (truthy)
  111:8     warning  missing starting space in comment  (comments)
  119:4     error    syntax error: expected <block end>, but found '<block mapping start>'
  120:8     warning  missing starting space in comment  (comments)
  121:7     error    wrong indentation: expected 5 but found 6  (indentation)
  132:8     warning  missing starting space in comment  (comments)
  145:2     warning  missing starting space in comment  (comments)
  147:5     warning  comment not indented like content  (comments-indentation)
  148:6     warning  missing starting space in comment  (comments)
  149:6     warning  missing starting space in comment  (comments)
  150:6     warning  missing starting space in comment  (comments)
  154:6     warning  missing starting space in comment  (comments)
  155:6     warning  missing starting space in comment  (comments)
  157:2     warning  missing starting space in comment  (comments)
  159:6     warning  comment not indented like content  (comments-indentation)
  169:6     warning  comment not indented like content  (comments-indentation)
  174:1     error    too many blank lines (1 > 0)  (empty-lines)

./docker/defaults.yaml
  3:1       warning  missing document start "---"  (document-start)
  5:22      warning  truthy value should be one of [false, true]  (truthy)
  7:17      warning  truthy value should be one of [false, true]  (truthy)
  14:22     warning  truthy value should be one of [false, true]  (truthy)
  15:17     warning  truthy value should be one of [false, true]  (truthy)
  16:10     warning  truthy value should be one of [false, true]  (truthy)
  27:20     warning  truthy value should be one of [false, true]  (truthy)
  28:11     warning  truthy value should be one of [false, true]  (truthy)
  29:23     warning  truthy value should be one of [false, true]  (truthy)
  29:35     warning  missing starting space in comment  (comments)
  32:23     warning  truthy value should be one of [false, true]  (truthy)
  33:14     warning  truthy value should be one of [false, true]  (truthy)
  39:20     warning  truthy value should be one of [false, true]  (truthy)
  40:20     warning  truthy value should be one of [false, true]  (truthy)
  46:1      error    too many blank lines (1 > 0)  (empty-lines)

./docker/osfamilymap.yaml
  13:2      error    syntax error: found character '%' that cannot start any token
  50:89     error    line too long (164 > 88 characters)  (line-length)

./docker/codenamemap.yaml
  3:1       warning  missing document start "---"  (document-start)
  36:1      error    too many blank lines (1 > 0)  (empty-lines)

./docker/osmap.yaml
  1:1       error    too many blank lines (1 > 0)  (empty-lines)
  2:1       warning  missing document start "---"  (document-start)

(saltstack) imran@E6530:~/Salt/formulas/docker-formula$ yamllint -s .
./docker/osfamilymap.yaml
  13:2      error    syntax error: found character '%' that cannot start any token
  51:89     error    line too long (164 > 88 characters)  (line-length)
salt-lint
  • Fix salt-lint errors:
Examining docker/compose-ng.sls of type state
[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:13
{{id}}:

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:17
{{id}} image:

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:22
    - name: {{image[0]}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:23
    - tag: {{image[1]}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:25
    - name: {{container.image}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:28
{{id}} container:

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:40
    - name: {{id}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:41
    - image: {{container.image}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:43
    - command: {{container.command}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:48
        - {{variable}}: {{value}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:57
      - "{{mapping[0]}}"

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:59
      - "{{mapping[-1]}}/tcp":

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:60
            HostPort: "{{mapping[-2]}}"

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:61
            HostIp: "{{mapping[-3]|d('')}}"

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:64
      - {{port_mapping}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:71
      - {{volume}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:78
      - {{volume}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:86
        {{name}}: {{alias}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:92
        Name: {{policy[0]}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:94
        MaximumRetryCount: {{policy[1]}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:99
      - docker_image: {{id}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:101
      - docker: {{id}} image

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:106
      - docker_image: {{containerid}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:108
      - docker: {{containerid}}

Pillar / config required to test the proposed changes

Uses pillar.example in Kitchen.

Debug log showing how the proposed changes work

As shown in Travis.

Documentation checklist

  • Updated the README (e.g. Available states).
  • Updated pillar.example.

Testing checklist

  • Included in Kitchen (i.e. under state_top).
  • Covered by new/existing tests (e.g. InSpec, Serverspec, etc.).
  • Updated the relevant test pillar.

Additional context

* Semi-automated using myii/ssf-formula#78
* Fix (or ignore) `yamllint` errors:

```bash
docker-formula$ yamllint -s .
./pillar.example
  5:1       warning  missing document start "---"  (document-start)
  10:8      warning  missing starting space in comment  (comments)
  12:11     error    empty value in block mapping  (empty-values)
  13:89     error    line too long (92 > 88 characters)  (line-length)
  14:26     warning  truthy value should be one of [false, true]  (truthy)
  28:1      error    trailing spaces  (trailing-spaces)
  32:11     error    empty value in block mapping  (empty-values)
  36:89     error    line too long (92 > 88 characters)  (line-length)
  37:26     warning  truthy value should be one of [false, true]  (truthy)
  58:4      warning  missing starting space in comment  (comments)
  59:4      warning  missing starting space in comment  (comments)
  61:4      warning  missing starting space in comment  (comments)
  62:4      warning  missing starting space in comment  (comments)
  63:21     warning  truthy value should be one of [false, true]  (truthy)
  64:1      error    trailing spaces  (trailing-spaces)
  65:89     error    line too long (93 > 88 characters)  (line-length)
  66:4      warning  missing starting space in comment  (comments)
  76:3      warning  comment not indented like content  (comments-indentation)
  77:6      warning  missing starting space in comment  (comments)
  78:6      warning  missing starting space in comment  (comments)
  79:23     warning  truthy value should be one of [false, true]  (truthy)
  87:20     warning  truthy value should be one of [false, true]  (truthy)
  88:20     warning  truthy value should be one of [false, true]  (truthy)
  92:12     warning  truthy value should be one of [false, true]  (truthy)
  111:8     warning  missing starting space in comment  (comments)
  119:4     error    syntax error: expected <block end>, but found '<block mapping start>'
  120:8     warning  missing starting space in comment  (comments)
  121:7     error    wrong indentation: expected 5 but found 6  (indentation)
  132:8     warning  missing starting space in comment  (comments)
  145:2     warning  missing starting space in comment  (comments)
  147:5     warning  comment not indented like content  (comments-indentation)
  148:6     warning  missing starting space in comment  (comments)
  149:6     warning  missing starting space in comment  (comments)
  150:6     warning  missing starting space in comment  (comments)
  154:6     warning  missing starting space in comment  (comments)
  155:6     warning  missing starting space in comment  (comments)
  157:2     warning  missing starting space in comment  (comments)
  159:6     warning  comment not indented like content  (comments-indentation)
  169:6     warning  comment not indented like content  (comments-indentation)
  174:1     error    too many blank lines (1 > 0)  (empty-lines)

./docker/defaults.yaml
  3:1       warning  missing document start "---"  (document-start)
  5:22      warning  truthy value should be one of [false, true]  (truthy)
  7:17      warning  truthy value should be one of [false, true]  (truthy)
  14:22     warning  truthy value should be one of [false, true]  (truthy)
  15:17     warning  truthy value should be one of [false, true]  (truthy)
  16:10     warning  truthy value should be one of [false, true]  (truthy)
  27:20     warning  truthy value should be one of [false, true]  (truthy)
  28:11     warning  truthy value should be one of [false, true]  (truthy)
  29:23     warning  truthy value should be one of [false, true]  (truthy)
  29:35     warning  missing starting space in comment  (comments)
  32:23     warning  truthy value should be one of [false, true]  (truthy)
  33:14     warning  truthy value should be one of [false, true]  (truthy)
  39:20     warning  truthy value should be one of [false, true]  (truthy)
  40:20     warning  truthy value should be one of [false, true]  (truthy)
  46:1      error    too many blank lines (1 > 0)  (empty-lines)

./docker/osfamilymap.yaml
  13:2      error    syntax error: found character '%' that cannot start any token
  50:89     error    line too long (164 > 88 characters)  (line-length)

./docker/codenamemap.yaml
  3:1       warning  missing document start "---"  (document-start)
  36:1      error    too many blank lines (1 > 0)  (empty-lines)

./docker/osmap.yaml
  1:1       error    too many blank lines (1 > 0)  (empty-lines)
  2:1       warning  missing document start "---"  (document-start)

(saltstack) imran@E6530:~/Salt/formulas/docker-formula$ yamllint -s .
./docker/osfamilymap.yaml
  13:2      error    syntax error: found character '%' that cannot start any token
  51:89     error    line too long (164 > 88 characters)  (line-length)
```
```bash
Examining docker/compose-ng.sls of type state
[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:13
{{id}}:

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:17
{{id}} image:

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:22
    - name: {{image[0]}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:23
    - tag: {{image[1]}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:25
    - name: {{container.image}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:28
{{id}} container:

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:40
    - name: {{id}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:41
    - image: {{container.image}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:43
    - command: {{container.command}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:48
        - {{variable}}: {{value}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:57
      - "{{mapping[0]}}"

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:59
      - "{{mapping[-1]}}/tcp":

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:60
            HostPort: "{{mapping[-2]}}"

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:61
            HostIp: "{{mapping[-3]|d('')}}"

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:64
      - {{port_mapping}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:71
      - {{volume}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:78
      - {{volume}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:86
        {{name}}: {{alias}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:92
        Name: {{policy[0]}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:94
        MaximumRetryCount: {{policy[1]}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:99
      - docker_image: {{id}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:101
      - docker: {{id}} image

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:106
      - docker_image: {{containerid}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
docker/compose-ng.sls:108
      - docker: {{containerid}}
```
@myii myii force-pushed the feat/implement-semantic-release branch from 3971fd3 to 222fc6d Compare October 17, 2019 08:16
@myii
Copy link
Member Author

myii commented Oct 23, 2019

@aboe76 Can we merge this?

@myii myii merged commit d71e747 into saltstack-formulas:master Oct 23, 2019
@myii myii deleted the feat/implement-semantic-release branch October 23, 2019 17:00
@myii
Copy link
Member Author

myii commented Oct 23, 2019

Merged after confirmation from @noelmcloughlin in Slack.

https://freenode.logbot.info/saltstack-formulas/20191023#c2787286-c2787288

- - -
16:57 noel.mcloughlin Nice someone got around to docker-formula! thanks @​myii I think CI testing can be swapped out.
16:58 noel.mcloughlin i.e. remove testinfra

@saltstack-formulas-travis

🎉 This PR is included in version 0.42.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.

3 participants