Skip to content

Commit

Permalink
Use Long Sha in build Jobs (#9407)
Browse files Browse the repository at this point in the history
* long_sha

* generate

* generate2

* generate3

* review
  • Loading branch information
Cortey authored Nov 28, 2023
1 parent 0d1902e commit c11d05e
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ presubmits: # runs on PRs
- "sh"
args:
- "-c"
- "/image-builder --name=serverless-operator --config=/config/kaniko-build-config.yaml --context=. --dockerfile=components/operator/Dockerfile"
- "/image-builder --name=serverless-operator --config=/config/kaniko-build-config.yaml --context=. --dockerfile=components/operator/Dockerfile --tag=$PULL_BASE_SHA"
env:
- name: BUILDKITD_FLAGS
value: "--oci-worker-no-process-sandbox"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ presubmits: # runs on PRs
- "--config=/config/kaniko-build-config.yaml"
- "--context=components/runtimes/nodejs"
- "--dockerfile=nodejs16/Dockerfile"
- "--tag=$(PULL_BASE_SHA)"
resources:
requests:
memory: 1.5Gi
Expand Down Expand Up @@ -79,6 +80,7 @@ presubmits: # runs on PRs
- "--config=/config/kaniko-build-config.yaml"
- "--context=components/runtimes/nodejs"
- "--dockerfile=nodejs18/Dockerfile"
- "--tag=$(PULL_BASE_SHA)"
resources:
requests:
memory: 1.5Gi
Expand Down Expand Up @@ -126,6 +128,7 @@ presubmits: # runs on PRs
- "--config=/config/kaniko-build-config.yaml"
- "--context=components/runtimes/python39"
- "--dockerfile=components/runtimes/python39/Dockerfile"
- "--tag=$(PULL_BASE_SHA)"
resources:
requests:
memory: 1.5Gi
Expand Down Expand Up @@ -173,6 +176,7 @@ presubmits: # runs on PRs
- "--config=/config/kaniko-build-config.yaml"
- "--context=components/runtimes/java17"
- "--dockerfile=Dockerfile-jvm-runtime"
- "--tag=$(PULL_BASE_SHA)"
resources:
requests:
memory: 1.5Gi
Expand Down Expand Up @@ -226,6 +230,7 @@ postsubmits: # runs on main
- "--context=components/runtimes/nodejs"
- "--dockerfile=nodejs16/Dockerfile"
- "--tag=latest"
- "--tag=$(PULL_BASE_SHA)"
resources:
requests:
memory: 1.5Gi
Expand Down Expand Up @@ -276,6 +281,7 @@ postsubmits: # runs on main
- "--context=components/runtimes/nodejs"
- "--dockerfile=nodejs18/Dockerfile"
- "--tag=latest"
- "--tag=$(PULL_BASE_SHA)"
resources:
requests:
memory: 1.5Gi
Expand Down Expand Up @@ -326,6 +332,7 @@ postsubmits: # runs on main
- "--context=components/runtimes/python39"
- "--dockerfile=components/runtimes/python39/Dockerfile"
- "--tag=latest"
- "--tag=$(PULL_BASE_SHA)"
resources:
requests:
memory: 1.5Gi
Expand Down Expand Up @@ -376,6 +383,7 @@ postsubmits: # runs on main
- "--context=components/runtimes/java17"
- "--dockerfile=Dockerfile-jvm-runtime"
- "--tag=latest"
- "--tag=$(PULL_BASE_SHA)"
resources:
requests:
memory: 1.5Gi
Expand Down
8 changes: 8 additions & 0 deletions prow/jobs/kyma-project/serverless/serverless-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ presubmits: # runs on PRs
- "--config=/config/kaniko-build-config.yaml"
- "--context=components/serverless"
- "--dockerfile=deploy/manager/Dockerfile"
- "--tag=$(PULL_BASE_SHA)"
resources:
requests:
memory: 1.5Gi
Expand Down Expand Up @@ -79,6 +80,7 @@ presubmits: # runs on PRs
- "--config=/config/kaniko-build-config.yaml"
- "--context=components/serverless"
- "--dockerfile=deploy/webhook/Dockerfile"
- "--tag=$(PULL_BASE_SHA)"
resources:
requests:
memory: 1.5Gi
Expand Down Expand Up @@ -126,6 +128,7 @@ presubmits: # runs on PRs
- "--config=/config/kaniko-build-config.yaml"
- "--context=components/serverless"
- "--dockerfile=deploy/jobinit/Dockerfile"
- "--tag=$(PULL_BASE_SHA)"
resources:
requests:
memory: 1.5Gi
Expand Down Expand Up @@ -174,6 +177,7 @@ presubmits: # runs on PRs
- "--config=/config/kaniko-build-config.yaml"
- "--context=components/serverless"
- "--dockerfile=deploy/registry-gc/Dockerfile"
- "--tag=$(PULL_BASE_SHA)"
resources:
requests:
memory: 1.5Gi
Expand Down Expand Up @@ -226,6 +230,7 @@ postsubmits: # runs on main
- "--config=/config/kaniko-build-config.yaml"
- "--context=components/serverless"
- "--dockerfile=deploy/manager/Dockerfile"
- "--tag=$(PULL_BASE_SHA)"
- "--tag=latest"
resources:
requests:
Expand Down Expand Up @@ -277,6 +282,7 @@ postsubmits: # runs on main
- "--context=components/serverless"
- "--dockerfile=deploy/webhook/Dockerfile"
- "--tag=latest"
- "--tag=$(PULL_BASE_SHA)"
resources:
requests:
memory: 1.5Gi
Expand Down Expand Up @@ -327,6 +333,7 @@ postsubmits: # runs on main
- "--context=components/serverless"
- "--dockerfile=deploy/jobinit/Dockerfile"
- "--tag=latest"
- "--tag=$(PULL_BASE_SHA)"
resources:
requests:
memory: 1.5Gi
Expand Down Expand Up @@ -378,6 +385,7 @@ postsubmits: # runs on main
- "--context=components/serverless"
- "--dockerfile=deploy/registry-gc/Dockerfile"
- "--tag=latest"
- "--tag=$(PULL_BASE_SHA)"
resources:
requests:
memory: 1.5Gi
Expand Down
17 changes: 17 additions & 0 deletions templates/data/serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ templates:
- "--config=/config/kaniko-build-config.yaml"
- "--context=components/serverless"
- "--dockerfile=deploy/manager/Dockerfile"
- "--tag=$(PULL_BASE_SHA)"
inheritedConfigs:
global:
- kaniko_buildpack
Expand All @@ -36,6 +37,7 @@ templates:
- "--config=/config/kaniko-build-config.yaml"
- "--context=components/serverless"
- "--dockerfile=deploy/manager/Dockerfile"
- "--tag=$(PULL_BASE_SHA)"
- "--tag=latest"
inheritedConfigs:
global:
Expand All @@ -54,6 +56,7 @@ templates:
- "--config=/config/kaniko-build-config.yaml"
- "--context=components/serverless"
- "--dockerfile=deploy/webhook/Dockerfile"
- "--tag=$(PULL_BASE_SHA)"
inheritedConfigs:
global:
- kaniko_buildpack
Expand All @@ -73,6 +76,7 @@ templates:
- "--context=components/serverless"
- "--dockerfile=deploy/webhook/Dockerfile"
- "--tag=latest"
- "--tag=$(PULL_BASE_SHA)"
inheritedConfigs:
global:
- kaniko_buildpack
Expand All @@ -90,6 +94,7 @@ templates:
- "--config=/config/kaniko-build-config.yaml"
- "--context=components/serverless"
- "--dockerfile=deploy/jobinit/Dockerfile"
- "--tag=$(PULL_BASE_SHA)"
inheritedConfigs:
global:
- kaniko_buildpack
Expand All @@ -109,6 +114,7 @@ templates:
- "--context=components/serverless"
- "--dockerfile=deploy/jobinit/Dockerfile"
- "--tag=latest"
- "--tag=$(PULL_BASE_SHA)"
inheritedConfigs:
global:
- kaniko_buildpack
Expand All @@ -127,6 +133,7 @@ templates:
- "--config=/config/kaniko-build-config.yaml"
- "--context=components/serverless"
- "--dockerfile=deploy/registry-gc/Dockerfile"
- "--tag=$(PULL_BASE_SHA)"
inheritedConfigs:
global:
- kaniko_buildpack
Expand All @@ -147,6 +154,7 @@ templates:
- "--context=components/serverless"
- "--dockerfile=deploy/registry-gc/Dockerfile"
- "--tag=latest"
- "--tag=$(PULL_BASE_SHA)"
inheritedConfigs:
global:
- kaniko_buildpack
Expand All @@ -171,6 +179,7 @@ templates:
- "--config=/config/kaniko-build-config.yaml"
- "--context=components/runtimes/nodejs"
- "--dockerfile=nodejs16/Dockerfile"
- "--tag=$(PULL_BASE_SHA)"
inheritedConfigs:
global:
- kaniko_buildpack
Expand All @@ -189,6 +198,7 @@ templates:
- "--context=components/runtimes/nodejs"
- "--dockerfile=nodejs16/Dockerfile"
- "--tag=latest"
- "--tag=$(PULL_BASE_SHA)"
inheritedConfigs:
global:
- kaniko_buildpack
Expand All @@ -205,6 +215,7 @@ templates:
- "--config=/config/kaniko-build-config.yaml"
- "--context=components/runtimes/nodejs"
- "--dockerfile=nodejs18/Dockerfile"
- "--tag=$(PULL_BASE_SHA)"
inheritedConfigs:
global:
- kaniko_buildpack
Expand All @@ -223,6 +234,7 @@ templates:
- "--context=components/runtimes/nodejs"
- "--dockerfile=nodejs18/Dockerfile"
- "--tag=latest"
- "--tag=$(PULL_BASE_SHA)"
inheritedConfigs:
global:
- kaniko_buildpack
Expand All @@ -239,6 +251,7 @@ templates:
- "--config=/config/kaniko-build-config.yaml"
- "--context=components/runtimes/python39"
- "--dockerfile=components/runtimes/python39/Dockerfile"
- "--tag=$(PULL_BASE_SHA)"
inheritedConfigs:
global:
- kaniko_buildpack
Expand All @@ -257,6 +270,7 @@ templates:
- "--context=components/runtimes/python39"
- "--dockerfile=components/runtimes/python39/Dockerfile"
- "--tag=latest"
- "--tag=$(PULL_BASE_SHA)"
inheritedConfigs:
global:
- kaniko_buildpack
Expand All @@ -273,6 +287,7 @@ templates:
- "--config=/config/kaniko-build-config.yaml"
- "--context=components/runtimes/java17"
- "--dockerfile=Dockerfile-jvm-runtime"
- "--tag=$(PULL_BASE_SHA)"
inheritedConfigs:
global:
- kaniko_buildpack
Expand All @@ -291,6 +306,7 @@ templates:
- "--context=components/runtimes/java17"
- "--dockerfile=Dockerfile-jvm-runtime"
- "--tag=latest"
- "--tag=$(PULL_BASE_SHA)"
inheritedConfigs:
global:
- kaniko_buildpack
Expand Down Expand Up @@ -372,6 +388,7 @@ templates:
--config=/config/kaniko-build-config.yaml
--context=.
--dockerfile=components/operator/Dockerfile
--tag=$PULL_BASE_SHA
inheritedConfigs:
global:
- jobConfig_presubmit
Expand Down

0 comments on commit c11d05e

Please sign in to comment.