Skip to content

Commit

Permalink
Merge pull request #353 from MikaelSmith/MODULES-8393
Browse files Browse the repository at this point in the history
(MODULES-8393) Add task required metadata, hide extra implementations
  • Loading branch information
adreyer authored Dec 19, 2018
2 parents 735d810 + faf2dc9 commit eece6ae
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 11 deletions.
16 changes: 7 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,21 @@ before_install:
matrix:
fast_finish: true
include:
- rvm: 2.4.1
env: CHECK="validate lint"
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="4.7.1" HIERA_GEM_VERSION="3.2.2" CHECK=spec
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="~> 4.10" CHECK=spec
- rvm: 2.4.1
- rvm: 2.5.3
env: CHECK="validate lint spec"
- rvm: 2.5.3
env: PUPPET_GEM_VERSION="~> 5.0" CHECK=spec
- rvm: 2.3.8
env: PUPPET_GEM_VERSION="~> 4.10" CHECK=spec
# These cells test the task on different platforms
- rvm: 2.3.1
- rvm: 2.3.8
dist: trusty
env: GEM_BOLT=true BEAKER_debug=true BEAKER_set=docker/ubuntu-18.04
install: bundle install
script: cd task_spec && bundle exec rake task_acceptance
services: docker
sudo: required
- rvm: 2.3.1
- rvm: 2.3.8
dist: trusty
env: GEM_BOLT=true BEAKER_debug=true BEAKER_set=docker/centos-7
install: bundle install
Expand Down
2 changes: 1 addition & 1 deletion tasks/install.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
},
"implementations": [
{"name": "install_shell.sh", "requirements": ["shell"], "files": ["facts/tasks/bash.sh"]},
{"name": "install_shell.sh", "requirements": ["shell"], "files": ["facts/tasks/bash.sh"], "input_method": "environment"},
{"name": "install_powershell.ps1", "requirements": ["powershell"]}
]
}
14 changes: 14 additions & 0 deletions tasks/install_powershell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"description": "Install the Puppet agent package",
"private": true,
"parameters": {
"version": {
"description": "The version of puppet-agent to install",
"type": "Optional[String]"
},
"collection": {
"description": "The Puppet collection to install from (defaults to puppet, which maps to the latest collection released)",
"type": "Optional[Enum[puppet5, puppet6, puppet]]"
}
}
}
15 changes: 15 additions & 0 deletions tasks/install_shell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"description": "Install the Puppet agent package",
"private": true,
"input_method": "environment",
"parameters": {
"version": {
"description": "The version of puppet-agent to install",
"type": "Optional[String]"
},
"collection": {
"description": "The Puppet collection to install from (defaults to puppet, which maps to the latest collection released)",
"type": "Optional[Enum[puppet5, puppet6, puppet]]"
}
}
}
2 changes: 1 addition & 1 deletion tasks/version.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"description": "Get the version of the Puppet agent package installed. Returns nothing if none present.",
"parameters": {},
"implementations": [
{"name": "version_shell.sh", "requirements": ["shell"]},
{"name": "version_shell.sh", "requirements": ["shell"], "input_method": "environment"},
{"name": "version_powershell.ps1", "requirements": ["powershell"]}
]
}
5 changes: 5 additions & 0 deletions tasks/version_powershell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"description": "Get the version of the Puppet agent package installed. Returns nothing if none present.",
"private": true,
"parameters": {}
}
6 changes: 6 additions & 0 deletions tasks/version_shell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"description": "Get the version of the Puppet agent package installed. Returns nothing if none present.",
"private": true,
"input_method": "environment",
"parameters": {}
}

0 comments on commit eece6ae

Please sign in to comment.