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

Disable image push after build for a specific image #8237

Open
GeertJohan opened this issue Dec 15, 2022 · 0 comments
Open

Disable image push after build for a specific image #8237

GeertJohan opened this issue Dec 15, 2022 · 0 comments

Comments

@GeertJohan
Copy link
Contributor

GeertJohan commented Dec 15, 2022

I have a scenario where it would be very useful to disable image pushing for a specific image.
Given the following skaffold.yaml (excerpt):

apiVersion: skaffold/v3
kind: Config
build:
  artifacts:
    - image: base-build
      context: .
      docker:
        dockerfile: base/Dockerfile.build
    - image: base-release
      context: .
      docker:
        dockerfile: base/Dockerfile.release 
    - image: my-app
      context: .
      docker:
        dockerfile: my-app/Dockerfile
      requires:
        - image: base-build
          alias: BASE_BUILD
        - image: base-release
          alias: BASE_RELEASE

... more app builds which all use the base-build and base-release images.

And my-app/Dockerfile:

ARG BASE_BUILD
ARG BASE_RELEASE

FROM $BASE_BUILD as build

.. steps to build the app

FROM $BASE_RELEASE as release

COPY --from=build /build/dist/bin/my-app /usr/local/bin/my-app

The base-build image is always uploaded, but it doesn't have to be. It's never used as a release stage of a multi-stage app Dockerfile so the layers cannot be re-used. The build image is quite large (gigabytes) because it has a huge amount of compilers and lib*-dev's installed. Uploading it takes a long time for developers using the setup.

It would be great if there could be some kind of build.artifacts[0].push: Never to override the build.local.push value for a specific artifact/image.

I'd be happy to work on this once we have a good design/specs for it.

@GeertJohan GeertJohan changed the title Override pushing per image Disable image push after build for a specific image Dec 15, 2022
@aaron-prindle aaron-prindle added priority/p0 Highest priority. We are actively looking at delivering it. priority/p2 May take a couple of releases area/build area/push and removed priority/p0 Highest priority. We are actively looking at delivering it. labels Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants