GoogleContainerTools / GoogleContainerTools/skaffold
refs for external skaffold dependencies
- Dominant language
- Go
- Stars
- 15.9k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
Hi folks,
Loving Skaffold, thanks for all the hard work on this!
I've been messing around with external configurations hosted in git repositories and wondering if there were more options for pining a dependency to something like a tag, rather than just the git branch. I noticed that there are a number of closed issues such as #7018 and #9430, which suggest that it's possible to pass a commit SHA to `git.ref` - I've given this a shot and it doesn't appear to be working. Just wondering if I'm missing something here - this seems like a really great enhancement.
Things I've tried:
I've created a simple configuration that reproduces the issue [here](https://github.com/maxplumley/skaffold-minimal)
setting `ref` to a commit SHA
```yaml
requires:
- git:
repo: https://github.com/maxplumley/skaffold-external.git
path: skaffold.yaml
ref: e919f57aae48bdb69c262dd26093a2debd433518
```
and running `skaffold dev`, results in this error
```txt
parsing skaffold config: error parsing skaffold configuration file: caching remote dependency https://github.com/maxplumley/skaffold-external.git: failed to clone repo: running [/opt/homebrew/bin/git clone https://github.com/maxplumley/skaffold-external.git ./eMqefSnXMmhKzHNfWBPPEaZGg22-V7Bo --branch e919f57aae48bdb69c262dd26093a2debd433518 --depth 1]
- stdout: ""
- stderr: "Cloning into './eMqefSnXMmhKzHNfWBPPEaZGg22-V7Bo'...\nfatal: Remote branch e919f57aae48bdb69c262dd26093a2debd433518 not found in upstream origin\n"
- cause: exit status 128
```
using Skaffold v2.16.1
Contributor guide
Assessment
This issue has not been assessed yet.