skaffold deploy (and even skaffold fix) validates existence of "build->artifacts->context"

Created on 3 Aug 2020  路  4Comments  路  Source: GoogleContainerTools/skaffold

Expected behavior

Existence of "build->artifacts->context" path has no bearing on "deploy" (nor "fix", nor any other pipeline that does not need it, so "build" only???). When using "deploy" separately from "build", context path (which is used for "build") is not guaranteed to exist during "deploy". Does "deploy" need context anyway?

Actual behavior

Error thrown stating that context does not exist.

invalid skaffold config: image "some.azurecr.io/myproject" context "./publish/myproject/" does not exist

Information

  • Skaffold version: 1.13.0
  • Operating system: Windows and Linux, others unsure
  • Contents of skaffold.yaml:
apiVersion: skaffold/v1
kind: Config
build:
  artifacts:
  - image: some.azurecr.io/myproject
    context: "./publish/myproject/"
    docker:
      dockerfile: "./path/to/some/Dockerfile"
deploy:
  kubectl:
    manifests:
    - myproject/deployment.yaml

Steps to reproduce the behavior

  1. skaffold build (or skaffold fix) above skaffold.yaml
  2. To see a working version just comment out "context" or provide existing path.
kinbug kinusability prioritp2

All 4 comments

Your expected behavior definitely sounds reasonable. I'll discuss in our weekly triage what, if anything, necessitated the existence of a build context always.

Also would like to point out that this behavior was introduced in 1.13.0. Our workaround right now is to use v1.12.1.

This was introduced by #4492.

Confirming it is fixed in v1.13.2. Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gbird3 picture gbird3  路  3Comments

yurchenkosv picture yurchenkosv  路  3Comments

abatilo picture abatilo  路  4Comments

heroic picture heroic  路  4Comments

garvincasimir picture garvincasimir  路  4Comments