Comments (6)
$ pdk new module software
References
from puppet-software.
Yea, I learned all about pdk at puppetconf! It looks nice and should solve some of our problems.
from puppet-software.
When you use PDK to generate an example Puppet module (e.g. pdk new module software
) you can use the generated Gemfile
with the generated Puppet version requirement. That will make pdk validate
work immediately. I just tried it.
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 puppet-software
folder that I have cloned your repo into to just software
. Then only a few validation complaints remain:
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
Tests
Tests 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 CI
I 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 pdk validate
and pdk test unit
, and optionally silence stderr
(as discussed in puppetlabs/pdk#323).
from puppet-software.
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
from puppet-software.
very cool! Were also using gitlab ci with docker and this would be great!
from puppet-software.
I've now added a similar configuration for Travis to PR #15. Would you mind merging?
from puppet-software.
Related Issues (12)
- Support Slack in social section HOT 5
- Add VMware Workstation Player to virtualization HOT 1
- Add PDK to development (new section?) HOT 4
- Git should provide git-extras and (oh-my-zsh) aliases HOT 3
- Describe setting parameters in README HOT 5
- Remove unneeded redirection (PDK progress indicator) HOT 6
- apm provider installs to Guest home HOT 2
- Switch to homebrew cask for osx
- Add tab completion and fancy prompt to Git HOT 2
- Fix or silence linter error "not in autoload module layout" HOT 6
- Global .git/config and .git/ignore HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-software.