Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skaffold init can produce an erroneous config with non-default Dockerfile name #3405

Closed
dgageot opened this issue Dec 19, 2019 · 0 comments · Fixed by #3406
Closed

skaffold init can produce an erroneous config with non-default Dockerfile name #3405

dgageot opened this issue Dec 19, 2019 · 0 comments · Fixed by #3406
Labels
area/init kind/bug Something isn't working priority/p2 May take a couple of releases

Comments

@dgageot
Copy link
Contributor

dgageot commented Dec 19, 2019

Run skaffold init on a folder that looks like this:

./front/main.go
./front/DockerfileProd
./k8s.yaml

It should produce this config:

apiVersion: skaffold/v2alpha1
kind: Config
metadata:
  name: getting-started
build:
  artifacts:
  - image: gcr.io/k8s-skaffold/skaffold-example
    context: front
    docker:
      dockerfile: DockerfileProd
  tagPolicy:
    gitCommit: {}
  local: {}
deploy:
  kubectl:
    manifests:
    - k8s.yaml

It instead produces this config:

apiVersion: skaffold/v2alpha1
kind: Config
metadata:
  name: getting-started
build:
  artifacts:
  - image: gcr.io/k8s-skaffold/skaffold-example
    context: front
    docker:
      dockerfile: front/DockerfileProd
  tagPolicy:
    gitCommit: {}
  local: {}
deploy:
  kubectl:
    manifests:
    - k8s.yaml
@dgageot dgageot added kind/bug Something isn't working area/init labels Dec 19, 2019
dgageot added a commit to dgageot/skaffold that referenced this issue Dec 19, 2019
Signed-off-by: David Gageot <david@gageot.net>
@balopat balopat added the priority/p2 May take a couple of releases label Dec 19, 2019
dgageot added a commit to dgageot/skaffold that referenced this issue Dec 20, 2019
Signed-off-by: David Gageot <david@gageot.net>
dgageot added a commit to dgageot/skaffold that referenced this issue Dec 20, 2019
Signed-off-by: David Gageot <david@gageot.net>
dgageot added a commit to dgageot/skaffold that referenced this issue Dec 20, 2019
Signed-off-by: David Gageot <david@gageot.net>
dgageot added a commit that referenced this issue Dec 20, 2019
* Remove duplication

Signed-off-by: David Gageot <david@gageot.net>

* Remove some more duplication

Signed-off-by: David Gageot <david@gageot.net>

* Simplify code

Signed-off-by: David Gageot <david@gageot.net>

* Remove duplication

Signed-off-by: David Gageot <david@gageot.net>

* Fix #3405

Signed-off-by: David Gageot <david@gageot.net>

* Simplify code

Signed-off-by: David Gageot <david@gageot.net>

* Use similar code for every artifact type

Signed-off-by: David Gageot <david@gageot.net>

* Fix typo

Signed-off-by: David Gageot <david@gageot.net>

* Make sure we generate the same yaml as we used to

Signed-off-by: David Gageot <david@gageot.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/init kind/bug Something isn't working priority/p2 May take a couple of releases
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants