Skip to content

Commit 326a30b

Browse files
committed
Update EL9/python3-entrypoint.sh to use python venv from framework container.
Add the option to call make-release script to build RPMs and wheels. Update Jenkinsfile_EL9 to fit these updates.
1 parent c259068 commit 326a30b

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

.Jenkins/workflows/Jenkinsfile_EL9

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ pipeline {
228228
echo "prepare podman image ${DEbuildStageDockerImage}"
229229
sh "podman build --pull --tag ${DEbuildStageDockerImage} --build-arg BASEIMAGE=docker.io/hepcloud/decision-engine-ci-el9:${BRANCH} --build-arg UID=\$(id -u) --build-arg GID=\$(id -g) -f decisionengine/package/ci/EL9/Dockerfile decisionengine/package/ci/EL9/"
230230
echo "Run ${STAGE_NAME} tests"
231-
sh "podman run --privileged --userns keep-id:uid=\$(id -u),gid=\$(id -g) --rm --env PYTEST_TIMEOUT=${PYTEST_TIMEOUT} -v ${WORKSPACE}:${WORKSPACE} -w ${WORKSPACE} --entrypoint /bin/bash ${DEbuildStageDockerImage} \"decisionengine/package/release/make-release.sh\" \"-v\" \"-e\" \"${BRANCH}\""
231+
sh "podman run --privileged --userns keep-id:uid=\$(id -u),gid=\$(id -g) --rm --env PYTEST_TIMEOUT=${PYTEST_TIMEOUT} -v ${WORKSPACE}:${WORKSPACE} -w ${WORKSPACE}/decisionengine ${DEbuildStageDockerImage} \"make-release\" \"make-release.log\""
232232
}
233233
post {
234234
always {

package/ci/EL9/python3-entrypoint.sh

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,23 @@ echo ''
2121
sleep 1
2222
echo ''
2323

24+
python3 -m venv ~/de_venv
25+
source ~/de_venv/bin/activate
26+
python3 -m pip install virtualenvwrapper
27+
export VIRTUALENVWRAPPER_PYTHON=~/de_venv/bin/python3
28+
source ~/de_venv/bin/virtualenvwrapper.sh
29+
add2virtualenv /var/tmp/de_venv/lib64/python3.9/site-packages/
30+
2431
# Useful info
2532
python3 -m site
2633
echo ''
2734

2835
python3 setup.py bdist_wheel
29-
python3 -m pip install -e . --user
30-
python3 -m pip install -e .[develop] --user
36+
python3 -m pip install -e .
37+
python3 -m pip install -e .[develop]
3138

3239
echo''
33-
python3 -m pip list
40+
python3 -m pip list -v
3441

3542
# make sure the pipe doesn't eat failures
3643
set -o pipefail
@@ -43,5 +50,16 @@ echo "PYTHONPATH: ${PYTHONPATH}"
4350
# so we unset this variable
4451
unset PROMETHEUS_MULTIPROC_DIR
4552

46-
# run the python "module/command"
47-
python3 ${CMD} 2>&1 | tee ${LOGFILE}
53+
if [[ ${CMD} =~ "make-release" ]]; then
54+
# run make-release
55+
cur_revision=$(git describe --tags| sed -r 's/-([0-9]*)-/.dev\1+/g')
56+
echo "cur_revision: ${cur_revision}"
57+
# podman runs this python script from decisionengine folder, we need to move in the parent folder to run make-release.sh
58+
cd ..
59+
decisionengine/package/release/make-release.sh -v -e -s ${cur_revision} -t ${cur_revision} ${cur_revision} 2>&1 | tee ${LOGFILE}
60+
61+
else
62+
# run the python "module/command"
63+
python3 ${CMD} 2>&1 | tee ${LOGFILE}
64+
65+
fi

0 commit comments

Comments
 (0)