-
Notifications
You must be signed in to change notification settings - Fork 7
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
Convert to Puppet 4 conventions #9
Comments
$ pdk new module software References |
Yea, I learned all about pdk at puppetconf! It looks nice and should solve some of our problems. |
When you use PDK to generate an example Puppet module (e.g. diff --git a/metadata.json b/metadata.json
index 1556c97..7bf2975 100644
--- a/metadata.json
+++ b/metadata.json
@@ -43,7 +43,7 @@
"requirements": [
{
"name": "puppet",
- "version_requirement": ">= 3.0.0 < 5.0.0"
+ "version_requirement": ">= 4.5.0 < 6.0.0"
}
]
} The main complaint is "software not in autoload module layout", which goes away when I rename the Linting$ pdk validate
pdk (INFO): Running all available validators...
[✔] Checking metadata syntax (metadata.json tasks/*.json).
[✔] Checking module metadata style (metadata.json).
[✔] Checking Puppet manifest syntax (**/**.pp).
[✔] Checking Puppet manifest style (**/*.pp).
[✔] Checking Ruby code style (**/**.rb).
info: task-metadata-lint: ./: Target does not contain any files to validate (tasks/*.json).
warning: puppet-lint: manifests/social/skype.pp:37:33: arrow should be on the right operand's line
warning: puppet-lint: manifests/social/slack.pp:31:33: arrow should be on the right operand's line
warning: puppet-lint: manifests/virtualization/virtualbox.pp:48:33: arrow should be on the right operand's line
warning: puppet-lint: manifests/virtualization/virtualbox.pp:50:27: arrow should be on the right operand's line
warning: puppet-lint: manifests/editors/atom.pp:46:9: arrow should be on the right operand's line
warning: puppet-lint: manifests/editors/atom.pp:68:33: arrow should be on the right operand's line
warning: puppet-lint: manifests/browsers/chrome.pp:46:33: arrow should be on the right operand's line
warning: puppet-lint: manifests/drivers/lanier_mpc5503.pp:32:9: arrow should be on the right operand's line
warning: puppet-lint: manifests/storage/drive.pp:39:33: arrow should be on the right operand's line
warning: puppet-lint: manifests/utilities/iterm.pp:31:9: arrow should be on the right operand's line
warning: puppet-lint: manifests/utilities/alfred.pp:35:9: arrow should be on the right operand's line
warning: puppet-lint: manifests/utilities/alfred.pp:55:33: arrow should be on the right operand's line
warning: puppet-lint: manifests/utilities/controlplane.pp:31:9: arrow should be on the right operand's line
warning: puppet-lint: manifests/utilities/onyx.pp:30:11: arrow should be on the right operand's line TestsTests work all out of the box: (A little more verbosity wouldn't hurt, but they all seem to be executed and pass.) $ pdk test unit
[✔] Preparing to run the unit tests.
[✔] Running unit tests.
Evaluated 165 tests in 5.57427871 seconds: 0 failures, 0 pending.
[✔] Cleaning up after running unit tests. Travis CII have described in puppetlabs/pdk#324 (comment) how to download and install PDK for CI builds. Afterwards, all there is to do, clearly, is run the two commands |
NOTE: We're now using the mathow/centos-puppet-pdk Docker image for GitLab CI builds with PDK, as long as there is no official PDK Docker image yet, which is still in the making according to Puppetlabs officials: # FILE: .gitlab-ci.yml
validate:
stage: build
image: mathow/centos-puppet-pdk
script:
- pdk validate 2> /dev/null
rspec:
stage: test
image: mathow/centos-puppet-pdk
script:
- pdk test unit 2> /dev/null |
very cool! Were also using gitlab ci with docker and this would be great! |
I've now added a similar configuration for Travis to PR #15. Would you mind merging? |
Use a puppetlabs module as an example and for god sakes use module sync!
The text was updated successfully, but these errors were encountered: