GoogleContainerTools/skaffold

Jib args for file listing (dev mode)

Open

#6,978 opened on Dec 23, 2021

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Go (1,416 forks)batch import
area/buildbuild/jibhelp wantedkind/feature-requestpriority/p3

Repository metrics

Stars
 (12,822 stars)
PR merge metrics
 (Avg merge 3d 6h) (16 merged PRs in 30d)

Description

Skaffold allows to add arguments to the Jib build, but not to list the files (in dev mode).

When your gradle.settings uses some flags to prune projects (-P buildX=true), Skaffold does not allow to pass those flags to the Gradle Jib plugin while calling _jibSkaffoldFilesV2

Could you please add support to pass args not only to the Jib build but also to the Jib listing ?

Expected behavior

When using 'dev' mode, while listing files the jib arguments (jib/args) are passed to the underlying Jib system. Or another set of Jib args should be available for this purpose.

Actual behavior

When using 'dev' mode, while listing files the jib arguments (jib/args) are not passed to the underlying Jib system (_jibSkaffoldFilesV2).

Information

  • Skaffold version: v1.35.0
  • Operating system: Linux 5.11.0-41-generic
  • Installed via: skaffold.dev
  • Contents of skaffold.yaml:
apiVersion: skaffold/v2beta19
kind: Config
profiles:
- name: backend-angular
  patches:
  - op: add
    path: /build/artifacts/-
    value:
      image: registry.local.vaph.be/vaph/sparta/actoren-remote
      jib:
        args:
        - -xtest
        project: services:actoren:actoren-remote
  - op: add
    path: /build/artifacts/-
    value:
      image: registry.local.vaph.be/vaph/sparta/angular-clients
      jib:
        args:
        - -Pangular=true
        - -xtest
        project: clients:angular-clients

Steps to reproduce the behavior

skaffold run -p backend-angular builds the projects honoring the jib args and runs the containers

skaffold dev -p backend-angular when listing the files, fails to take the jib args into account

Contributor guide