Skip to content

Instantly share code, notes, and snippets.

@dsiebel
Created February 10, 2023 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsiebel/dc3a150e0a6321827d35d7d8e532ba01 to your computer and use it in GitHub Desktop.
Save dsiebel/dc3a150e0a6321827d35d7d8e532ba01 to your computer and use it in GitHub Desktop.
skaffold#8380
apiVersion: skaffold/v3
kind: Config
metadata:
name: skaffold-8380
build:
artifacts:
- image: $REPO_URL/my-image
context: .
docker:
buildArgs:
BUILDKIT_INLINE_CACHE: '1'
cacheFrom:
- $REPO_URL/my-image:cache
dockerfile: Dockerfile
local:
push: true
tryImportMissing: true
useBuildkit: true
platforms:
- linux/amd64
- linux/arm64
tagPolicy:
gitCommit:
ignoreChanges: true
# CMD: skaffold build -v DEBUG
DEBU[0000] skaffold API not starting as it's not requested subtask=-1 task=DevLoop
INFO[0000] Skaffold &{Version: ConfigVersion:skaffold/v4beta2 GitVersion: GitCommit: BuildDate: GoVersion:go1.19.5 Compiler:gc Platform:darwin/arm64 User:} subtask=-1 task=DevLoop
DEBU[0000] Skipping update check for pre-release version subtask=-1 task=DevLoop
INFO[0000] Loaded Skaffold defaults from "/Users/dsiebel/.skaffold/config" subtask=-1 task=DevLoop
DEBU[0000] config version out of date: upgrading to latest "skaffold/v4beta2" subtask=-1 task=DevLoop
DEBU[0000] parsed 1 configs from configuration file /Users/dsiebel/workspace/source/dsiebel/issues/skaffold-8380/skaffold.yaml subtask=-1 task=DevLoop
DEBU[0000] Defaulting deploy type to kubectl subtask=-1 task=DevLoop
INFO[0000] map entry found when executing locate for &{$REPO_URL/my-image . <nil> {0x14000a262c0 <nil> <nil> <nil> <nil> <nil> <nil>} [] {[] []} [] } of type *latest.Artifact and pointer: 1374393484304 subtask=-1 task=DevLoop
INFO[0000] Using kubectl context: subtask=-1 task=DevLoop
DEBU[0000] getting client config for kubeContext: `` subtask=-1 task=DevLoop
DEBU[0000] no kube-context set and no kubeConfig found, attempting in-cluster config subtask=-1 task=DevLoop
DEBU[0000] Running command: [minikube version --output=json] subtask=-1 task=DevLoop
DEBU[0000] setting Docker user agent to skaffold- subtask=-1 task=DevLoop
INFO[0000] no kpt renderer or deployer found, skipping hydrated-dir creation subtask=-1 task=DevLoop
DEBU[0000] Running command: [kubectl config view --minify -o jsonpath='{..namespace}'] subtask=-1 task=DevLoop
DEBU[0000] Running command: [kubectl config view --minify -o jsonpath='{..namespace}'] subtask=-1 task=DevLoop
DEBU[0000] Running command: [kubectl config view --minify -o jsonpath='{..namespace}'] subtask=-1 task=DevLoop
DEBU[0000] Running command: [kubectl config view --minify -o jsonpath='{..namespace}'] subtask=-1 task=DevLoop
DEBU[0000] Running command: [kubectl config view --minify -o jsonpath='{..namespace}'] subtask=-1 task=DevLoop
DEBU[0000] Running command: [kubectl config view --minify -o jsonpath='{..namespace}'] subtask=-1 task=DevLoop
DEBU[0000] Running command: [kubectl config view --minify -o jsonpath='{..namespace}'] subtask=-1 task=DevLoop
DEBU[0000] CLI platforms provided: "" subtask=-1 task=DevLoop
DEBU[0000] platform detection from active kubernetes cluster is not enabled subtask=-1 task=DevLoop
DEBU[0000] platforms selected for artifact "$REPO_URL/my-image": "linux/amd64,linux/arm64" subtask=-1 task=DevLoop
DEBU[0000] Using builder: local subtask=-1 task=DevLoop
INFO[0000] build concurrency first set to 1 parsed from *local.Builder[0] subtask=-1 task=DevLoop
INFO[0000] final build concurrency value is 1 subtask=-1 task=DevLoop
Generating tags...
- $REPO_URL/my-image -> DEBU[0000] Running command: [git describe --tags --always] subtask=-1 task=Build
DEBU[0000] Command output: [5d800c7
] subtask=-1 task=Build
$REPO_URL/my-image:5d800c7
INFO[0000] Tags generated in 61.123709ms subtask=-1 task=Build
Checking cache...
DEBU[0000] Executing template &{envTemplate 0x14000c83560 0x14000a46eb0 } with environment map[$ENV] subtask=-1 task=DevLoop
DEBU[0000] Executing template &{envTemplate 0x14000ca0000 0x14000a46fa0 } with environment map[$ENV] subtask=-1 task=DevLoop
DEBU[0001] Found dependencies for dockerfile: [] subtask=-1 task=DevLoop
DEBU[0001] Executing template &{envTemplate 0x14000ad6000 0x14000a47d60 } with environment map[$ENV] subtask=-1 task=DevLoop
- $REPO_URL/my-image: Not found. Building
INFO[0003] Cache check completed in 3.467 seconds subtask=-1 task=Build
Starting build...
Building [$REPO_URL/my-image]...
Target platforms: [linux/amd64,linux/arm64]
WARN[0005] cacheFrom image "$REPO_URL/my-image:cache" couldn't be pulled for platform "linux/amd64" subtask=-1 task=DevLoop
DEBU[0005] Executing template &{envTemplate 0x14000ad7680 0x140009741e0 } with environment map[$ENV] subtask=-1 task=DevLoop
DEBU[0005] Running command: [docker build . --file /Users/dsiebel/workspace/source/dsiebel/issues/skaffold-8380/Dockerfile -t $REPO_URL/my-image:5d800c7_linux_amd64 --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from $REPO_URL/my-image:cache --platform linux/amd64] subtask=$REPO_URL/my-image task=Build
#1 [internal] load build definition from Dockerfile
#1 sha256:85c88ada54e02a0bc480128f54228d37ad3570e2bfe9ee6cdbe475057cd35153
#1 transferring dockerfile: 36B 0.0s done
#1 DONE 0.0s
#2 [internal] load .dockerignore
#2 sha256:f3040aa376f2b1c7af65c408f115195384300c44ba47a7c7de3a09b23b10103a
#2 transferring context: 2B done
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/library/hello-world:latest
#3 sha256:4d0bfbf89fc6eed6ef6c009519ba7c2da365c25409e65924cfbd4757d32d99e2
#3 DONE 0.6s
#4 [1/1] FROM docker.io/library/hello-world@sha256:aa0cc8055b82dc2509bed2e19b275c8f463506616377219d9642221ab53cf9fe
#4 sha256:1ab10fa46d6a423e21c49fa5fd2001a08b9cb99eaf88e12247c1ecfe7c1cc662
#4 DONE 0.0s
#5 importing cache manifest from $REPO_URL/my-image:cache
#5 sha256:cbd3fb4bd2bdecc07bd1db4ff478384ab727c39abad752f352e34235dec4c9d9
#5 ...
#6 [auth] $REPO_URL/my-image:pull token for europe-west4-docker.pkg.dev
#6 sha256:5bf4c1023199003e697494a173700afa89e574776f29e9b31d050a1853de0d29
#6 DONE 0.0s
#5 importing cache manifest from $REPO_URL/my-image:cache
#5 sha256:cbd3fb4bd2bdecc07bd1db4ff478384ab727c39abad752f352e34235dec4c9d9
#5 ERROR: $REPO_URL/my-image:cache: not found
#4 [1/1] FROM docker.io/library/hello-world@sha256:aa0cc8055b82dc2509bed2e19b275c8f463506616377219d9642221ab53cf9fe
#4 sha256:1ab10fa46d6a423e21c49fa5fd2001a08b9cb99eaf88e12247c1ecfe7c1cc662
#4 CACHED
#7 exporting to image
#7 sha256:e8c613e07b0b7ff33893b694f7759a10d42e180f2b4dc349fb57dc6b71dcab00
#7 exporting layers done
#7 writing image sha256:bb31f47d8cce4ac32588f855be49807af0926c794495faaf2cceee57f89e1ce9 done
#7 naming to $REPO_URL/my-image:5d800c7_linux_amd64 done
#7 DONE 0.0s
#8 exporting cache
#8 sha256:2700d4ef94dee473593c5c614b55b2dedcca7893909811a8f2b48291a1f581e4
#8 preparing build cache for export done
#8 DONE 0.0s
------
> importing cache manifest from $REPO_URL/my-image:cache:
------
The push refers to repository [$REPO_URL/my-image]
e07ee1baac5f: Preparing
e07ee1baac5f: Pushed
5d800c7_linux_amd64: digest: sha256:f778eedb947aadf60ec077c8458c1abed9a05d98cd192d77b2cfbc560c5a37dc size: 524
WARN[0014] cacheFrom image "$REPO_URL/my-image:cache" couldn't be pulled for platform "linux/arm64" subtask=-1 task=DevLoop
DEBU[0014] Executing template &{envTemplate 0x14000d07560 0x14000974500 } with environment map[$ENV] subtask=-1 task=DevLoop
DEBU[0014] Running command: [docker build . --file /Users/dsiebel/workspace/source/dsiebel/issues/skaffold-8380/Dockerfile -t $REPO_URL/my-image:5d800c7_linux_arm64 --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from $REPO_URL/my-image:cache --platform linux/arm64] subtask=$REPO_URL/my-image task=Build
#1 [internal] load build definition from Dockerfile
#1 sha256:d964a87d4f719a049c19850a07c92a9832bb8a10d957f7d41143a8f7571bed22
#1 transferring dockerfile: 36B done
#1 DONE 0.0s
#2 [internal] load .dockerignore
#2 sha256:3b2fc7a1d794ef526cdaa4bc87d5482d6137d1988decf30929df9fff6d3de366
#2 transferring context: 2B done
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/library/hello-world:latest
#3 sha256:f27c12f08d16a5470b244ab493b04ce89c43e5d9708ee6cbcb81b522d6e01213
#3 DONE 0.6s
#4 [1/1] FROM docker.io/library/hello-world@sha256:aa0cc8055b82dc2509bed2e19b275c8f463506616377219d9642221ab53cf9fe
#4 sha256:00a155e5d48ca852c8234cbdaa8b808d3931077842a31d726d071aefd0f57ca3
#4 DONE 0.0s
#5 importing cache manifest from $REPO_URL/my-image:cache
#5 sha256:cbd3fb4bd2bdecc07bd1db4ff478384ab727c39abad752f352e34235dec4c9d9
#5 ERROR: $REPO_URL/my-image:cache: not found
#4 [1/1] FROM docker.io/library/hello-world@sha256:aa0cc8055b82dc2509bed2e19b275c8f463506616377219d9642221ab53cf9fe
#4 sha256:00a155e5d48ca852c8234cbdaa8b808d3931077842a31d726d071aefd0f57ca3
#4 CACHED
#6 exporting to image
#6 sha256:e8c613e07b0b7ff33893b694f7759a10d42e180f2b4dc349fb57dc6b71dcab00
#6 exporting layers done
#6 writing image sha256:7160bdb4b19043b54d65571a0632a972ee1b9cde2400274743e1b8847b99bd09 done
#6 naming to $REPO_URL/my-image:5d800c7_linux_arm64 done
#6 DONE 0.0s
#7 exporting cache
#7 sha256:2700d4ef94dee473593c5c614b55b2dedcca7893909811a8f2b48291a1f581e4
#7 preparing build cache for export done
#7 DONE 0.0s
------
> importing cache manifest from $REPO_URL/my-image:cache:
------
The push refers to repository [$REPO_URL/my-image]
efb53921da33: Preparing
efb53921da33: Pushed
5d800c7_linux_arm64: digest: sha256:e30e3f3a7100302bb6b1b54609cd0d6062c99735e908980a3c9e6a2e6c2b4ff4 size: 524
INFO[0020] existing manifest: sha256:f778eedb947aadf60ec077c8458c1abed9a05d98cd192d77b2cfbc560c5a37dc
INFO[0020] existing manifest: sha256:e30e3f3a7100302bb6b1b54609cd0d6062c99735e908980a3c9e6a2e6c2b4ff4
INFO[0020] $REPO_URL/my-image:5d800c7: digest: sha256:cfaacc3662811f55c97540745f8cfde853fa37d2bf1595799003dd44ab6d5f3a size: 529
INFO[0020] Created ManifestList for image $REPO_URL/my-image:5d800c7. Digest: sha256:cfaacc3662811f55c97540745f8cfde853fa37d2bf1595799003dd44ab6d5f3a subtask=$REPO_URL/my-image task=Build
Build [$REPO_URL/my-image] succeeded
INFO[0020] Build completed in 16.592 seconds subtask=-1 task=Build
DEBU[0020] exporting metrics subtask=-1 task=DevLoop
# CMD: skaffold build -v DEBUG --tag cache
DEBU[0000] skaffold API not starting as it's not requested subtask=-1 task=DevLoop
INFO[0000] Skaffold &{Version: ConfigVersion:skaffold/v4beta2 GitVersion: GitCommit: BuildDate: GoVersion:go1.19.5 Compiler:gc Platform:darwin/arm64 User:} subtask=-1 task=DevLoop
DEBU[0000] Skipping update check for pre-release version subtask=-1 task=DevLoop
INFO[0000] Loaded Skaffold defaults from "/Users/dsiebel/.skaffold/config" subtask=-1 task=DevLoop
DEBU[0000] config version out of date: upgrading to latest "skaffold/v4beta2" subtask=-1 task=DevLoop
DEBU[0000] parsed 1 configs from configuration file /Users/dsiebel/workspace/source/dsiebel/issues/skaffold-8380/skaffold.yaml subtask=-1 task=DevLoop
DEBU[0000] Defaulting deploy type to kubectl subtask=-1 task=DevLoop
INFO[0000] map entry found when executing locate for &{$REPO_URL/my-image . <nil> {0x14000a140b0 <nil> <nil> <nil> <nil> <nil> <nil>} [] {[] []} [] } of type *latest.Artifact and pointer: 1374400070672 subtask=-1 task=DevLoop
INFO[0000] Using kubectl context: subtask=-1 task=DevLoop
DEBU[0000] getting client config for kubeContext: `` subtask=-1 task=DevLoop
DEBU[0000] no kube-context set and no kubeConfig found, attempting in-cluster config subtask=-1 task=DevLoop
DEBU[0000] Running command: [minikube version --output=json] subtask=-1 task=DevLoop
DEBU[0000] setting Docker user agent to skaffold- subtask=-1 task=DevLoop
INFO[0000] no kpt renderer or deployer found, skipping hydrated-dir creation subtask=-1 task=DevLoop
DEBU[0000] Running command: [kubectl config view --minify -o jsonpath='{..namespace}'] subtask=-1 task=DevLoop
DEBU[0000] Running command: [kubectl config view --minify -o jsonpath='{..namespace}'] subtask=-1 task=DevLoop
DEBU[0000] Running command: [kubectl config view --minify -o jsonpath='{..namespace}'] subtask=-1 task=DevLoop
DEBU[0000] Running command: [kubectl config view --minify -o jsonpath='{..namespace}'] subtask=-1 task=DevLoop
DEBU[0000] Running command: [kubectl config view --minify -o jsonpath='{..namespace}'] subtask=-1 task=DevLoop
DEBU[0000] Running command: [kubectl config view --minify -o jsonpath='{..namespace}'] subtask=-1 task=DevLoop
DEBU[0000] Running command: [kubectl config view --minify -o jsonpath='{..namespace}'] subtask=-1 task=DevLoop
DEBU[0000] CLI platforms provided: "" subtask=-1 task=DevLoop
DEBU[0000] platform detection from active kubernetes cluster is not enabled subtask=-1 task=DevLoop
DEBU[0000] platforms selected for artifact "$REPO_URL/my-image": "linux/amd64,linux/arm64" subtask=-1 task=DevLoop
DEBU[0000] Using builder: local subtask=-1 task=DevLoop
INFO[0000] build concurrency first set to 1 parsed from *local.Builder[0] subtask=-1 task=DevLoop
INFO[0000] final build concurrency value is 1 subtask=-1 task=DevLoop
Generating tags...
- $REPO_URL/my-image -> $REPO_URL/my-image:cache
INFO[0000] Tags generated in 409.208µs subtask=-1 task=Build
Checking cache...
DEBU[0000] Executing template &{envTemplate 0x14000c38fc0 0x1400066a460 } with environment map[$ENV] subtask=-1 task=DevLoop
DEBU[0000] Executing template &{envTemplate 0x14000c76000 0x1400066a550 } with environment map[$ENV] subtask=-1 task=DevLoop
DEBU[0001] Found dependencies for dockerfile: [] subtask=-1 task=DevLoop
DEBU[0001] Executing template &{envTemplate 0x14000c9aea0 0x14000635310 } with environment map[$ENV] subtask=-1 task=DevLoop
- $REPO_URL/my-image: Found. Tagging
DEBU[0003] attempting to add tag $REPO_URL/my-image:cache to src $REPO_URL/my-image:cache@sha256:cfaacc3662811f55c97540745f8cfde853fa37d2bf1595799003dd44ab6d5f3a subtask=-1 task=DevLoop
INFO[0003] existing blob: sha256:2db29710123e3e53a794f2694094b9b4338aa9ee5c40b930cb8063a1be392c54
INFO[0004] existing blob: sha256:bb31f47d8cce4ac32588f855be49807af0926c794495faaf2cceee57f89e1ce9
INFO[0004] $REPO_URL/my-image:cache: digest: sha256:f778eedb947aadf60ec077c8458c1abed9a05d98cd192d77b2cfbc560c5a37dc size: 524
INFO[0004] Cache check completed in 3.804 seconds subtask=-1 task=Build
DEBU[0004] exporting metrics subtask=-1 task=DevLoop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment