Compare commits

..

1 Commits

Author SHA1 Message Date
Hemanth Mantri 9cb07a5490 [CI-13182]: Use snapshot-mode instead of snapshotMode
The kaniko flag `snapshotMode` is deprecated in favor of `snapshot-mode`. The default value of `snapshot-mode` is `full`. As a result, the `optimize` flag set in Harness CI's `BuildAndPushToDocker` steps doesn't behave as expected because the `full` mode triggers a full filesystem scan which is slow. The `optimize` flag in Harness translates to `snapshot-mode=redo` which means only filesystem deltas are compared which is much faster. 

This change fixes the flag name being sent to Kaniko executor. I verified that the executor present in the current version already supports this flag as shown below:

```
hemanthkumarmantri@Hemanth Kumar harness-core % docker run -it --entrypoint /kaniko/executor plugins/kaniko:1.8.10 --help | grep snapshot-mode
      --snapshot-mode string                      Change the file attributes inspected during snapshotting (default "full")
      --snapshotMode string                       This flag is deprecated. Please use '--snapshot-mode'.
```
2024-06-26 20:02:16 -07:00
12 changed files with 23 additions and 23 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ platform:
steps:
- name: build
image: golang:1.22.4
image: golang:1.22
commands:
- go test ./...
- sh scripts/build.sh
@@ -178,7 +178,7 @@ pool:
steps:
- name: build
image: golang:1.22.4
image: golang:1.22
commands:
- go test ./...
- sh scripts/build.sh
+2 -2
View File
@@ -1,5 +1,5 @@
FROM gcr.io/kaniko-project/executor:v1.23.2
FROM gcr.io/kaniko-project/executor:v1.20.1
ENV KANIKO_VERSION=1.23.2
ENV KANIKO_VERSION=1.20.1
ADD release/linux/amd64/kaniko-acr /kaniko/
ENTRYPOINT ["/kaniko/kaniko-acr"]
+2 -2
View File
@@ -1,8 +1,8 @@
FROM gcr.io/kaniko-project/executor:v1.23.0
FROM gcr.io/kaniko-project/executor:v1.20.1
ENV HOME /root
ENV USER root
ENV KANIKO_VERSION=1.23.0
ENV KANIKO_VERSION=1.20.1
ADD release/linux/arm64/kaniko-acr /kaniko/
ENTRYPOINT ["/kaniko/kaniko-acr"]
+2 -2
View File
@@ -1,5 +1,5 @@
FROM gcr.io/kaniko-project/executor:v1.23.2
FROM gcr.io/kaniko-project/executor:v1.20.1
ENV KANIKO_VERSION=1.23.2
ENV KANIKO_VERSION=1.20.1
ADD release/linux/amd64/kaniko-docker /kaniko/
ENTRYPOINT ["/kaniko/kaniko-docker"]
+2 -2
View File
@@ -1,8 +1,8 @@
FROM gcr.io/kaniko-project/executor:v1.23.2
FROM gcr.io/kaniko-project/executor:v1.20.1
ENV HOME /root
ENV USER root
ENV KANIKO_VERSION=1.23.2
ENV KANIKO_VERSION=1.20.1
ADD release/linux/arm64/kaniko-docker /kaniko/
ENTRYPOINT ["/kaniko/kaniko-docker"]
+2 -2
View File
@@ -1,5 +1,5 @@
FROM gcr.io/kaniko-project/executor:v1.23.2
FROM gcr.io/kaniko-project/executor:v1.20.1
ENV KANIKO_VERSION=1.23.2
ENV KANIKO_VERSION=1.20.1
ADD release/linux/amd64/kaniko-ecr /kaniko/
ENTRYPOINT ["/kaniko/kaniko-ecr"]
+2 -2
View File
@@ -1,8 +1,8 @@
FROM gcr.io/kaniko-project/executor:v1.23.2
FROM gcr.io/kaniko-project/executor:v1.20.1
ENV HOME /root
ENV USER root
ENV KANIKO_VERSION=1.23.2
ENV KANIKO_VERSION=1.20.1
ADD release/linux/arm64/kaniko-ecr /kaniko/
ENTRYPOINT ["/kaniko/kaniko-ecr"]
+2 -2
View File
@@ -1,5 +1,5 @@
FROM gcr.io/kaniko-project/executor:v1.23.2
FROM gcr.io/kaniko-project/executor:v1.20.1
ENV KANIKO_VERSION=1.23.2
ENV KANIKO_VERSION=1.20.1
ADD release/linux/amd64/kaniko-gar /kaniko/
ENTRYPOINT ["/kaniko/kaniko-gar"]
+2 -2
View File
@@ -1,8 +1,8 @@
FROM gcr.io/kaniko-project/executor:v1.23.2
FROM gcr.io/kaniko-project/executor:v1.20.1
ENV HOME /root
ENV USER root
ENV KANIKO_VERSION=1.23.2
ENV KANIKO_VERSION=1.20.1
ADD release/linux/arm64/kaniko-gar /kaniko/
ENTRYPOINT ["/kaniko/kaniko-gar"]
+2 -2
View File
@@ -1,5 +1,5 @@
FROM gcr.io/kaniko-project/executor:v1.23.2
FROM gcr.io/kaniko-project/executor:v1.20.1
ENV KANIKO_VERSION=1.23.2
ENV KANIKO_VERSION=1.20.1
ADD release/linux/amd64/kaniko-gcr /kaniko/
ENTRYPOINT ["/kaniko/kaniko-gcr"]
+2 -2
View File
@@ -1,8 +1,8 @@
FROM gcr.io/kaniko-project/executor:v1.23.2
FROM gcr.io/kaniko-project/executor:v1.20.1
ENV HOME /root
ENV USER root
ENV KANIKO_VERSION=1.23.2
ENV KANIKO_VERSION=1.20.1
ADD release/linux/arm64/kaniko-gcr /kaniko/
ENTRYPOINT ["/kaniko/kaniko-gcr"]
+1 -1
View File
@@ -47,4 +47,4 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)
go 1.22.4
go 1.22.0