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

Overriding container build step nor working for maven-java11 buildpack #110

Open
anmiralles opened this issue Sep 28, 2020 · 1 comment
Open

Comments

@anmiralles
Copy link

anmiralles commented Sep 28, 2020

Hello everyone,

we are trying to override the "maven-java11" buildpack step for building the container. This step executes the following:

pipelines:
  pullRequest:
    build:
      steps:
      - sh: skaffold version
        name: skaffold-version
      - sh: export VERSION=$PREVIEW_VERSION && skaffold build -f skaffold.yaml
        name: container-build

And according to Jenkins X documentation we are overriding just like this (jenkins-x.yaml):

buildPack:  maven-java11
pipelineConfig:
  pipelines:
    overrides:
      - pipeline: pullRequest
        stage: build
        name: container-build
        steps:
          - name: container-build
            sh: export VERSION=$PREVIEW_VERSION && skaffold build -f skaffold-native.yaml
        type: replace

The final purpose is compile a quarkus native image for release pipeline but not for pullrequest one, because of the generation time.

The problem is that this step is not excuted as defined in "maven" buildpack, instead we are seeing that the executed command is related to kaniko:

- args:
    - -wait_file
    - /builder/tools/4
    - -post_file
    - /builder/tools/5
    - -entrypoint
    - /busybox/sh
    - --
    - -c
    - /kaniko/executor --cache=true --cache-dir=/workspace --context=/workspace/source
      --dockerfile=/workspace/source/Dockerfile --destination=gcr.io/OUR_PROJECT/warehouse-returns-event:0.0.0-SNAPSHOT-PR-73-4
      --cache-repo=gcr.io/OUR_PROJECT/cache
    command:
    - /builder/tools/entrypoint
    env:
    - name: HOME
      value: /builder/home
    - name: APP_NAME
      value: warehouse-returns-event 
    ......
    - name: VERSION
      value: 0.0.0-SNAPSHOT-PR-73-4
    - name: BUILD_ID
      value: "4"
    - name: GOOGLE_APPLICATION_CREDENTIALS
      value: /kaniko-secret/secret.json
    - name: PREVIEW_VERSION
      value: 0.0.0-SNAPSHOT-PR-73-4
    image: gcr.io/kaniko-project/executor:debug-v0.22.0
    imagePullPolicy: IfNotPresent
    name: step-build-container-build

Could anyone explain why are we getting this instead of the skaffold command.

Thanks in advance.

;)

@CarlesContell
Copy link

I am interested in this issue too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants