Git Product home page Git Product logo

parcel's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

parcel's Issues

New "provider" property, to allow further custom configuration of providers

To allow for further custom configuration of providers, there should be a new providers: block.

This should allow for custom sources, and custom global args that will be used for each package of that provider.

providers:
  choco:
    sources:
    - name: '<source-name>'
      url: '<source-url>'
    args:
      install: '--noprogress'

  scoop:
    sources:
    - name: '<bucket-name>'
      url: '<bucket-url>'

YamlDotNet.dll Missing?

Expected Behaviour

Imported module!

Actual Behaviour

Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly '..badgerati\Parcel\src\lib\YamlDotNet\netstandard2.1\YamlDotNet.dll'. The system cannot find the file specified."

Steps to reproduce

Import-Module ./src/Parcel.psd1 -Force
Windows 10 - Pwsh 6.2.3
MacOS - pwsh 6.2.0

New "scripts" property to setup global pre/post scripts

Packages each have their own pre/post install/uninstall script properties, as well as each provider - soon. This is to create a global one for running a pre-install script before all installations begins (etc.):

---
scripts:
  pre:
    install:
    uninstall:
  post:
    install:
    uninstall:

packages:
- name: etc

This can just re-use the same [ParcelScripts] class like packages.

Script "repo" and tags

Here are some ideas

Well, sometimes its not there, on any repo, and sometimes its more then 1 dep you want to handle as unit.. Not sure if pre/post/when can fit into this semantics...

Here is example from my personal project (never published it...). See those where Repo is script.

packages.ps1

<# Notes
    - Packages are installed via Install-Dependencies. See its help page for details.
    - SqlServer2016 installation requires project environment loaded into global $Environment variable.
    
#>

[ordered]@{

"invoke-build"    = @{ Repository = 'Chocolatey'; Tags = 'build test'; Version = '5.4.1' }
"dotnetcore-sdk"  = @{ Repository = 'Chocolatey'; Tags = 'build';   Version = '2.1.301' }
"dotnetcore"      = @{ Repository = 'Chocolatey'; Tags = 'runtime'; Version = '2.1.1' }

"papercut"        = @{ Repository = 'Chocolatey'; Tags = 'test'  }
"pester"          = @{ Repository = 'PSGallery';  Tags = 'test'; Version = '4.4.2'; Options = @{ Force = $true; SkipPublisherCheck = $true } }

"IIS"             = @{ 
                       Repository = 'Windows'
                       Name       = 'Web-WebServer'
                       Tags 	  = 'runtime_iis'
                       Options    = @{ IncludeAllSubFeature = $true; IncludeManagementTools = $true } 
                    }

"dotnetcore-windowshosting" = @{ Repository = 'Chocolatey'; Tags = 'runtime_iis' }
                    
"SqlServer2016"   = @{ 
                       Repository = 'Script'
                       Tags       = 'db-local'
                       Script     = "https://github.com/majkinetor/Install-SqlServer/blob/master/Install-SqlServer.ps1"
                       Options    = @{
                           Features        = 'SQLEngine'
                           IsoPath         = $Environment.db.SqlServer.ISOPath
                           ShareCredential = $Environment.db.OS.Users.Deploy_Credential
                           SaPassword      = $Environment.db.SqlServer.Users.Admin | Select -Index 1
                       }
                       Test       = { (Get-Service mssql* -ea 0) -ne $null }
                    }

 "Invoke-Sqlcmd"  = @{
                       Repository = 'Script'
                       Tags = 'db-remote', 'test'
                       Script = { cinst -y sql2014.clrtypes sql2014.smo sql2014-powershell }
                       Test = { 
                            (ls "${Env:ProgramFiles(x86)}\Microsoft SQL Server" -Include SQLPS.psd1 -Recurse -ea 0) -ne $null -or
                            (ls "${Env:ProgramFiles}\Microsoft SQL Server" -Include SQLPS.psd1 -Recurse -ea 0) -ne $null
                       }
                    }
}

Tags are also interesting concept.

It allows me to keep everything 3rd party in single hashtable and cherry pick what I need in specific context based on tags:

Install-Dependencies -Tags build, test # install all matching 'build' or 'test'
Install-Dependencies -Tags { (build -and runtime) -or test } # complex tag expression

This allows me to do some funky stuff in invoke build

task build {
   Install-Dependencies -tags build    #install dotnet core sdk & friends
   # do build stuff...
}

task test {
   Install-Dependencies -tags runtime, test, db-local  #install dotnet core runtime, pester, db
}

This means I can give the same build file to bunch of teams, and they get installed just what they need for their particular domain.

Support for custom Arguments

At the moment, you can't supply any custom optional arguments for a package/provider - such as -MinimumVersion for Install-Module.

This should be do via a new args property:

---
packages:
- name: Pode
  provider: psgallery
  args: -MinimumVersion 1.0.1

Support for latest versions

At the moment, you need to always supply an actual version - even for latest versions, rather than just "latest".

Like with Fudge, when no version or latest is supplied, the actual latest version should be retrieved. This allows us to show what version is actually being installed, and to use when uninstalling.

---
packages:
- name: 7zip
  provider: choco
  version: latest #< this should be possible

Feature Request: Integrate Pode.Web into Parcel

Integrating Pode/Pode.Web into Parcel could offer a great feature set. This includes:

  • An API
  • A web interface that where you could add computers to deployment groups, edit options that would end up editing yaml config files, read yaml config files, schedule deployments, scan added computers for currently installed packages, etc.

These examples should be defined as separate requests, so this feature request is solely the integration of Pode.Web into Parcel to leverage Pode.Web's feature set into future Parcel builds.

Support for custom Sources/Repository

Currently the installs occur from the official sources, there should be support for custom sources (like on choco/psgallery, or for scoop and its buckets):

---
packages:
- name: 7zip.install
  provider: choco
  source: http://some.custom.source.com

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.