build_inf_prepare_jenkins: fix for py27 venv and mock_overlay 66/8366/1
authorJackie Huang <jackie.huang@windriver.com>
Mon, 23 May 2022 08:04:46 +0000 (16:04 +0800)
committerJackie Huang <jackie.huang@windriver.com>
Mon, 23 May 2022 08:04:46 +0000 (16:04 +0800)
Issue-ID: INF-274

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: I39e40f21a4b95d92df2120b34109369e02597ac8

scripts/build_inf_centos/build_inf_prepare_jenkins.sh

index be6e5e3..6fd3899 100755 (executable)
@@ -217,21 +217,14 @@ sudo pip install -c ${TOOLS_DIR}/toCOPY/builder-constraints.txt \
     junitxml \
     testtools
 
-# Create a sane py27 virtualenv
-virtualenv /opt/py27 && \
-    source /opt/py27/bin/activate && \
-    sudo pip install -c ${TOOLS_DIR}/toCOPY/builder-opt-py27-constraints.txt \
-            tox \
-        && \
-    for prog in tox ; do \
-        ln -s /opt/py27/bin/$prog /usr/bin ; \
-    done
+
 
 # Inherited  tools for mock stuff
 # we at least need the mock_cache_unlock tool
 # they install into /usr/bin
-sudo cp -rf ${TOOLS_DIR}/toCOPY/mock_overlay /opt/mock_overlay
-cd /opt/mock_overlay
+mkdir -p ${WORKSPACE}/opt
+cp -rf ${TOOLS_DIR}/toCOPY/mock_overlay ${WORKSPACE}/opt/mock_overlay
+cd ${WORKSPACE}/opt/mock_overlay
 make
 sudo make install
 
@@ -303,4 +296,10 @@ sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
 # Try to continue a yum command even if a StarlingX repo is unavailable.
 sudo yum-config-manager --setopt=StarlingX\*.skip_if_unavailable=1 --save
 
+# Create a sane py27 virtualenv
+virtualenv ${WORKSPACE}/opt/py27
+source ${WORKSPACE}/opt/py27/bin/activate
+pip install -c ${TOOLS_DIR}/toCOPY/builder-opt-py27-constraints.txt tox
+sudo ln -s ${WORKSPACE}/opt/py27/bin/tox /usr/bin
+
 echo_step_end