Skip to content

Commit

Permalink
ci: reenable kaniko builder
Browse files Browse the repository at this point in the history
  • Loading branch information
krtk6160 committed May 7, 2024
1 parent 01a484d commit 86d4081
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
19 changes: 12 additions & 7 deletions ci/apps/app-template.lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,24 +107,29 @@ plan:
run:
path: pipeline-tasks/ci/apps/tasks/prepare-docker-build.sh
- task: build
#@ def build_args(app):
#@ dockerfile_path = "repo/apps/" + app + "/Dockerfile"
#@ build_args_command = "$(awk -F= '{print \"--build-arg=\"$1\"=\"$2}' repo/.build-args)"
#@ kaniko_args="/kaniko/executor --context=repo --use-new-run --single-snapshot --cache=false --no-push --tar-path=image/image.tar --dockerfile=" + dockerfile_path + " " + build_args_command
#@ args = ["-exc"]
#@ args.append(kaniko_args)
#@ return args
#@ end
attempts: 2
privileged: true
config:
platform: linux
image_resource:
type: registry-image
source:
repository: vito/oci-build-task
repository: gcr.io/kaniko-project/executor
tag: debug
inputs:
- name: repo
outputs:
- name: image
params:
CONTEXT: repo
DOCKERFILE: #@ "repo/apps/" + app + "/Dockerfile"
BUILD_ARGS_FILE: repo/.build-args
run:
path: build
path: /bin/sh
args: #@ build_args(app)
- put: #@ edge_image_resource_name(app)
params:
image: image/image.tar
Expand Down
19 changes: 12 additions & 7 deletions ci/core/template.lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,24 +205,29 @@ plan:
run:
path: pipeline-tasks/ci/core/tasks/prepare-docker-build.sh
- task: build
#@ def build_args(component):
#@ dockerfile_path = "repo/core/" + component + "/Dockerfile" + post_fix
#@ build_args_command = "$(awk -F= '{print \"--build-arg=\"$1\"=\"$2}' repo/.build-args)"
#@ kaniko_args="/kaniko/executor --context=repo --use-new-run --single-snapshot --cache=false --no-push --tar-path=image/image.tar --dockerfile=" + dockerfile_path + " " + build_args_command
#@ args = ["-exc"]
#@ args.append(kaniko_args)
#@ return args
#@ end
attempts: 2
privileged: true
config:
platform: linux
image_resource:
type: registry-image
source:
repository: vito/oci-build-task
repository: gcr.io/kaniko-project/executor
tag: debug
inputs:
- name: repo
outputs:
- name: image
params:
CONTEXT: repo
DOCKERFILE: #@ "repo/core/" + component + "/Dockerfile" + post_fix
BUILD_ARGS_FILE: repo/.build-args
run:
path: build
path: /bin/sh
args: #@ build_args(component)
- put: #@ edge_image_resource_name(component + post_fix)
params:
image: image/image.tar
Expand Down

0 comments on commit 86d4081

Please sign in to comment.