Skip to content

Commit

Permalink
Merge pull request #72 from red-hat-data-services/parameter-version
Browse files Browse the repository at this point in the history
update tekton and dockerfile.konflux to parameterize version value
  • Loading branch information
MohammadiIram authored Dec 11, 2024
2 parents 5af8520 + b76c066 commit 1ac7c80
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .tekton/odh-modelmesh-v2-16-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ spec:
description: Path to a file with build arguments for buildah, see https://www.mankier.com/1/buildah-build#--build-arg-file
name: build-args-file
type: string
- default: "v2.16.1"
name: version
type: string
results:
- description: ""
name: IMAGE_URL
Expand Down Expand Up @@ -278,6 +281,7 @@ spec:
- name: BUILD_ARGS
value:
- $(params.build-args[*])
- VERSION=$(params.version)
- name: BUILD_ARGS_FILE
value: $(params.build-args-file)
- name: SOURCE_ARTIFACT
Expand All @@ -286,7 +290,7 @@ spec:
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
- name: LABELS
value:
- version=v2.16.1
- version=$(params.version)
- url=$(params.git-url)
- release=$(tasks.clone-repository.results.commit-timestamp)
- git.url=$(params.git-url)
Expand Down
7 changes: 5 additions & 2 deletions Dockerfile.konflux
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

# Build arguments
ARG SOURCE_CODE=.
ARG VERSION

FROM registry.redhat.io/ubi8/ubi-minimal@sha256:c12e67af6a7e15113d76bc72f10bef2045c026c71ec8b7124c8a075458188a83 AS stage

Expand All @@ -18,8 +19,9 @@ RUN cd ./cachi2/output/deps/generic && \
FROM registry.redhat.io/ubi8/openjdk-17-runtime@sha256:f86ab776ae96ff2fcb376c4107ad3e7abefbb7fae794c56eddb56770f556a061 as runtime

## Build args to be used at this step
ARG VERSION
ARG USERID=2000
ENV CI_CONTAINER_VERSION=v2.16.0

LABEL com.redhat.component="odh-modelmesh-container" \
name="managed-open-data-hub/odh-modelmesh-rhel8" \
description="Modelmesh is a distributed LRU cache for serving runtime models" \
Expand Down Expand Up @@ -50,7 +52,8 @@ RUN useradd -c "Application User" -U -u ${USERID} -m app && \
mkdir -p log && \
chown -R app:0 . && \
chmod -R 771 . && chmod 775 *.sh *.py && \
echo "${CI_CONTAINER_VERSION}" > /opt/kserve/mmesh/build-version
echo "${VERSION}" \
echo "${VERSION}" > /opt/kserve/mmesh/build-version

EXPOSE 8080

Expand Down

0 comments on commit 1ac7c80

Please sign in to comment.