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

(MODULES-8393) Add task required metadata, hide extra implementations #353

Merged
merged 2 commits into from
Dec 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": {}
}