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(cron.env): add env option in cron-formula #12

Merged
merged 1 commit into from
Nov 3, 2019
Merged

feat(cron.env): add env option in cron-formula #12

merged 1 commit into from
Nov 3, 2019

Conversation

genaumann
Copy link

@genaumann genaumann commented Nov 1, 2019

Add the opportunity to add a ENV-variable in cron forumla.

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

Pillar / config required to test the proposed changes

Debug log showing how the proposed changes work

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

@aboe76 aboe76 changed the title add env option in cron-formula feat(cron.env): add env option in cron-formula Nov 1, 2019
@aboe76
Copy link
Member

aboe76 commented Nov 1, 2019

@aboe76
Copy link
Member

aboe76 commented Nov 1, 2019

@SynPrime nice work, would you mind adding a test for this to the https://github.com/saltstack-formulas/cron-formula/blob/master/test/salt/pillar/cron.sls

@myii
Copy link
Member

myii commented Nov 2, 2019

@SynPrime Please have a look at the lint issues:

It's useful to have yamllint available locally, so that you don't have to rely on the Travis lint stage to work out if everything is OK.

If you need any info about this or the InSpec testing, please don't hesitate to ask here or in Slack.

@myii
Copy link
Member

myii commented Nov 3, 2019

@SynPrime Note that we also have saltcheck enabled on this repo, which can be used if InSpec tests aren't as easy to provide. I've already written a test for this PR, so if you can amend your commit message (so it passes the lint), I can add a commit to this PR so that it has a test as well.

@myii
Copy link
Member

myii commented Nov 3, 2019

@SynPrime An example of the tests running (2 present and 1 absent):

That's based on the test pillar of:

  env:
    env1:
      type: present
      name: PATH
      value: /usr/local/bin:/usr/bin:/bin:/usr/games
      user: root
    env2:
      type: present
      name: MAILTO
      value: [email protected]
      user: root
    env3:
      type: absent
      name: LANG
      value: en_GB.UTF-8
      user: root

@genaumann
Copy link
Author

Hey @aboe76 @myii,

sorry, this is my first PR in a salt formula. Do you have a documentation for saltcheck?

@myii
Copy link
Member

myii commented Nov 3, 2019

@SynPrime No problem, welcome and thanks for the contribution.

If you have any queries, feel free to ask here (or on Slack).

@genaumann genaumann closed this Nov 3, 2019
@myii
Copy link
Member

myii commented Nov 3, 2019

@SynPrime You don't need to close the PR each time you want to amend the commits. Just make the changes and push them, the PR will be updated as well. To minimise issues in your fork, it's best to avoid using the master branch for PRs. Use a topic branch instead.

@genaumann
Copy link
Author

genaumann commented Nov 3, 2019

@myii Sorry, I pushed with --force to my repo. I re-opened.

Thanks for your advice.

@genaumann genaumann reopened this Nov 3, 2019
@myii
Copy link
Member

myii commented Nov 3, 2019

@SynPrime No problem, that's why it's best to avoid the master branch! I've still got your commit locally, so what I can do to make this easier is to push your commit and my saltcheck commit together in one PR. Your commit will remain attributed to you. We can continue the discussion there. Are you OK with that?

@myii
Copy link
Member

myii commented Nov 3, 2019

@SynPrime Since you've reopened this, let's continue here!

@genaumann
Copy link
Author

Okay :-)

@myii myii merged commit 59b66f0 into saltstack-formulas:master Nov 3, 2019
@myii
Copy link
Member

myii commented Nov 3, 2019

Thanks for the contribution, @SynPrime! It's been merged. I'll push another PR to add the saltcheck test for it.

@saltstack-formulas-travis

🎉 This PR is included in version 0.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aboe76
Copy link
Member

aboe76 commented Nov 4, 2019

@SynPrime nice, thank you, hopefully we see more of those!

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.

4 participants