cloud-builders-community icon indicating copy to clipboard operation
cloud-builders-community copied to clipboard

[kustomize] the installed binary is not in PATH.

Open pokutuna opened this issue 3 years ago • 0 comments

Instead of the given _KUSTOMIZE_VERSION, the working version is from gcr.io/cloud-builders/gcloud.

Affected builder image

gcr.io/cloud-builders-community/kustomize

Expected Behavior

kustomize works with the version in _KUSTOMIZE_VERSION.

Actual Behavior

kustomize works v3.6.1 which from the base image google-cloud-sdk.

Steps to Reproduce the Problem

  1. Build a image following the README.
$ cd kustomize
$ gcloud builds submit . --config=cloudbuild.yaml --substitutions=_KUSTOMIZE_VERSION=v4.1.3
Creating temporary tarball archive of 6 file(s) totalling 6.2 KiB before compression.
 ...
Starting Step #1
Step #1: Already have image: gcr.io/pokutuna-playground/kustomize:latest
Step #1: {Version:v3.6.1 GitCommit:a0072a2cf92bf5399565e84c621e1e7c5c1f1094 BuildDate:2020-06-15T20:19:11Z GoOs:linux GoArch:amd64}
Finished Step #1
PUSH
  1. Build with this cloudbuild.yaml
steps:
  - name: 'gcr.io/$PROJECT_ID/kustomize:v4.1.3'
    entrypoint: bash
    args:
    - '-c'
    - 'which kustomize'
  - name: 'gcr.io/$PROJECT_ID/kustomize:v4.1.3'
    args:
    - 'version'
    env:
    - CLOUDSDK_COMPUTE_ZONE=asia-northeast1
    - CLOUDSDK_CONTAINER_CLUSTER=prd

output

Starting Step #0
Step #0: Pulling image: gcr.io/pokutuna-playground/kustomize:v4.1.3
...
Step #0: gcr.io/pokutuna-playground/kustomize:v4.1.3
Step #0: /builder/google-cloud-sdk/bin//kustomize        # this line is from `which kustomize`
Finished Step #0
Starting Step #1
Step #1: Already have image (with digest): gcr.io/pokutuna-playground/kustomize:v4.1.3
Step #1: Running: gcloud container clusters get-credentials --project="pokutuna-playground" --zone="asia-northeast1" "dev"
Step #1: Fetching cluster endpoint and auth data.
Step #1: kubeconfig entry generated for dev.
Step #1: {Version:v3.6.1 GitCommit:a0072a2cf92bf5399565e84c621e1e7c5c1f1094 BuildDate:2020-06-15T20:19:11Z GoOs:linux GoArch:amd64}

pokutuna avatar Jul 03 '21 08:07 pokutuna