fgerlits commented on a change in pull request #1055:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1055#discussion_r620428878
##########
File path: docker/DockerBuild.sh
##########
@@ -112,7 +80,13 @@ while [[ $# -gt 0 ]]; do
-c|--cmake-param)
IFS='=' read -ra ARR <<< "$2"
if [[ ${#ARR[@]} -gt 1 ]]; then
- declare "${ARR[0]}"="${ARR[1]}"
+ if [ "${ARR[0]}" == "BUILD_NUMBER" ]; then
+ BUILD_NUMBER="${ARR[1]}"
+ elif [ "${ARR[0]}" == "DOCKER_BASE_IMAGE" ]; then
+ BUILD_ARGS="${BUILD_ARGS} --build-arg BASE_ALPINE_IMAGE=${ARR[1]}"
+ else
+ BUILD_ARGS="${BUILD_ARGS} --build-arg ${ARR[0]}=${ARR[1]}"
+ fi
Review comment:
We could add a new parameter, eg. `-n`, for `BUILD_NUMBER` and change
DockerConfig.cmake to run `.../DockerBuild.sh ... -n ${BUILD_NUMBER} ... -c
BASE_ALPINE_IMAGE=${DOCKER_BASE_IMAGE}`, then we wouldn't need this if-else
here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]