Skip to content

Commit

Permalink
unify app-image param name between s2i and pack
Browse files Browse the repository at this point in the history
Signed-off-by: Matej Vasek <[email protected]>
  • Loading branch information
matejvasek committed Oct 19, 2023
1 parent 7035e50 commit 38e41cf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
params:
- name: BUILDER_IMAGE
description: The location of the s2i builder image.
- name: IMAGE
- name: APP_IMAGE
description: Reference of the image S2I will produce.
- name: REGISTRY
description: The registry associated with the function image.
Expand Down Expand Up @@ -112,11 +112,11 @@ spec:
[ -d "${ARTIFACTS_CACHE_PATH}" ] || mkdir "${ARTIFACTS_CACHE_PATH}"
buildah ${CERT_DIR_FLAG} bud --storage-driver=vfs ${TLS_VERIFY_FLAG} --layers \
-v "${ARTIFACTS_CACHE_PATH}:/tmp/artifacts/:rw,z,U" \
-f /gen-source/Dockerfile.gen -t $(params.IMAGE) .
-f /gen-source/Dockerfile.gen -t $(params.APP_IMAGE) .
[[ "$(workspaces.dockerconfig.bound)" == "true" ]] && export DOCKER_CONFIG="$(workspaces.dockerconfig.path)"
buildah ${CERT_DIR_FLAG} push --storage-driver=vfs ${TLS_VERIFY_FLAG} --digestfile $(workspaces.source.path)/image-digest \
$(params.IMAGE) docker://$(params.IMAGE)
$(params.APP_IMAGE) docker://$(params.APP_IMAGE)
cat $(workspaces.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST
volumeMounts:
Expand Down
6 changes: 3 additions & 3 deletions pkg/pipelines/tekton/task_defs.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ var S2ITask = v1beta1.Task{
Description: "The location of the s2i builder image.",
},
v1beta1.ParamSpec{
Name: "IMAGE",
Name: "APP_IMAGE",
Description: "Reference of the image S2I will produce.",
},
v1beta1.ParamSpec{
Expand Down Expand Up @@ -482,11 +482,11 @@ ARTIFACTS_CACHE_PATH="$(workspaces.cache.path)/mvn-artifacts"
[ -d "${ARTIFACTS_CACHE_PATH}" ] || mkdir "${ARTIFACTS_CACHE_PATH}"
buildah ${CERT_DIR_FLAG} bud --storage-driver=vfs ${TLS_VERIFY_FLAG} --layers \
-v "${ARTIFACTS_CACHE_PATH}:/tmp/artifacts/:rw,z,U" \
-f /gen-source/Dockerfile.gen -t $(params.IMAGE) .
-f /gen-source/Dockerfile.gen -t $(params.APP_IMAGE) .
[[ "$(workspaces.dockerconfig.bound)" == "true" ]] && export DOCKER_CONFIG="$(workspaces.dockerconfig.path)"
buildah ${CERT_DIR_FLAG} push --storage-driver=vfs ${TLS_VERIFY_FLAG} --digestfile $(workspaces.source.path)/image-digest \
$(params.IMAGE) docker://$(params.IMAGE)
$(params.APP_IMAGE) docker://$(params.APP_IMAGE)
cat $(workspaces.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST
`,
Expand Down
4 changes: 2 additions & 2 deletions pkg/pipelines/tekton/templates_s2i.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func GetS2IPipeline(f fn.Function) (*v1beta1.Pipeline, error) {
RunAfter: []string{"fetch-sources"},
Params: []v1beta1.Param{
v1beta1.Param{
Name: "IMAGE",
Name: "APP_IMAGE",
Value: v1beta1.ParamValue{
Type: "string",
StringVal: "$(params.imageName)",
Expand Down Expand Up @@ -436,7 +436,7 @@ spec:
{{.GitCloneTaskRef}}
- name: build
params:
- name: IMAGE
- name: APP_IMAGE
value: $(params.imageName)
- name: REGISTRY
value: $(params.registry)
Expand Down

0 comments on commit 38e41cf

Please sign in to comment.