[Feature] Plugin version constraints
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 378
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 74
Description
This is a feature request, written with full knowledge of https://github.com/buildkite/agent/issues/422. It proposes a different approach.
Instead of attempting to "refresh on X interval" or "always fetch latest", I would like to be able to use the concept of version pinning or version constraints. This is in-line with the recommendation to use tags instead of branches, and could be implemented using a library such as https://github.com/Masterminds/semver#checking-version-constraints
Consider a stanza that today reads:
```yaml
steps:
- command: test.sh
plugins:
- docker-compose#v3.7.0:
run: app
```
We could introduce a concept like this:
```yaml
steps:
- command: test.sh
plugins:
- docker-compose#~3.6.1:
run: app
```
Or:
```yaml
steps:
- command: test.sh
plugins:
- docker-compose#^3.x:
run: app
```
The agent would, on detection of such a constraint, list all (semver compatible) tags from the remote repo and find the appropriate match. That way, a user can opt into things like: "Always newest within this major" or "just new patches within this minor" Or maybe even `*` to "do not care always latest".
Contributor guide
Assessment
This issue has not been assessed yet.