GoogleContainerTools/skaffold

Skaffold does not find previously built images from remote repository (GCP - GCR)

開放

#7,139 建立於 2022年2月22日

 (5 則留言) (0 個反應) (0 位負責人)Go (1,416 個分叉)batch import
area/buildhelp wantedkind/feature-requestpriority/p2

倉庫指標

星標
 (12,822 顆星)
PR 合併指標
 (平均合併 3天 6小時) (30 天內合併 16 個 PR)

描述

Expected behavior

Do not rebuild the docker image when it is cached on a remote docker registry even you don't have the cached image on local I saw the following old issue and PR, but the problem is still reproducible - https://github.com/GoogleContainerTools/skaffold/issues/2197 https://github.com/GoogleContainerTools/skaffold/pull/2470

Actual behavior

Rebuild the docker images regardless of the state on the remote registry. If you have the cached image removed from your local, skaffold will trigger a full build of all images.

Information

  • Skaffold version: v1.36.0
  • Operating system: macOS 12.1
  • Installed via: downloaded from Github
  • Contents of skaffold.yaml:
apiVersion: skaffold/v2beta27
kind: Config
metadata:
  name: deployment
build:
  googleCloudBuild:
    projectId: example
    timeout: "1800s"
    machineType: N1_HIGHCPU_8
  artifacts:
    - image: eu.gcr.io/example/push-events
      docker:
        dockerfile: backend/push-events-svc/Dockerfile
    - image: eu.gcr.io/example/gateway
      docker:
        dockerfile: backend/rgateway/Dockerfile
    - image: eu.gcr.io/example/dac-gateway
      docker:
        dockerfile: backend/dac-gateway/Dockerfile
    - image: eu.gcr.io/example/events-store
      docker:
        dockerfile: backend/eventstore/Dockerfile
    - image: eu.gcr.io/example/web-console
      context: web
      docker:
        dockerfile: Dockerfile
        buildArgs:
          ENVIRONMENT: production
  deploy:
    kubectl:
      manifests:
        - k8s/gke/test/deployment/**

Steps to reproduce the behavior

  1. run skaffold build
  2. cd ~/.skaffold && rm cache
  3. run skaffold build again - remote cache is not recognized, skaffold triggeres a full re-build of all images

貢獻者指南