GoogleCloudPlatform / cloud-builders-community

Community-contributed images for Google Cloud Build
https://cloud.google.com/cloud-build/
Apache License 2.0
1.25k stars 851 forks source link

Gcloud builds submit fails with "gcr.io/$PROJECT_ID/helm" #642

Closed pablojabdala closed 8 months ago

pablojabdala commented 8 months ago

Affected builder image

gcr.io/cloud-builders-community/helm

Expected Behavior

Obtain the cloud builder for the helm working.

Actual Behavior

Inside the helm directory I run: gcloud builds submit --config cloudbuild.yaml . Step 0 from cloudbuild.yaml finish successfully but Step 1 failed:

_starting build "1f784b87-12d4-436d-a4f9-0bfbdaff1c34"

FETCHSOURCE Fetching storage object: gs://cluster1-406519_cloudbuild/source/1702655757.961235-3ede6ed5e7dc48f582cbede1c20b9d75.tgz#1702655758247568 Copying gs://cluster1-406519_cloudbuild/source/1702655757.961235-3ede6ed5e7dc48f582cbede1c20b9d75.tgz#1702655758247568... / [0 files][ 0.0 B/ 3.5 KiB]
/ [1 files][ 3.5 KiB/ 3.5 KiB]
Operation completed over 1 objects/3.5 KiB.
BUILD Starting Step #0 Step #0: Already have image (with digest): gcr.io/cloud-builders/docker Step #0: Sending build context to Docker daemon 15.87kB

