You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/04/20 13:03:35 UTC

[GitHub] [nifi-minifi-cpp] lordgamez opened a new pull request #1055: MINIFICPP-1454 Reduce duplication of CMake parameters in docker build

lordgamez opened a new pull request #1055:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1055


   Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [ ] Is there a JIRA ticket associated with this PR? Is it referenced
        in the commit message?
   
   - [ ] Does your PR title start with MINIFICPP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
   
   - [ ] Has your PR been rebased against the latest commit within the target branch (typically main)?
   
   - [ ] Is your initial contribution a single, squashed commit?
   
   ### For code changes:
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the LICENSE file?
   - [ ] If applicable, have you updated the NOTICE file?
   
   ### For documentation related changes:
   - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
   
   ### Note:
   Please ensure that once the PR is submitted, you check GitHub Actions CI results for build issues and submit an update to your PR as soon as possible.
   


-- 
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:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #1055: MINIFICPP-1454 Reduce duplication of CMake parameters in docker build

Posted by GitBox <gi...@apache.org>.
lordgamez commented on a change in pull request #1055:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1055#discussion_r620443589



##########
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:
       That would require some additional changes in our other CI environments, where the BUILD_NUMBER is used, I'm not sure it would worth breaking those.




-- 
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:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a change in pull request #1055: MINIFICPP-1454 Reduce duplication of CMake parameters in docker build

Posted by GitBox <gi...@apache.org>.
adamdebreceni commented on a change in pull request #1055:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1055#discussion_r618334196



##########
File path: cmake/DockerConfig.cmake
##########
@@ -22,7 +22,6 @@ add_custom_target(
         -u 1000
         -g 1000
         -v ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
-        -c IMAGE_TYPE=release

Review comment:
       should we use `-i release` here as well (other targets use it like that)? or should we remove `-i, -u, -g` wherever they align with the defaults in `DockerBuild.sh`?




-- 
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:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] fgerlits closed pull request #1055: MINIFICPP-1454 Reduce duplication of CMake parameters in docker build

Posted by GitBox <gi...@apache.org>.
fgerlits closed pull request #1055:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1055


   


-- 
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:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #1055: MINIFICPP-1454 Reduce duplication of CMake parameters in docker build

Posted by GitBox <gi...@apache.org>.
lordgamez commented on a change in pull request #1055:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1055#discussion_r618363196



##########
File path: cmake/DockerConfig.cmake
##########
@@ -22,7 +22,6 @@ add_custom_target(
         -u 1000
         -g 1000
         -v ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
-        -c IMAGE_TYPE=release

Review comment:
       I think you are right, it should be the same parameter list everywhere for the sake of consistency, I added the `-i` switch here as well in c802edc




-- 
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:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a change in pull request #1055: MINIFICPP-1454 Reduce duplication of CMake parameters in docker build

Posted by GitBox <gi...@apache.org>.
adamdebreceni commented on a change in pull request #1055:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1055#discussion_r618334196



##########
File path: cmake/DockerConfig.cmake
##########
@@ -22,7 +22,6 @@ add_custom_target(
         -u 1000
         -g 1000
         -v ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
-        -c IMAGE_TYPE=release

Review comment:
       should we use `-i release` here as other targets use it like that? or should we remove `-i, -u, -g` wherever they align with the defaults in `DockerBuild.sh`?




-- 
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:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] fgerlits commented on a change in pull request #1055: MINIFICPP-1454 Reduce duplication of CMake parameters in docker build

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org