1- name : CI-application-containers
1+ name : Build and Publish VCell Docker Images
22
33on :
44 workflow_dispatch :
55 inputs :
66 tag :
77 description : " Repository tag (e.g., 7.7.0.37)"
88 required : true
9+ # client_only:
10+ # description: "Build only client images (true/false)"
11+ # required: false
12+ # default: "false"
913 release :
1014 types : [published]
1115
@@ -60,47 +64,15 @@ jobs:
6064 - name : Install Dependencies
6165 run : pip install -r requirements.txt
6266
63- - name : build vcell-cli-utils package
67+ - name : build python packages
6468 run : |
65- cd vcell-cli-utils
66- poetry install
67- poetry run python -m pytest
68-
69- - name : build vcell-admin package
70- run : |
71- cd docker/swarm/vcell-admin
72- poetry install
73- poetry run python -m pytest
74-
75- - name : build pythonCopasiOpt package
76- run : |
77- cd pythonCopasiOpt/vcell-opt
78- poetry install
79- poetry run python -m pytest
80-
81- - name : build pythonVtk package
82- run : |
83- cd pythonVtk
84- poetry install
85- poetry run python -m pytest
86-
87- - name : build vcutils package
88- run : |
89- cd python-utils
90- poetry install
91- poetry run python -m pytest
92-
93- - name : build python-restclient package
94- run : |
95- cd python-restclient
96- poetry install
97- poetry run python -m pytest
98-
99- - name : build vcelldata package
100- run : |
101- cd pythonData
102- poetry install
103- poetry run python -m pytest
69+ set -ux
70+ for POETRY_DIR in vcell-cli-utils docker/swarm/vcell-admin pythonCopasiOpt/vcell-opt pythonVtk python-utils python-restclient pythonData;\
71+ do pushd $POETRY_DIR;\
72+ poetry install;\
73+ poetry run python -m pytest;\
74+ popd;\
75+ done
10476
10577 - name : setup java 17 with maven cache
10678 uses : actions/setup-java@v4
@@ -115,12 +87,14 @@ jobs:
11587 cd docker/build
11688 echo "${{ secrets.GITHUB_TOKEN }}" | sudo docker login ghcr.io -u ${{ github.actor }} --password-stdin
11789 echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
118- ./build.sh all ${{ env.VCELL_REPO_NAMESPACE }} ${{ env.VCELL_TAG }}
90+ export BUILD_IMAGES="all"
91+ ./build.sh ${BUILD_IMAGES} ${{ env.VCELL_REPO_NAMESPACE }} ${{ env.VCELL_TAG }}
11992
12093 - name : tag as latest and push to registry
12194 shell : bash
12295 run : |
123- for CONTAINER in vcell-exporter vcell-api vcell-rest vcell-webapp-prod vcell-webapp-dev vcell-webapp-stage vcell-webapp-island vcell-batch vcell-opt vcell-clientgen vcell-data vcell-db vcell-mongo vcell-sched vcell-submit vcell-admin;\
96+ export CONTAINER_SET="vcell-exporter vcell-api vcell-rest vcell-webapp-prod vcell-webapp-dev vcell-webapp-stage vcell-webapp-island vcell-batch vcell-opt vcell-clientgen vcell-data vcell-db vcell-mongo vcell-sched vcell-submit vcell-admin"
97+ for CONTAINER in ${CONTAINER_SET};\
12498 do docker tag ${VCELL_REPO_NAMESPACE}/$CONTAINER:${VCELL_TAG} ${VCELL_REPO_NAMESPACE}/$CONTAINER:latest;\
12599 docker tag ${VCELL_REPO_NAMESPACE}/$CONTAINER:${VCELL_TAG} ${VCELL_REPO_NAMESPACE}/$CONTAINER:${FRIENDLY_TAG};\
126100 docker push --all-tags ${VCELL_REPO_NAMESPACE}/$CONTAINER;\
@@ -129,3 +103,20 @@ jobs:
129103 - name : Setup tmate session
130104 uses : mxschmitt/action-tmate@v3
131105 if : ${{ failure() }}
106+
107+
108+ # if [ "${{ github.event.inputs.client_only }}" = "true" ]; then
109+ # echo "Building only client images"
110+ # export BUILD_IMAGES="clientgen"
111+ # else
112+ # echo "Building all images"
113+ #
114+ # fi
115+
116+ # if [ "${{ github.event.inputs.client_only }}" = "true" ]; then
117+ # echo "Building only client images"
118+ # export CONTAINER_SET="vcell-clientgen"
119+ # else
120+ # echo "Building all images"
121+ # export CONTAINER_SET="vcell-exporter vcell-api vcell-rest vcell-webapp-prod vcell-webapp-dev vcell-webapp-stage vcell-webapp-island vcell-batch vcell-opt vcell-clientgen vcell-data vcell-db vcell-mongo vcell-sched vcell-submit vcell-admin"
122+ # fi
0 commit comments