Skip to main content
Background Image
  1. Presentations/

Stucco

·236 words

Stucco: Start to Publish
#

Creating an open source module in minutes!

bg left


Follow Along or
#

Jump Ahead
#

You can see the slides:


Quick Intro
#

  • Gilbert Sanchez
  • SeƱor Systems Engineer at Meta
  • Writing PowerShell for the last 10ish years

Agenda
#

  1. Install Modules
  2. Setup Our Github Repo
  3. Create Our Module
  4. Commit
  5. Publish

Pre-Requisites
#

If you want to follow along on your computer here’s what you should get ready.

  • Github account
  • Git installed
  • VS Code (Recommended)

Install Stucco!
#

A good starting point.

Install-Module Stucco

Configure Your Github Repository
#

Create a New Github Repo


Create Repo & Check it Out
#

  1. Pick a name, description, etc.
  2. Create Repository
  3. Check it out!

Create Your Module
#

New-StuccoModule

Follow the prompts


Let’s Examine
#

  • Repo Layout
  • Requirements.ps1
  • psakeFile.ps1
  • Build.ps1

Build
#

.\build.ps1 -Task Test

Or in VS Code
#

Terminal -> Run Task -> Test


Commit your code!
#

git add .
git commit -m "Initial commit!"
git push

Get Ready for PSGallery
#

  1. Login to PSGallery
  2. Create API keys
  3. Copy

Put Your API Key into Github
#

  1. Go to your new repo
  2. Settings
  3. Secrets -> Actions
  4. “PS_GALLERY_KEY” and paste

Time to Publish
#

At this point your code should be ready to publish.


Bonus: Test Results on PR’s
#

  1. $PSBPreference.Test.OutputFormat = 'JUnitXml'
  2. Upload your unit tests via upload-artifact
  3. Use EnricoMi/publish-unit-test-result-action@v1

See CI.yaml


Thank you!
#





Cover Photo by Avel Chuklanov on Unsplash

Gilbert Sanchez
Author
Gilbert Sanchez
Not just good. Good enough.

Related

PowerShell Chef Cookbook
·444 words·3 mins
Manage PowerShell at enterprise scale with Meta’s Chef cookbook. Learn system profile management, module deployment, telemetry control, and enterprise configuration automation.
PowerShell Profile Setup Guide: Optimization & Starship Integration
·1156 words·6 mins
In this third post of the series I go over my PowerShell profile.
WezTerm Config Guide: Complete Lua Setup with Examples
·978 words·5 mins
In this second post of the series I go over my WezTerm config an explain each of my settings and some lessons learned.
Terminals, Shells, and Prompts: Complete Beginner's Guide
·691 words·4 mins
Part one of brief walk through on how terminals, shells, and prompts interact. In later posts I will go over my particular settings, but this lays the foundation.
Terminals, Shells, and Prompts
·241 words·2 mins
A comprehensive series exploring how terminals, shells, and prompts work together, with practical guides for WezTerm configuration, PowerShell profiles, and Starship prompt customization.
Efficient Disasters: Remove-Item In the Pipeline
·1171 words·6 mins
I walk through my most painful mistake of 2022. Using Remove-Item in a Pipeline can be efficient, but it can also be a disaster.