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

Support Profile patches #1536

Closed
dgageot opened this issue Jan 27, 2019 · 0 comments
Closed

Support Profile patches #1536

dgageot opened this issue Jan 27, 2019 · 0 comments

Comments

@dgageot
Copy link
Contributor

dgageot commented Jan 27, 2019

It's currently hard to change only a single field with profiles.

For example if one wants to change the Dockerfile for one of the artifacts in that yaml:

apiVersion: skaffold/v1beta3
kind: Config
build:
  artifacts:
  - image: gcr.io/k8s-skaffold/skaffold-app
    docker:
      dockerfile: Dockerfile
    context: app
  - image: gcr.io/k8s-skaffold/skaffold-web
    docker:
      dockerfile: Dockerfile
    context: web

then, the a profile has to duplicate all the artifacts definition:

profiles:
- name: DEV
  build:
  - image: gcr.io/k8s-skaffold/skaffold-app
    docker:
      dockerfile: Dockerfile.dev
    context: app
  - image: gcr.io/k8s-skaffold/skaffold-web
    docker:
      dockerfile: Dockerfile
    context: web

It would be nice if profiles supported patches like that:

profiles:
- name: DEV
  patches:
  - path: /build/artifacts/0/docker/dockerfile
    value: Dockerfile.dev
    op: replace

And if the default op is replace then we'd write:

profiles:
- name: DEV
  patches:
  - path: /build/artifacts/0/docker/dockerfile
    value: Dockerfile.dev
@dgageot dgageot self-assigned this Jan 28, 2019
dgageot added a commit to dgageot/skaffold that referenced this issue Jan 28, 2019
dgageot added a commit to dgageot/skaffold that referenced this issue Jan 28, 2019
dgageot added a commit to dgageot/skaffold that referenced this issue Jan 28, 2019
dgageot added a commit to dgageot/skaffold that referenced this issue Jan 29, 2019
dgageot added a commit to dgageot/skaffold that referenced this issue Jan 30, 2019
dgageot added a commit to dgageot/skaffold that referenced this issue Jan 31, 2019
@dgageot dgageot closed this as completed in 4c2ebfc Feb 1, 2019
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

1 participant