You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by pe...@apache.org on 2021/04/09 00:04:51 UTC

[pulsar] branch branch-2.7 updated: Pass envirnoment variables to the docker container when building whee… (#10043)

This is an automated email from the ASF dual-hosted git repository.

penghui pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
     new 003f3ed  Pass envirnoment variables to the docker container when building whee… (#10043)
003f3ed is described below

commit 003f3edb66600ce218edbcbb7eb6f94bc48a8c40
Author: Ting Yuan <ty...@streamnative.io>
AuthorDate: Fri Mar 26 14:41:13 2021 +0800

    Pass envirnoment variables to the docker container when building whee… (#10043)
    
    Motivation
    
    Currently there is no way to pass env variables to the docker container when building the wheel files:
    https://github.com/apache/pulsar/blob/e4b4627890b7deee6d3ea2b6f2e121f12586b2dd/pulsar-client-cpp/docker/build-wheels.sh#L81).
    
    But `setup.py` may still use these variables to custom build wheels:
    https://github.com/apache/pulsar/blob/e4b4627890b7deee6d3ea2b6f2e121f12586b2dd/pulsar-client-cpp/python/setup.py#L32 and
    https://github.com/apache/pulsar/blob/e4b4627890b7deee6d3ea2b6f2e121f12586b2dd/pulsar-client-cpp/python/setup.py#L49
    
    This PR makes these variables can be passed by the environment
    
    (cherry picked from commit ea44087abf7949c780f250da928c79da8377644d)
---
 pulsar-client-cpp/docker/build-wheels.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pulsar-client-cpp/docker/build-wheels.sh b/pulsar-client-cpp/docker/build-wheels.sh
index fabb035..5371f85 100755
--- a/pulsar-client-cpp/docker/build-wheels.sh
+++ b/pulsar-client-cpp/docker/build-wheels.sh
@@ -76,7 +76,7 @@ for line in "${PYTHON_VERSIONS[@]}"; do
 
     VOLUME_OPTION=${VOLUME_OPTION:-"-v $ROOT_DIR:/pulsar"}
     COMMAND="/pulsar/pulsar-client-cpp/docker/build-wheel-file-within-docker.sh"
-    DOCKER_CMD="docker run -i ${VOLUME_OPTION} ${IMAGE}"
+    DOCKER_CMD="docker run -i ${VOLUME_OPTION} -e USE_FULL_POM_NAME -e NAME_POSTFIX ${IMAGE}"
 
     $DOCKER_CMD bash -c "${COMMAND}"