Skip to content

Allow Import-BuildStep to point to external ps1 file #153

@bjompen

Description

@bjompen

I would like to have my GitHubAction.ps1 files in other locations than required by the Import-BuildStep command, but it doesn't seem to work.
My folder structure is similar to this:

  • /Source/ModuleFiles.(psm1, psd1, private, public, etc.)
  • /GitHub/Action/GitHubAction.ps1
  • /Tests and other stuff.. not relevant

This results in the following scenarios:

  • if I import the module from manifest file it can't find the MyAction.ps1 (makes sense), but imports the commands in the module.
  • If I use -SourcePath c:\Path\To\Folder\GitHubAction\ -BuildSystem GitHubAction it quietly continues, even with -Verbose, but no action is loaded
  • If I use only -SourcePath c:\Path\To\Folder\GitHubAction\ (which as a parameter name would make sense to me) I get the following error
    bild

I would like to be able to do something similar to

Import-BuildStep -ScriptFile '/path/to/my/file.ps1' -BuildStepName 'MyBuildStep'

This would allow me to have centralized build steps that I can import and reuse, and store them wherever I want. Is this possible? If so, how? I may help by updating the documentation but as I can't figure this out myself.. well..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions