From: EdTheDev Date: Sat, 6 Jan 2024 16:57:49 +0000 (-0600) Subject: Merge branch 'main' of github.com:edthedev/dotfiles into main X-Git-Url: https://us-delaporte.pagekite.me/gitweb/dotfiles.git/commitdiff_plain/a915de89d5fab58b7913c6e07a4713dd7cf58b15?hp=9cf372c28be9ac5618eb46fcb627ffcfa240865f Merge branch 'main' of github.com:edthedev/dotfiles into main --- diff --git a/doc/dashboard.md b/doc/dashboard.md new file mode 100644 index 0000000..ce07c45 --- /dev/null +++ b/doc/dashboard.md @@ -0,0 +1,22 @@ + +## + +Install WTFUtil + + > I have a helper script for Pi. + > I think I installed some other way on Ubunut. + +Setup WTFUtil. See `dotfiles/setup/dash_wtfutil.sh` + +Clone my PowerShell Git Helper libraries + + ``` + cd $HOME + git clone https://github.com/uillinois-community/powershell-scripts + ``` + +Install PowerShell 7 or higher: + + ``` + winget install --id Microsoft.Powershell --source winget + ``` \ No newline at end of file diff --git a/doc/openshift-cli.md b/doc/openshift-cli.md index 29a8196..19f03d7 100644 --- a/doc/openshift-cli.md +++ b/doc/openshift-cli.md @@ -21,7 +21,7 @@ `go install github.com/kubernetes/kompose@latest` -## Deployment +## Convert from Docker to K8S 1. Create a Docker compose file @@ -40,7 +40,15 @@ `kompose convert` ``` -3. Deploy +## Deploy + +1. Create an switch to a project + + ```powershell + oc new-project bookshelf + ``` + +2. Deploy resources ```powershell oc apply -f calibre-web-service.yaml diff --git a/files/Microsoft.PowerShell_profile.ps1 b/files/Microsoft.PowerShell_profile.ps1 index 14b1dc9..2bbdf46 100644 --- a/files/Microsoft.PowerShell_profile.ps1 +++ b/files/Microsoft.PowerShell_profile.ps1 @@ -37,7 +37,7 @@ Import-Module "$env:psmodules\fix_vpn.psm1" Import-Module $env:psmodules\house_shopping.psm1 # Load local source modules -# Import-Module $env:src\powershell-scripts\modules\AgileGitHub.psm1 +Import-Module $env:src\powershell-scripts\modules\AgileGitHubCLI.psm1 # Import-Module $env:src\powershell-scripts\modules\MarkdownGitHub.psm1 # Let's face it, I'm about to cd into my source directory diff --git a/files/env.ps1 b/files/env.ps1 index d27bd8c..54b969a 100644 --- a/files/env.ps1 +++ b/files/env.ps1 @@ -2,15 +2,16 @@ $env:Journal = "~\Journal" # allows cd $env:journal $env:todolist = "C:\Users\delaport\Journal\" # Tell my scripts which GitHub repositories to look in. $env:GITHUB_USERNAME = 'edthedev' +$env:GITHUB_CLONE_PATH = '~\src' $env:GITHUB_REPOS = @( 'techservicesillinois/SecOps-Tools', 'techservicesillinois/secdev-job-aids', 'techservicesillinois/awscli-login', 'techservicesillinois/farmit', - 'uillinois-community/uillinois-community.github.io', 'techservicesillinois/SecOps-Powershell-CSOC', 'techservicesillinois/SecOps-Powershell-CISDSC', 'techservicesillinois/secops-splunk-null-router' ) -join ' ' +# 'uillinois-community/uillinois-community.github.io', $ENV:TS_REPOS = $ENV:GITHUB_REPOS.split(' ') | Where { $_ -like 'techser*' } diff --git a/psmodules/dash.psm1 b/psmodules/dash.psm1 index 7e25e70..b300366 100644 --- a/psmodules/dash.psm1 +++ b/psmodules/dash.psm1 @@ -8,33 +8,88 @@ function Measure-JournalTodos() { $env:todocount += $todocount.lines } +<# + +.SYNOPSIS + +Show a text dashboard. + +.EXAMPLE + +Include `Todo` list. +Show-MyDashboard -todo + +#> function Show-MyDashBoard() { param( - [bool]$gitHub=$true + # [switch]$todocount=$true, + [switch]$agenda=$true, + [switch]$blocked, + [switch]$bugs, + [switch]$gitHub, + [switch]$help, + [switch]$leeroy, + [switch]$orphans, + [switch]$pr, + [switch]$requested, + [switch]$todo ) - Write-Host "" - Measure-JournalTodos - Write-Host "## Todo items for today: $env:todocount" - chart -var todocount - Write-Host "" - Write-Host "## Agenda for today:" - Get-JournalAgenda - Write-Host "" + $todocount = $true + if($todocount){ + Measure-JournalTodos + Write-Host "" + Write-Host "## Todo items for today: $env:todocount" + chart -var todocount + } + if($agenda){ + Write-Host "" + Write-Host "## Agenda for today:" + Get-JournalAgenda + } + if($blocked){ + Write-Host "" + Write-Host "## Blocked & Blocker Issues:" + Invoke-AgileCmd "gh issue list -S 'label:blocked,blocker'" + } + if($bugs) { + Write-Host "" + Write-Host "## Known Bugs" + Invoke-AgileCmd "gh issue list -S 'label:bug'" + } if($github) { - Write-Host "## GitHub Issues Assigned (Show-AgileMine)" - Show-AgileMine - Show-AgileMine -DaysAgo 6 - Write-Host "" - Write-Host "## GitHub Issues with no milestone. (Select-AgileNoMilestone)" - Write-Host "(Get-AgileQuery -state 'Open' | Invoke-AgileQuery | Select-AgileNoMilestone | Show-MarkdownFromGitHub)" - $milestone_repos = $env:github_repos.split(' ') | Where-Object { $_ -Match 'techservicesillinois' } - $queries = Get-AgileQuery -state 'Open' -repos $milestone_repos - Invoke-AgileQuery -queries $queries | Select-AgileNoMilestone | Show-MarkdownFromGitHub - } - Write-Host "" - Write-Host "Use command 'todolist' to list more tasks." - Write-Host "Use command 'chart -var todocount' to show todo item progress." - Write-Host "Use command 'agenda' to list the plan for today." + Write-Host "" + Write-Host "## GitHub Status (gh status)" + Invoke-Expression "gh status" + } + if($help) { + Write-Host "## Dasbhoard Help" + Get-Help Show-MyDashboard + } + if($leeroy){ + Write-Host "" + Write-Host "## Leeroy Jenkins!:" + Invoke-AgileCmd "gh issue list -l 'leeroy jenkins'" + } + if($orphans) { + Write-Host "" + Write-Host "## Issues with No Milestone" + Invoke-AgileCmd "gh issue list -S 'is:open is:issue no:milestone'" + } + if($pr) { + Write-Host "" + Write-Host "## Open Pull Requests" + Invoke-AgileCmd "gh pr list" + } + if($requested){ + Write-Host "" + Write-Host "## Open Stakeholder Requests" + invoke-agilecmd "gh issue list -S 'label:requested'" + } + if($todo) { + Write-Host "" + Write-Host "## Todo List" + todolist + } } function Show-MyTeamWork() {