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

Pipeline to build pipeline #8

Open
FISHMANPET opened this issue Jun 18, 2020 · 0 comments
Open

Pipeline to build pipeline #8

FISHMANPET opened this issue Jun 18, 2020 · 0 comments
Labels
stretch goal A far out idea, may not be reasonable or even possible

Comments

@FISHMANPET
Copy link
Member

A far out idea...

Most of the steps in this module are just simple PowerShell scripts. Writing and debugging a PowerShell script that's contained in a YAML file can be difficult, but they have to be kept in a YAML file to be used as a template.

What if each inline PowerShell script used in the templates had a PS1 file in a src directory, and when committing to the repo, a pipeline would "compile" each of those PS1 files inline into the relevant YAML file. A few of the scripts (right now the help steps) are just PowerShell scripts that write a powershell script do disk using a here-string and set-content, so maybe the source ps1 should be script to be written to disk rather than the script that writes the script do disk...

This would make it slightly easier to write/debug these scripts, and would introduce the ability to run some Pester tests against these PowerShell scripts.

Maybe the source directory structure would mirror the production structure, and the YAML files have some placeholder where a PowerShell script should be inserted and the build would do a find/replace (be mindful of indentation!) to insert the PowerShell script into the yaml, then commit it back into the repo (in a way that wouldn't trigger another build)

@FISHMANPET FISHMANPET added the stretch goal A far out idea, may not be reasonable or even possible label Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stretch goal A far out idea, may not be reasonable or even possible
Projects
None yet
Development

No branches or pull requests

1 participant