badgerati / parcel Goto Github PK
View Code? Open in Web Editor NEWCross-platform PowerShell package manager and provisioner
License: MIT License
Cross-platform PowerShell package manager and provisioner
License: MIT License
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>'
Imported module!
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."
Import-Module ./src/Parcel.psd1 -Force
Windows 10 - Pwsh 6.2.3
MacOS - pwsh 6.2.0
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.
Add in support for the -WhatIf
parameter. If supplied, Parcel should just display what would be installed/uninstalled without actually actioning it.
Support brew on MacOS
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.
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
Add support for downloading docker images
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
Integrating Pode/Pode.Web into Parcel could offer a great feature set. This includes:
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.
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
As per the subject. such as:
- import-packages: ./path/parcel.yml
[when | os | environment]
- import-providers
- import-scripts
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.