Step #0: Step 1/9 : FROM gcr.io/cloud-builders/gcloud Step #0: ---> d02ddb1df5e3 Step #0: Step 2/9 : ARG HELM_VERSION=v3.12.0 Step #0: ---> Running in 82befb14c298 Step #0: Removing intermediate container 82befb14c298 Step #0: ---> 7e3811eae7be Step #0: Step 3/9 : ENV HELM_VERSION=$HELM_VERSION Step #0: ---> Running in f3156fd2dfa1 Step #0: Removing intermediate container f3156fd2dfa1 Step #0: ---> 5e7fccf1e142 Step #0: Step 4/9 : ENV USE_GKE_GCLOUD_AUTH_PLUGIN=True Step #0: ---> Running in 68551ab54c46 Step #0: Removing intermediate container 68551ab54c46 Step #0: ---> c96f4197d8dd Step #0: Step 5/9 : COPY helm.bash /builder/helm.bash Step #0: ---> 03b400a3f75e Step #0: Step 6/9 : RUN chmod +x /builder/helm.bash && mkdir -p /builder/helm && apt-get update && apt-get install -y --no-install-recommends curl && curl -SL https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz -o helm.tar.gz && tar zxvf helm.tar.gz --strip-components=1 -C /builder/helm linux-amd64 && rm helm.tar.gz && apt-get --purge -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/ Step #0: ---> Running in adc16ee663f7 Step #0: Get:1 http://ppa.launchpad.net/git-core/ppa/ubuntu focal InRelease [23.8 kB] Step #0: Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB] Step #0: Get:3 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB] Step #0: Get:4 http://ppa.launchpad.net/git-core/ppa/ubuntu focal/main amd64 Packages [3171 B] Step #0: Get:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB] Step #0: Get:6 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB] Step #0: Get:7 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [3283 kB] Step #0: Get:8 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [177 kB] Step #0: Get:9 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [33.4 kB] Step #0: Get:10 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1275 kB] Step #0: Get:11 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [29.3 kB] Step #0: Get:12 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [3130 kB] Step #0: Get:13 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB] Step #0: Get:14 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [1149 kB] Step #0: Get:15 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [3761 kB] Step #0: Get:16 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1444 kB] Step #0: Get:17 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [3279 kB] Step #0: Get:18 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [32.0 kB] Step #0: Get:19 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [28.6 kB] Step #0: Get:20 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [55.2 kB] Step #0: Fetched 29.6 MB in 3s (8767 kB/s) Step #0: Reading package lists... Step #0: Reading package lists... Step #0: Building dependency tree... Step #0: Reading state information... Step #0: curl is already the newest version (7.68.0-1ubuntu2.21). Step #0: The following packages were automatically installed and are no longer required: Step #0: binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-9 dpkg-dev Step #0: fakeroot g++-9 gcc-9 gcc-9-base libalgorithm-diff-perl Step #0: libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan5 libatomic1 Step #0: libbinutils libcc1-0 libctf-nobfd0 libctf0 libdpkg-perl libfakeroot Step #0: libfile-fcntllock-perl libgcc-9-dev libgomp1 libisl22 libitm1 Step #0: liblocale-gettext-perl liblsan0 libmpc3 libmpfr6 libpython3-dev libpython3.8 Step #0: libpython3.8-dev libquadmath0 libstdc++-9-dev libtsan0 libubsan1 make Step #0: python-pip-whl python3-dev python3-distutils python3-lib2to3 Step #0: python3-setuptools python3-wheel python3.8-dev zlib1g-dev Step #0: Use 'apt autoremove' to remove them. Step #0: 0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded. Step #0:   % Total % Received % Xferd Average Speed Time Time Time  Current Step #0:   Dload Upload Total Spent Left Speed Step #0:  0 0  0  0 0  0  0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0  0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 100 15.2M 100 15.2M 0 0 9.9M 0 0:00:01 0:00:01 --:--:-- 9.9M Step #0: linux-amd64/helm Step #0: linux-amd64/README.md Step #0: linux-amd64/LICENSE Step #0: Reading package lists... Step #0: Building dependency tree... Step #0: Reading state information... Step #0: The following packages will be REMOVED: Step #0: binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-9 dpkg-dev Step #0: fakeroot g++-9 gcc-9 gcc-9-base libalgorithm-diff-perl Step #0: libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan5 libatomic1 Step #0: libbinutils libcc1-0 libctf-nobfd0 libctf0 libdpkg-perl libfakeroot Step #0: libfile-fcntllock-perl libgcc-9-dev libgomp1 libisl22 libitm1 Step #0: liblocale-gettext-perl liblsan0 libmpc3 libmpfr6 libpython3-dev Step #0: libpython3.8 libpython3.8-dev libquadmath0 libstdc++-9-dev libtsan0 Step #0: libubsan1 make python-pip-whl python3-dev python3-distutils Step #0: python3-lib2to3 python3-setuptools python3-wheel python3.8-dev Step #0: zlib1g-dev* Step #0: 0 upgraded, 0 newly installed, 46 to remove and 0 not upgraded. Step #0: After this operation, 206 MB disk space will be freed. Step #0: (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 23135 files and directories currently installed.) Step #0: Removing g++-9 (9.4.0-1ubuntu1~20.04.2) ... Step #0: Removing gcc-9 (9.4.0-1ubuntu1~20.04.2) ... Step #0: Removing dpkg-dev (1.19.7ubuntu3.2) ... Step #0: Removing binutils (2.34-6ubuntu1.6) ... Step #0: Removing binutils-x86-64-linux-gnu (2.34-6ubuntu1.6) ... Step #0: Removing libctf0:amd64 (2.34-6ubuntu1.6) ... Step #0: Removing libbinutils:amd64 (2.34-6ubuntu1.6) ... Step #0: Removing binutils-common:amd64 (2.34-6ubuntu1.6) ... Step #0: Removing cpp (4:9.3.0-1ubuntu2) ... Step #0: Removing cpp-9 (9.4.0-1ubuntu1~20.04.2) ... Step #0: Removing fakeroot (1.24-1) ... Step #0: update-alternatives: using /usr/bin/fakeroot-tcp to provide /usr/bin/fakeroot (fakeroot) in auto mode Step #0: update-alternatives: warning: skip creation of /usr/share/man/man1/faked.1.gz because associated file /usr/share/man/man1/faked-tcp.1.gz (of link group fakeroot) doesn't exist Step #0: update-alternatives: warning: skip creation of /usr/share/man/es/man1/faked.1.gz because associated file /usr/share/man/es/man1/faked-tcp.1.gz (of link group fakeroot) doesn't exist Step #0: update-alternatives: warning: skip creation of /usr/share/man/fr/man1/faked.1.gz because associated file /usr/share/man/fr/man1/faked-tcp.1.gz (of link group fakeroot) doesn't exist Step #0: update-alternatives: warning: skip creation of /usr/share/man/sv/man1/faked.1.gz because associated file /usr/share/man/sv/man1/faked-tcp.1.gz (of link group fakeroot) doesn't exist Step #0: update-alternatives: warning: skip creation of /usr/share/man/man1/fakeroot.1.gz because associated file /usr/share/man/man1/fakeroot-tcp.1.gz (of link group fakeroot) doesn't exist Step #0: update-alternatives: warning: skip creation of /usr/share/man/es/man1/fakeroot.1.gz because associated file /usr/share/man/es/man1/fakeroot-tcp.1.gz (of link group fakeroot) doesn't exist Step #0: update-alternatives: warning: skip creation of /usr/share/man/fr/man1/fakeroot.1.gz because associated file /usr/share/man/fr/man1/fakeroot-tcp.1.gz (of link group fakeroot) doesn't exist Step #0: update-alternatives: warning: skip creation of /usr/share/man/sv/man1/fakeroot.1.gz because associated file /usr/share/man/sv/man1/fakeroot-tcp.1.gz (of link group fakeroot) doesn't exist Step #0: Removing libstdc++-9-dev:amd64 (9.4.0-1ubuntu1~20.04.2) ... Step #0: Removing libgcc-9-dev:amd64 (9.4.0-1ubuntu1~20.04.2) ... Step #0: Removing libalgorithm-diff-xs-perl (0.04-6) ... Step #0: Removing libalgorithm-merge-perl (0.08-3) ... Step #0: Removing libalgorithm-diff-perl (1.19.03-2) ... Step #0: Removing libasan5:amd64 (9.4.0-1ubuntu1~20.04.2) ... Step #0: Removing libatomic1:amd64 (10.5.0-1ubuntu1~20.04) ... Step #0: Removing libcc1-0:amd64 (10.5.0-1ubuntu1~20.04) ... Step #0: Removing libctf-nobfd0:amd64 (2.34-6ubuntu1.6) ... Step #0: Removing libdpkg-perl (1.19.7ubuntu3.2) ... Step #0: Removing libfakeroot:amd64 (1.24-1) ... Step #0: Removing libfile-fcntllock-perl (0.22-3build4) ... Step #0: Removing libgomp1:amd64 (10.5.0-1ubuntu1~20.04) ... Step #0: Removing libisl22:amd64 (0.22.1-1) ... Step #0: Removing libitm1:amd64 (10.5.0-1ubuntu1~20.04) ... Step #0: Removing liblocale-gettext-perl (1.07-4) ... Step #0: Removing liblsan0:amd64 (10.5.0-1ubuntu1~20.04) ... Step #0: Removing libmpc3:amd64 (1.1.0-1) ... Step #0: Removing libmpfr6:amd64 (4.0.2-1) ... Step #0: Removing python3-dev (3.8.2-0ubuntu2) ... Step #0: Removing libpython3-dev:amd64 (3.8.2-0ubuntu2) ... Step #0: Removing python3.8-dev (3.8.10-0ubuntu1~20.04.9) ... Step #0: Removing libpython3.8-dev:amd64 (3.8.10-0ubuntu1~20.04.9) ... Step #0: Removing libpython3.8:amd64 (3.8.10-0ubuntu1~20.04.9) ... Step #0: Removing libquadmath0:amd64 (10.5.0-1ubuntu1~20.04) ... Step #0: Removing libtsan0:amd64 (10.5.0-1ubuntu1~20.04) ... Step #0: Removing libubsan1:amd64 (10.5.0-1ubuntu1~20.04) ... Step #0: Removing make (4.2.1-1.2) ... Step #0: Removing python-pip-whl (20.0.2-5ubuntu1.10) ... Step #0: Removing python3-setuptools (45.2.0-1ubuntu0.1) ... Step #0: Removing python3-distutils (3.8.10-0ubuntu1~20.04) ... Step #0: Removing python3-lib2to3 (3.8.10-0ubuntu1~20.04) ... Step #0: Removing python3-wheel (0.34.2-1ubuntu0.1) ... Step #0: Removing zlib1g-dev:amd64 (1:1.2.11.dfsg-2ubuntu1.5) ... Step #0: Removing gcc-9-base:amd64 (9.4.0-1ubuntu1~20.04.2) ... Step #0: Processing triggers for libc-bin (2.31-0ubuntu9.14) ... Step #0: (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 20587 files and directories currently installed.) Step #0: Purging configuration files for libfakeroot:amd64 (1.24-1) ... Step #0: Purging configuration files for dpkg-dev (1.19.7ubuntu3.2) ... Step #0: Removing intermediate container adc16ee663f7 Step #0: ---> f15210377f1a Step #0: Step 7/9 : RUN gcloud -q components install gke-gcloud-auth-plugin Step #0: ---> Running in 6ee079136fde Step #0:  Step #0: All components are up to date. Step #0: Removing intermediate container 6ee079136fde Step #0: ---> 52cad4a594f4 Step #0: Step 8/9 : ENV PATH=/builder/helm/:$PATH Step #0: ---> Running in 321ad2640c72 Step #0: Removing intermediate container 321ad2640c72 Step #0: ---> 7a6c87094408 Step #0: Step 9/9 : ENTRYPOINT ["/builder/helm.bash"] Step #0: ---> Running in 3f45cf652644 Step #0: Removing intermediate container 3f45cf652644 Step #0: ---> 25fbe4ed803a Step #0: Successfully built 25fbe4ed803a Step #0: Successfully tagged gcr.io/cluster1-406519/helm:3.12.0 Step #0: Successfully tagged gcr.io/cluster1-406519/helm:latest Finished Step #0 Starting Step #1 Step #1: Already have image: gcr.io/cluster1-406519/helm:latest Step #1: /bin/bash: - : invalid option Finished Step #1 ERROR ERROR: build step 1 "gcr.io/cluster1-406519/helm:latest" failed: step exited with non-zero status: 1_

Steps to Reproduce the Problem

  1. clone https://github.com/GoogleCloudPlatform/cloud-builders-community
  2. Copy the ./helm folder to the Google Shell
  3. Run gcloud builds submit --config cloudbuild.yaml .

Additional Info

pablojabdala commented 8 months ago

You can ignore this case