GoogleContainerTools / GoogleContainerTools/skaffold

skaffold init fails to identify proper workspace for artifact

Open
#3,760 4 comments 0 reactions 0 assignees View on GitHub
area/init dogfood/helm kind/bug priority/p3
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

```
➜ getting-started git:(master) ✗ tree
.
├── README.md
└── app
├── deploy
│   ├── Dockerfile
│   └── k8s-pod.yaml
└── main.go

2 directories, 4 files

➜ getting-started git:(master) ✗ skaffold init
apiVersion: skaffold/v2alpha4
kind: Config
metadata:
name: getting-started
build:
artifacts:
- image: skaffold-example
context: app/deploy
deploy:
kubectl:
manifests:
- app/deploy/k8s-pod.yaml

Do you want to write this configuration to skaffold.yaml? [y/n]: y
Configuration skaffold.yaml was written
You can now run [skaffold build] to build the artifacts
or [skaffold run] to build and deploy
or [skaffold dev] to enter development mode, with auto-redeploy

➜ getting-started git:(master) ✗ skaffold dev
Listing files to watch...
- skaffold-example
FATA[0000] watching files for artifact skaffold-example: listing files: listing files: file pattern [main.go] must match at least one file
```

the `context` generated in the build config is `app/deploy`, which is where it found the **builder**, but it should actually be `app/`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.