GoogleContainerTools/skaffold

Jib args for file listing (dev mode)

Aperta

#6978 aperta il 23 dic 2021

 (1 commento) (0 reazioni) (0 assegnatari)Go (1416 fork)batch import
area/buildbuild/jibhelp wantedkind/feature-requestpriority/p3

Metriche repository

Star
 (12.822 stelle)
Metriche merge PR
 (Merge medio 3g 6h) (16 PR mergiate in 30 g)

Descrizione

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

Guida contributor