Skaffold: Kaniko Build-Order/Dependencies

Created on 26 Aug 2019  Â·  5Comments  Â·  Source: GoogleContainerTools/skaffold

Expected behavior

Ability to specify some kind of build-order.
E.g. we have a base-image, on which all other in this repository depend. So this would need to be build first.

Actual behavior

Image-build fails / Build uses old version of base.

Information

  • Skaffold version: v0.36.0
  • Operating system: Ubuntu-18.04
  • Contents of skaffold.yaml:
apiVersion: skaffold/v1beta13
kind: Config
build:
  artifacts:
    - image: hub.XYZ.net/sys/ci/demo-recipe-amp/base
      context: components/base
      kaniko:
        buildContext:
          localDir: {}
        cache: {}    
    - image: hub.XYZ.net/sys/ci/demo-recipe-amp/app
      context: components/app
      kaniko:
        buildContext:
          localDir: {}
        cache: {}    
    - image: hub.XYZ.net/sys/ci/demo-recipe-amp/composer
      context: components/composer
      kaniko:
        buildContext:
          localDir: {}
        cache: {}

  cluster:
    pullSecretName: XYZ
    namespace: sys-ci-gitlab-runner
    dockerConfig:
      path: ~/.docker/config.json
deploy:
  kubectl:
    manifests:
      - config/kubernetes-templates/prod/*yml

Steps to reproduce the behavior

  1. make one Dockerfile depend on aonther one in you scaffold project.
  2. skaffold build
areartifact-dependencies arebuild areci-cd builkaniko kinfeature-request prioritp3

Most helpful comment

@strowi thanks. Right now, we don't have a a way to specify build dependencies. This is something we are looking into.

Sorry, currently we don't have a work around for this.

Thanks
Tejal

All 5 comments

@strowi thanks. Right now, we don't have a a way to specify build dependencies. This is something we are looking into.

Sorry, currently we don't have a work around for this.

Thanks
Tejal

It looks somewhat related to #889 .

BTW, don't you guarantee the build order to be the same as items in the artifacts list? Cause if so, someone could you this as a workaround, at least for skaffold build invocation.

@prokher at least with the cluster-build there is no build-order, since this will start all builds in parallel.

With #2786, you can now enforce sequential building for clusters with the cluster.concurrency setting:

  cluster:
    concurrency: 1

Closing — will reopen if this doesn't work.

Was this page helpful?
0 / 5 - 0 ratings