Skip to content

Docker image debian base containing .Net Core SDK, PowerShell Core.x, NuGet, Pester, PSScriptAnalyzer, PowerShell-Yaml, ColorConsole, Nupsforge, Psmpacker, CSVerify, GitAutoVersion, and custom PowerShell Profile.

License

Notifications You must be signed in to change notification settings

phellams/phellams-automator

Repository files navigation

🐳 Phellams-Automator

                  ___
              ........          
        .    ..xxxxxx...   .   
          ≡-«( •)xx( •)»-≡                    _  _ 
              ..xxxx..                 /     // //  
               x[--]x.            _   /_  _ // // __.  ______  _  
            ....xxxx....         /_)_/ /_</_</_</_(_/|_/ / / <_/_)_
          ...xxxxxxxxxx...      / [P]owers[HELL][A]uto[M]ation[S]
       .... .xxxxxxxxxx. ....  `
      ...   .xxxxxxxxxx.   ...  
      ..    ..x......x..    ..  
     ....    .x.    .x.    .... 
    .////.  ..x.    .x... .    .
    ..//.    .x.    .x.   ./=/..
      /     .:x.    .x:. -| ■ Phellam Automator     
      ┋    ../..    ..\..-| ■ [ MIT ][ License ]
      ┋    -----    ----- | ■ v0.3.0                   
  ┌───┴───┐
  ▙ Shell ▟
─── ─ ••• ─ ─ ─────────────────────

Static Badge

About The Project

Debian base docker image base on Debian-slim, Used to build:

  • PowerShell Modules in the form or folder, .zip, or .nupkg.
  • Dotnet binaries.
  • Nuget packages for psgallary gitlab, github, and chocolatey.
  • codecov results.

Features

  • Copy Build files: Build-Module see the Psmpacker README for more information on how to use Psmpacker.
  • Build DotNet binaries: dotnet build see the README for more information on how to use dotnet build.
  • Package Nuget packages using nuget pack see:
  • Build Chocolatey packages using New-ChocoNuspecfile and New-ChocolateyPackage see the README for more details on how to use nupsforge.
  • Build nuget packages compatible with proget: New-NupecFile and New-NugetPackage see the README for more details on how to use nupsforge.
  • Generate Verification Checksums: New-VerificationFile from csverify see the README for more information on how to use csverify.
  • Generate Semantic Version: Get-SemanticVersion from csverify see the README for more information on how to use csverify.
  • Publish code coverage results to codecov
  • Run Powershell commands and scripts using default shell: pwsh -c './phellams/myscript.ps1'

Image Manifest

arc docker docker docker

🔵 Binaries

🔵 Common Binaries

🔵 Powershell Modules

  • ✅ Pester 5.5.0
    • Testing framework for PowerShell.
  • PsScriptAnalyzer 1.0
    • PowerShell Script Analyzer.
  • PowerShell-Yaml 1.0
    • PowerShell YAML parser.
  • ColorConsole
    • Colorful console output using ANSI escape sequences default powershell console color pallete.
  • Nupsforge
    • Nuget Package Generator: supports: psgallary, chocolatey, proget(psgallary,chocolatey), gitlab packages, github packages.
  • Psmpacker
    • Build folder Generator.
  • CSVerify
    • Code Verification via VERIFICATION.txt.
  • GitAutoVersion
    • Git Semantic Versioning generator.

🔵 Powershell Profile

  • powerShell.profile.ps1
    • Custom powershell profile with default output displaying image information: e.g. modules and binaries info included in the image.

Build

build

🟣 Building the container locally.

From:

gitlab-logo

git clone https://gitlab.com/phellams/phellams-automator.git
cd phellams-automator
docker build -t phellams-automator -f phellams-automator.dockerfile .
docker image inspect phellams-automator #| jq

# or use `phellams-automator-local-builder.ps1` powershell script
sudo pwsh -c './phellams-automator-local-builder.ps1'

github-logo

git clone https://github.com/phellams/phellams-automator.git
cd phellams-automator
docker build -t phellams-automator -f phellams-automator.dockerfile .
docker image inspect phellams-automator #| jq

# or use `phellams-automator-local-builder.ps1` powershell script
sudo pwsh -c './phellams-automator-local-builder.ps1'

Usage

🟣 Output container information.

docker run --rm phellams-automator

🟢 Mount paths examples for running commands inside the container.

# dynamic path
docker run -it -v .:/phellams-automator docker.io/sgkens/phellams-automator
# absolute path
docker run -it -v $(pwd):/phellams-automator docker.io/sgkens/phellams-automator

Or, if you want to use the absolute path with WSL2:

docker run -it -v $(wslpath -w $(pwd)):/phellams-automator docker.io/sgkens/phellams-automator

🟣 Some examples running commands inside the container.

# nuget
docker run --rm -v .:yourfolder docker.io/sgkens/phellams-automator nuget pack ./
# pester
docker run --rm -v .:yourfolder docker.io/sgkens/phellams-automator invoke-pester -script .\tests\tests.ps1
# psscriptanalyzer
docker run --rm -v .:yourfolder docker.io/sgkens/phellams-automator invoke-psscriptanalyzer -script .\tests\tests.ps1
# dotnet
docker run --rm -v .:yourfolder docker.io/sgkens/phellams-automator dotnet build
# gitautoversion
docker run --rm -v .:yourfolder docker.io/sgkens/phellams-automator (Get-Gitautoversion).Version

🟣 Interactive shell

docker run --rm -it -v .:yourfolder docker.io/sgkens/phellams-automator:latest

# Running script in container
docker run -it --rm -v $(pwd):/phellams -w /phellams sgkens/phellams-automator:latest pwsh -c './phellams/myscript.ps1'

Roadmap

🟡 Task List

  • Add Ruby support to allow building of jekyll websites
    • Add RubyGems support - required dependencies
  • Add toml support with ptoml
  • Add chocolatey support Chocolatey is not officially supported by linux* however it doesnt explicitly say it is not supported.
  • Fix outstanding Security Vulnerabilities reported by dockerhub vulnerability scanner.

Contributing

Feel free to contribute! Fork the repo and submit a merge request with your improvements. Or, open an issue with the enhancement tag to discuss your ideas.

  1. Fork the Project from git clone https://gitlab.com/phellams/phellams-automator.git
  2. Create your Feature Branch check out the branch dev git switch dev.
    1. git switch -c feature/AmazingFeature
    2. or
    3. git checkout -b feature/AmazingFeature
  3. Commit your Changes git commit -m 'Add some AmazingFeature'
  4. Push to the Branch git push origin feature/AmazingFeature
  5. Open a Merge Request

License

Distributed under the MIT License. See LICENSE.txt for more information.

About

Docker image debian base containing .Net Core SDK, PowerShell Core.x, NuGet, Pester, PSScriptAnalyzer, PowerShell-Yaml, ColorConsole, Nupsforge, Psmpacker, CSVerify, GitAutoVersion, and custom PowerShell Profile.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published