[BOLT-156] implement powershell input method Created: 2017/10/06  Updated: 2018/02/26  Resolved: 2017/12/07

Status: Closed
Project: Puppet Task Runner
Component/s: Windows
Affects Version/s: None
Fix Version/s: BOLT 0.10.0

Type: New Feature Priority: Critical
Reporter: Patrick Carlisle Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: docs_reviewed
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Epic Link: Implement better support for task spec
Sprint: Bolt Kanban
Release Notes: New Feature
Release Notes Summary: This allows bolt to call powershell tasks with the native powershell input method. It changes the default input method for .ps1 tasks any tasks that rely on environment variables will need to include that in metadata to continue working with Bolt.
QA Risk Assessment: Needs Assessment

 Description   

Add the 'powershell' input method, which supplies arguments to a task via powershell standard argument handling, and is the default for tasks with a `.ps1` file extension



 Comments   
Comment by Michael Smith [ 2017/11/14 ]

Noted in spec - https://github.com/puppetlabs/puppet-specifications/tree/master/tasks#powershell - but it's not very thorough. Should be expanded to include enough detail about what pxp-agent does to implement.

Comment by Michael Smith [ 2017/11/22 ]

The short version for pxp-agent is:

  • write params on stdin while invoking PowershellShim.ps1.
  • PowershellShim.ps1 uses PowershellShim-Helper.ps1 to transform the JSON input to a powershell args hash.
  • PowershellShim.ps1 invokes the task with those arguments.

In bolt, we might be able to circumvent writing to stdin because we're invoking powershell directly.

Comment by Michelle Fredette [ 2017/12/06 ]

I added a release note for this.

Comment by Michelle Fredette [ 2017/12/06 ]

Nick Lewis - does this need documentation?

Comment by Nick Lewis [ 2017/12/06 ]

Michelle Fredette This change basically corresponds to this section of the docs, making it now apply to Bolt and not just PE. I don't think there's anywhere else in the bolt docs that we need to mention this, but we should remove the note that says it's PE-only.

Comment by Michelle Fredette [ 2017/12/06 ]

Okay. I removed that line. Thank you.

Comment by Kate Lopresti [ 2018/02/26 ]

Updated release note for this ticket; moved it from Known issues to Resolved. 

Generated at Mon Dec 16 01:42:03 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.