my127 / workspace

Development environment tooling
MIT License
16 stars 13 forks source link

Support additional repository types #169

Open NoDiskInDriveA opened 6 months ago

NoDiskInDriveA commented 6 months ago

Adds support for

Also configures repositories via service config and fixes some pointless tests.

Still dirty and experimental, I feel package/layer management deserves a bit of refactoring to support multiple repo types.

NoDiskInDriveA commented 6 months ago

Thinking of it, the "repository" abstraction only makes sense for the original package management pulling from the JSON list...

andytson-inviqa commented 6 months ago

a github repository that can access harness layers on github specifically

thanks, I wanted this. It seems cumbersome to manually manage the harnesses.json we publish, and make it easier to reference custom github harness layers.

One thing that's stopped me from doing this so far was deciding how to handle the path detection, whether to have a rickety regex or use url schemes, like github://inviqa/harness-docker:0.4.0. Uri schemes can be matched with url parsing and using the scheme

Also I was thinking about targeting specific release artifacts like github://inviqa/harness-base-php:0.2.0:harness-magento2.tgz but maybe a https url is fine for that

andytson-inviqa commented 6 months ago

github:inviqa/harness-docker:0.4.0 is also a valid Uri format, with no "host"

NoDiskInDriveA commented 6 months ago

@andytson-inviqa As of now, this is a bit of a POC, I opened the PR just to give some visibility on what I'm experimenting with. I decided to implement the easiest case, but it could be built on. We're technically already doing some rickety detection on package names 😬 but I agree, also it's currently quite heterogenuous. We could decide on a format - maybe requiring a scheme and fall back to packages when none is detected - and implement that through all sources. Extend the package type to actually hold some structured information, maybe introduce a short-/longform harnesslayers struct similar to how command works if we don't want to parse URIs. There's lots of options 😄

NoDiskInDriveA commented 6 months ago

But if you're interested, I can continue this on the weekend, maybe do some refactoring to support this better.