GoogleContainerTools / GoogleContainerTools/skaffold
Where should I set the skaffold.env to load my parameter to the skaffold.yaml?
- Dominant language
- Go
- Stars
- 15.9k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
### Expected behavior
skaffold.yaml can read the env variable `WORKSPACE` and worked as expexted.
### Actual behavior
Error:`parsing skaffold config: error parsing skaffold configuration file: parsing api version: yaml: line 13: did not find expected key`
### Information
- Skaffold version: v2.13.2
- Operating system: jenkins
I built like this
```
-ope/skaffold
|_myservice
|_skaffold.yaml
|_skaffold.env
```
- Contents of skaffold.yaml:
```yaml
# Deprecated
apiVersion: skaffold/v2beta26
kind: Config
metadata:
name: myservice
build:
tagPolicy:
gitCommit: {}
local:
push: true
useDockerCLI: true
artifacts:
- image: dataservice
context: '{{.WORKSPACE}}'/dist/
docker:
dockerfile: ../ope/docker/myservice/Dockerfile
deploy: ......
```
- Contents of skaffold.env:
`WORKSPACE=/var/lib/jenkins/workspace/my_target_value`
I saw the page here, https://skaffold.dev/docs/environment/env-file/, but seems it didn't work.
Contributor guide
Assessment
This issue has not been assessed yet.