Last active
September 9, 2019 17:16
-
-
Save BenHizak/4632b3df40892a46712f29b4cf4a6057 to your computer and use it in GitHub Desktop.
Demo of variables dropped
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # this one works | |
| docker build . | tee build_with_docker.log | |
| gcloud builds submit --config=kaniko-without-cache.yml | tee build_with_kaniko_uncached.log | |
| gcloud builds submit --config=kaniko-with-cache.yml | tee build_with_kaniko_cached.log | |
| #this one fails |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sending build context to Docker daemon 117.2kB | |
| Step 1/3 : ARG VERSION=3.7.2 | |
| Step 2/3 : FROM python:${VERSION} | |
| ---> 2053ca75899e | |
| Step 3/3 : RUN echo "this is a demo" | |
| ---> Using cache | |
| ---> 7596fafd9ddf | |
| Successfully built 7596fafd9ddf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ----------------------------------------------------------------------------- REMOTE BUILD OUTPUT ----------------------------------------------------------------------------- | |
| starting build "61df6bfb-9be2-4807-901f-7f8fd6361d00" | |
| FETCHSOURCE | |
| Fetching storage object: gs://your-project-name_cloudbuild/source/1568049061.86-1fd099711b98413cae4bcedd698feec0.tgz#1568049063569789 | |
| Copying gs://your-project-name_cloudbuild/source/1568049061.86-1fd099711b98413cae4bcedd698feec0.tgz#1568049063569789... | |
| / [0 files][ 0.0 B/ 1.6 KiB] | |
| / [1 files][ 1.6 KiB/ 1.6 KiB] | |
| Operation completed over 1 objects/1.6 KiB. | |
| BUILD | |
| Already have image (with digest): gcr.io/kaniko-project/executor@sha256:584a8d90679211d9b09465d778990ec15965cf78f57f197e973d57d14b08eb81 | |
| [36mINFO[0m[0000] Resolved base name python:${VERSION} to python: | |
| [36mINFO[0m[0000] Resolved base name python:${VERSION} to python: | |
| [36mINFO[0m[0000] Downloading base image python:3.7.2 | |
| [36mINFO[0m[0000] Error while retrieving image from cache: getting file info: stat /cache/sha256:9db2a731d3c7970453d37f5f92708ffd1255d12a76517fb24f944ca3d4f84f8e: no such file or directory | |
| [36mINFO[0m[0000] Downloading base image python:3.7.2 | |
| [36mINFO[0m[0000] Built cross stage deps: map[] | |
| [36mINFO[0m[0000] Downloading base image python:3.7.2 | |
| [36mINFO[0m[0000] Error while retrieving image from cache: getting file info: stat /cache/sha256:9db2a731d3c7970453d37f5f92708ffd1255d12a76517fb24f944ca3d4f84f8e: no such file or directory | |
| [36mINFO[0m[0000] Downloading base image python:3.7your-project-name | |
| [36mINFO[0m[0001] Checking for cached layer gcr.io/cherre-sandbox/kaniko_fail_example/cache:bb3cc2373ac9cd1aa19c4c586593e506d7e1518cded82f90b664da157d604c6c... | |
| [36mINFO[0m[0001] Using caching version of cmd: RUN echo "this is a demo" | |
| [36mINFO[0m[0001] Skipping unpacking as no commands require it. | |
| [36mINFO[0m[0001] Taking snapshot of full filesystem... | |
| [36mINFO[0m[0001] RUN echo "this is a demo" | |
| [36mINFO[0m[0001] Found cached layer, extracting to filesystem | |
| [36mINFO[0m[0001] No files changed in this command, skipping snapshotting. | |
| PUSH | |
| DONE | |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| ID CREATE_TIME DURATION SOURCyour-project-name IMAGES STATUS | |
| 61df6bfb-9be2-4807-901f-7f8fd6361d00 2019-09-09T17:11:04+00:00 17S gs://cherre-sandbox_cloudbuild/source/1568049061.86-1fd099711b98413cae4bcedd698feec0.tgz - SUCCESS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ----------------------------------------------------------------------------- REMOTE BUILD OUTPUT ----------------------------------------------------------------------------- | |
| starting build "5100cce7-b4e1-40c9-b0b0-90a15243bfa1" | |
| FETCHSOURCE | |
| Fetching storage object: gs://your-project-name_cloudbuild/source/1568048999.96-d2b74390ed3e4fea8785af13bd3a17ad.tgz#1568049001632788 | |
| Copying gs://your-project-name_cloudbuild/source/1568048999.96-d2b74390ed3e4fea8785af13bd3a17ad.tgz#1568049001632788... | |
| / [0 files][ 0.0 B/ 890.0 B] | |
| / [1 files][ 890.0 B/ 890.0 B] | |
| Operation completed over 1 objects/890.0 B. | |
| BUILD | |
| Already have image (with digest): gcr.io/kaniko-project/executor@sha256:584a8d90679211d9b09465d778990ec15965cf78f57f197e973d57d14b08eb81 | |
| [36mINFO[0m[0000] Resolved base name python:${VERSION} to python: | |
| [36mINFO[0m[0000] Resolved base name python:${VERSION} to python: | |
| [36mINFO[0m[0000] Downloading base image python:3.7.2 | |
| [36mINFO[0m[0000] Error while retrieving image from cache: getting file info: stat /cache/sha256:9db2a731d3c7970453d37f5f92708ffd1255d12a76517fb24f944ca3d4f84f8e: no such file or directory | |
| [36mINFO[0m[0000] Downloading base image python:3.7.2 | |
| [36mINFO[0m[0000] Built cross stage deps: map[] | |
| [36mINFO[0m[0000] Downloading base image python:3.7.2 | |
| [36mINFO[0m[0000] Error while retrieving image from cache: getting file info: stat /cache/sha256:9db2a731d3c7970453d37f5f92708ffd1255d12a76517fb24f944ca3d4f84f8e: no such file or directory | |
| [36mINFO[0m[0000] Downloading base image python:3.7.2 | |
| [36mINFO[0m[0001] Unpacking rootfs as cmd RUN echo "this is a demo" requires it. | |
| [36mINFO[0m[0018] Taking snapshot of full filesystem... | |
| [36mINFO[0m[0030] RUN echo "this is a demo" | |
| [36mINFO[0m[0030] cmd: /bin/sh | |
| [36mINFO[0m[0030] args: [-c echo "this is a demo"] | |
| this is a demo | |
| [36mINFO[0m[0030] Taking snapshot of full filesystem... | |
| [36mINFO[0m[0034] No files were changed, appending empty layer to config. No layer added to image. | |
| PUSH | |
| DONE | |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| ID CREATE_TIME DURATION SOURCyour-project-name IMAGES STATUS | |
| 5100cce7-b4e1-40c9-b0b0-90a15243bfa1 2019-09-09T17:10:02+00:00 55S gs://cherre-sandbox_cloudbuild/source/1568048999.96-d2b74390ed3e4fea8785af13bd3a17ad.tgz - SUCCESS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ARG VERSION=3.7.2 | |
| FROM python:${VERSION} | |
| RUN echo "this is a demo" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| steps: | |
| - name: gcr.io/kaniko-project/executor@sha256:584a8d90679211d9b09465d778990ec15965cf78f57f197e973d57d14b08eb81 | |
| args: | |
| - --dockerfile=./Dockerfile | |
| - --destination=gcr.io/your-project-name/kaniko_fail_example # note: change 'your-project' to your google cloud | |
| - --cache=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| steps: | |
| - name: gcr.io/kaniko-project/executor@sha256:584a8d90679211d9b09465d778990ec15965cf78f57f197e973d57d14b08eb81 | |
| args: | |
| - --dockerfile=./Dockerfile | |
| - --destination=gcr.io/your-project-name/kaniko_fail_example # note: change 'your-project' to your google cloud | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment