GithubHelp home page GithubHelp logo

isabella232 / posh-bolt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from puppetlabs/posh-bolt

0.0 0.0 0.0 51 KB

A PowerShell module for interacting with Puppet Bolt

License: MIT License

PowerShell 100.00%

posh-bolt's Introduction

posh-bolt

PowerShell helper commands for interacting with Puppet Bolt

Developing

First Time Building The Module

  1. Clone the source code
  2. Run the StageFiles task with -bootstrap Option
    • .\build.ps1 -Task StageFiles -bootstrap
    • Note that stagefiles is used instead of Build because there currently seems to be a bug with building the help files that fails the build.
    • The -bootstrap switch will install the required modules onto your machine.
  3. Import the built module
    • Import-Module .\output\posh-bolt -force
  4. Make changes to source files in .\posh-bolt[public, private, classes] directories.
    • If you have added a new cmdlet don't forget to add it to the list of exported functions in the psd1 file.
  5. Rebuild the module
    • .\build.ps1 -Task StageFiles
  6. Re-Import the modified module
    • Import-Module .\output\posh-bolt -force

Debugging

  1. Create a debugentry.ps1 file.
    • Create this file locally but do not commit it to the repository
  2. Set a breakpoint
    • Remember to set the breakpoint in the built psm1 file in the output directory. Not the source file in the public/private directories.
    • If the change you made results in changes to the line numbering you may need to build the file again manually first, so the lines of code you want to break on are in their correct position when you set the breakpoint.
  3. In the debug entry I usually start the file with the commands needed to build the module and re-import it
    • .\build.ps1 -Task StageFiles; Import-Module .\output\posh-bolt -force
  4. Enter the command that exercise the code path with your breakpoint.
    • New-BoltMetadata -scriptFile .\testscript.ps1
  5. Press f5 to start debugging on the debugentry.ps1 file. When code execution reaches your breakpoint in .\output\posh-bolt.psm1, the debugger will pause execution for you.

Overview

Installation

Examples

posh-bolt's People

Contributors

randomnoun7 avatar mcdonaldseanp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.