You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adjust Dockerfile to be more friendly with openshift-ci
In openshift-ci, only static values can be passed when building a
Dockerfile. However, the `imageVersion`, `buildId` and `commitSha` are
required to be generated when doing the build (are dynamic); e.g:
```
GIT_COMMIT=$(git rev-parse HEAD)
BUILD_ID=$(date '+%Y%m%d')-$(git rev-parse HEAD | cut -c -5)
IMAGE_TAG_VERSION=0.11.0-alpha
IMAGE_TAG=${IMAGE_TAG_VERSION}-$(git branch --show-current)_${BUILD_ID}
podman build \
--build-arg imageVersion=${IMAGE_TAG} \
--build-arg buildId=${BUILD_ID} \
--build-arg commitSha=${GIT_COMMIT} .
```
The most important argument is `buildId` to let ModelMesh identify the
build date of itself.
This changes the Dockerfile to resolve the `buildId` in the builder
stage. The `imageVersion` and `commitSha` arguments are lost, under the
rationale that these are not essential for ModelMesh to work correctly.
Signed-off-by: Edgar Hernández <[email protected]>
0 commit comments