Skip to content

Commit 66ac511

Browse files
committed
Enhance Docker setup by adding symbolic links for retrocompatibility and updating ENTRYPOINT syntax; streamline test-in-docker.sh for improved environment setup and execution flow.
1 parent 2fe9c5f commit 66ac511

File tree

2 files changed

+25
-23
lines changed

2 files changed

+25
-23
lines changed

dockerfile-ci

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,19 @@ COPY --chown=irisowner:irisowner . /irisdev/app
55

66
WORKDIR /irisdev/app
77

8+
# map the source code of iop into iris python lib
9+
RUN ln -s /irisdev/app/src/iop /usr/irissys/mgr/python/iop
10+
# for retrocompatibility
11+
RUN ln -s /irisdev/app/src/grongier /usr/irissys/mgr/python/grongier
12+
813
## Python stuff
9-
ENV IRISUSERNAME "SuperUser"
10-
ENV IRISPASSWORD "SYS"
11-
ENV IRISNAMESPACE "IRISAPP"
14+
ENV IRISUSERNAME="SuperUser"
15+
ENV IRISPASSWORD="SYS"
16+
ENV IRISNAMESPACE="IRISAPP"
1217
ENV PYTHON_PATH=/usr/irissys/bin/
13-
ENV LD_LIBRARY_PATH=${ISC_PACKAGE_INSTALLDIR}/bin:${LD_LIBRARY_PATH}
14-
ENV PATH "/home/irisowner/.local/bin:/usr/irissys/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/irisowner/bin"
18+
ENV LD_LIBRARY_PATH=${ISC_PACKAGE_INSTALLDIR}/bin
19+
ENV PATH="/home/irisowner/.local/bin:/usr/irissys/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/irisowner/bin"
1520

1621
RUN pip install -r requirements-dev.txt
1722

18-
ENTRYPOINT /irisdev/app/test-in-docker.sh
23+
ENTRYPOINT [ "/irisdev/app/test-in-docker.sh" ]

test-in-docker.sh

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,38 +22,35 @@ exit_on_error () {
2222

2323
iris_start
2424

25-
# run a python command
2625
cd src
27-
python3 -c "from grongier.pex import Utils; Utils.setup()"
28-
exit_on_error
2926

30-
# back to workdir
31-
cd ..
27+
# print iris version
28+
echo "IRIS version:"
29+
python3 -c "import iris; print(iris.system.Version.GetVersion())"
30+
31+
# setup the environment
32+
python3 -m iop --init
33+
exit_on_error
3234

3335
# Unit tests
36+
cd ..
3437
python3 -m pytest
3538
exit_on_error
3639

37-
# install pip
38-
pip install --upgrade pip
39-
# install main package
40-
pip install git+https://github.com/grongierisc/interoperability-embedded-python
41-
# install test dependencies
42-
pip install -r https://raw.githubusercontent.com/grongierisc/interoperability-embedded-python/master/requirements-dev.txt
43-
4440
# Integration tests
45-
iop --migrate demo/python/reddit/settings.py
41+
cd src
42+
python3 -m iop --migrate ../demo/python/reddit/settings.py
4643
exit_on_error
4744

48-
iop --default PEX.Production
45+
python3 -m iop --default PEX.Production
4946
exit_on_error
5047

51-
iop --start PEX.Production --detach
48+
python3 -m iop --start PEX.Production --detach
5249
exit_on_error
5350

54-
iop --log 10
51+
python3 -m iop --log 10
5552

56-
iop -S
53+
python3 -m iop -S
5754
exit_on_error
5855

5956
iris_stop

0 commit comments

Comments
 (0)