Comments (14)
@ciriarte first pass for git ref selection is on develop. example: https://github.com/k14s/vendir/blob/develop/examples/versionselection/vendir.yml. give it a go and lmk.
from vendir.
+1 It will really helpful as we are also planning to consume other external components as libraries and this would help us to pin to a particular version.
from vendir.
i wonder if we should make this functionality more generic since vendir currently supports git and github release, but will also support sources such as docker images, helm charts, etc. ... or does it make sense to just keep it source specific?
from vendir.
+1 for this.
The syntax I have used for this in the past was something like this BTW [1.0.0, 2.0.0)
; i.e. get the latest available from 1.0.0 up to but excluding 2.0.0.
from vendir.
i wonder if we should make this functionality more generic since vendir currently supports git and github release, but will also support sources such as docker images, helm charts, etc. ... or does it make sense to just keep it source specific?
Yes. It shouldn't be specific to a source.
from vendir.
sources:
- git (via tags)
- githubRelease (via tags)
- helm chart (via versions)
- image (via tags)
- http (???)
from vendir.
The Pivnet resource (and various other Concourse-ecosystem resources) accomplish some of this with regex filters; this allows expressive constraints of what versions will be included/excluded without having to create/document/maintain yet-another version specification DSL, or adopt one of the various (sometimes pretty complex) existing ones.
This also allows a distinction between the "explicit string" version
key and a mutually-exclusive version-regex
string, if desired.
Why not allow, for example,
version-regex: ^v1\..*
This also allows the use of sub-groups when using tags, and wanting to both be able to designate the "version" part while also being able to select from among multiple potentially version-matching tags, such as release-v1.0.0
and candidate-v1.0.0
, for example.
from vendir.
it seems to be pretty uncommon to use regex for version constraints compared to ">=1, <2" commonly found in various package managers.
from vendir.
I like https://github.com/Masterminds/semver because it tries to be compatible with other package managers (in version 3+). Also, they have a a cli to perform quick validations https://github.com/Masterminds/vert which is useful for scripts/pipeline composition.
e.g. I often end up mucking with git describe --tags
but vert already supports the transformation/filtering:
$ vert -g ^1 $(git describe --tags)
1.0.1+32.fef45
from vendir.
currently using hashicorps' go-version library (https://github.com/k14s/vendir/blob/develop/docs/versions.md).
from vendir.
@ciriarte first pass for git ref selection is on develop. example: https://github.com/k14s/vendir/blob/develop/examples/versionselection/vendir.yml. give it a go and lmk.
This is awesome. Will do and report back!
from vendir.
included in https://github.com/k14s/vendir/releases/tag/v0.11.0
from vendir.
switched to blang/semver in cb32f5a. this allows more control over when prerelease versions are included or not. added examples: https://github.com/k14s/vendir/blob/develop/docs/versions.md#examples. change will be available in v0.12.0+
from vendir.
updates are in https://github.com/k14s/vendir/releases/tag/v0.12.0
from vendir.
Related Issues (20)
- Failure on specific directory sync with --directory flag
- Only run sync for stable versions, if vendir.yaml has changed since last sync HOT 4
- http fails to unpack certain tar.gz files HOT 3
- Json schema for vendir spec HOT 2
- Are you using vendir? HOT 2
- Problems to init a new package using our Helm repo (Azure Blob) HOT 3
- Support dangerousSkipTLSVerify option when fetching from http server. HOT 2
- Confusion about what `path` actually represents HOT 2
- Sign `vendir` binaries while releasing them HOT 1
- Error when using --directory and --locked option at the same time HOT 1
- Use vanity urls to change the go module name
- issue with lazy sync functionality HOT 1
- Vendir directory sync ignores overlapping paths on directories HOT 3
- Timeouts when attempting to use vendir with a registry with a significant amount of tags HOT 3
- Concurrent vendir processes interfere with each other
- Lazy sync doesn't work for the same path in different forms HOT 1
- Vendir allows self-destructing configuration HOT 4
- Vendir is failing to fetch content if private-key does not have newline at the end
- Vendir allows to use unsafe paths in configuration HOT 2
- vendir sync --json swallows error HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vendir.