-
Notifications
You must be signed in to change notification settings - Fork 23
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
(PDK-1090) Test task names #18
(PDK-1090) Test task names #18
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brilliant! Looks great
.travis.yml
Outdated
| - /.*/ | ||
| - master | ||
| - /^v\d/ | ||
| - /.*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like some extra whitespace snuck in here.
.travis.yml
Outdated
| @@ -13,19 +13,19 @@ script: | |||
| - 'bundle exec rake $CHECK' | |||
| bundler_args: --without system_tests | |||
| rvm: | |||
| - 2.4.1 | |||
| - 2.4.4 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this commit require a ruby version bump?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not. This is just a remnant of my local PDK being newer than 1.6.0. 1.6.1 will use 2.4.4 for testing.
metadata.json
Outdated
| @@ -91,7 +91,7 @@ | |||
| "version_requirement": ">= 4.7.0 < 6.0.0" | |||
| } | |||
| ], | |||
| "pdk-version": "1.6.0", | |||
| "pdk-version": "1.6.1.pre (heads/master-0-g9a9b458)", | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to above re: ruby, does this commit require a pdk-version bump? I honestly don't know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope.
|
@abottchen should I revert this to the pdk-templates at 1.6.0? The only manual changes in this commit are the Maybe the next best thing would be to waiting for 1.6.1 to release an update to the release version within this PR. Thoughts? |
|
@jarretlavallee There is probably a really cool git way to do it right, but the way I'd do it is just manually fix those specific lines in your local copy and push a new commit of this PR. Remove the extra whitespace from .travis.yml and set the version to 2.4.1, then set the pdk-version to 1.6.0 in metadata.json. Commit and push, and the PR should be clean. |
Prior to this commit the task names were not validated. This commit updates the creates a rake task to check that the puppet task names are compliant with the naming rules. *Note* that this is a workaround to PDK-1090 and does not affect `pdk validate`. To use it run `bundle exec rake tasknames`.
|
@abottchen reverted the files and rebased/squashed. I'll put up a PR with 1.6.1 when it releases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TGTM
Prior to this PR, the task names were not validated. This commit
updates the creates a rake task to check that the puppet task names
are compliant with the naming rules. Note that this is a workaround to
PDK-1090 and does not affect
pdk validate. To use it runbundle exec rake tasknames.The naming rules are in https://puppet.com/docs/bolt/0.x/writing_tasks.html#concept-676 and the files are tested against the
\A[a-z][a-z0-9_]*\.[a-z0-9_]+\Zregex. I am also checking the file extension to be lowercase as well.Example output: