@@ -173,89 +173,91 @@ jobs:
173173 file : Images/${{ matrix.plugin }}/${{ matrix.plugin }}.dockerfile
174174 tags : ghcr.io/${{ github.repository }}/${{ matrix.plugin }}:testcandidate
175175
176- # build_mulit_plugins:
177- # needs :
178- # - build_plugins
179- # strategy:
180- # matrix :
181- # plugin: ["qp-qiime2"]
182- # runs-on: ubuntu-latest
183- # steps:
184- # - name: Checkout tinqiita repo
185- # uses: actions/checkout@v4
186-
187- # - name: Set up Docker Buildx
188- # uses: docker/setup-buildx-action@v3
189-
190- # - name: Read image version from dockerfile
191- # id: vars
192- # run: |
193- # VERSION=$(head -n 1 Images/${{ matrix.plugin }}/${{ matrix.plugin }}.dockerfile | cut -d ":" -f 2- | tr -d " ")
194- # echo "IMAGE_TAG=$VERSION" >> $GITHUB_ENV
195- # cp Images/${{ matrix.plugin }}/start_${{ matrix.plugin }}.sh Images/test_plugin.sh Images/${{ matrix.plugin }}/requirements.txt Images/trigger_noconda.py Images/trigger.py .
196-
197- # - name: Download certificates from job build_main
198- # uses: actions/download-artifact@v4
199- # with:
200- # name: certificates
201- # path: ./
202- # - name: Download fake references
203- # uses: actions/download-artifact@v4
204- # with:
205- # name: fake_references
206- # path: ./
207-
208- # - name: Log in to GitHub Container Registry
209- # uses: docker/login-action@v3
210- # with:
211- # registry: ghcr.io
212- # username: ${{ github.actor }}
213- # password : ${{ secrets.GITHUB_TOKEN }}
214-
215- # - name: Build plugin images
216- # uses: docker/build-push-action@v6
217- # with:
218- # context: .
219- # load: true
220- # file: Images/${{ matrix.plugin }}/${{ matrix.plugin }}.dockerfile
221- # tags: ghcr.io /${{ github.repository }}/${{ matrix.plugin }}:testcandidate
222- # cache-from: type=gha,scope=tinqiita- ${{ github.ref_name }}
223- # cache-to : type=gha,scope=tinqiita-${{ github.ref_name }},mode=max
224-
225- # - name: adapt compose file to select specific plugin
226- # run: |
227- # sed -i "s|||" compose_github.yaml
228- # sed -i "s/ MATRIXPLUGIN/ ${{ matrix.plugin }}/g" compose_github.yaml
229-
230- # - name: Run docker compose
231- # uses: hoverkraft-tech/compose-action@v2.0.1
232- # with:
233- # compose-file: "compose_github.yaml"
234- # services: |
235- # nginx
236-
237- # - name: Execute tests in the running services
238- # run: |
239- # sleep 5
240- # docker compose exec ${{ matrix.plugin }} /bin/bash -c "bash /test_plugin.sh"
241-
242- # - name: Push image to ghcr (only if tests passed)
243- # if: success()
244- # uses: docker/build-push-action@v6
245- # with:
246- # context: .
247- # push: true
248- # file: Images/${{ matrix.plugin }}/${{ matrix.plugin }}.dockerfile
249- # tags: ghcr.io/${{ github.repository }}/${{ matrix.plugin }}:testcandidate
176+ # the qp-qiime2 plugin cannot be tested in isolation, it also needs qtp-diversity and qtp-visualization to be active in qiita
177+ build_mulit_plugins :
178+ needs :
179+ - build_plugins
180+ strategy :
181+ matrix :
182+ multiplugin : ["qp-qiime2"]
183+ runs-on : ubuntu-latest
184+ steps :
185+ - name : Checkout tinqiita repo
186+ uses : actions/checkout@v4
187+
188+ - name : Set up Docker Buildx
189+ uses : docker/setup-buildx-action@v3
190+
191+ - name : Read image version from dockerfile
192+ id : vars
193+ run : |
194+ VERSION=$(head -n 1 Images/${{ matrix.multiplugin }}/${{ matrix.multiplugin }}.dockerfile | cut -d ":" -f 2- | tr -d " ")
195+ echo "IMAGE_TAG=$VERSION" >> $GITHUB_ENV
196+ cp Images/${{ matrix.multiplugin }}/start_${{ matrix.multiplugin }}.sh Images/test_plugin.sh Images/${{ matrix.multiplugin }}/requirements.txt Images/trigger_noconda.py Images/trigger.py .
197+
198+ - name : Download certificates from job build_main
199+ uses : actions/download-artifact@v4
200+ with :
201+ name : certificates
202+ path : ./
203+ - name : Download fake references
204+ uses : actions/download-artifact@v4
205+ with :
206+ name : fake_references
207+ path : ./
208+
209+ - name : Log in to GitHub Container Registry
210+ uses : docker/login-action@v3
211+ with :
212+ registry : ghcr.io
213+ username : ${{ github.actor }}
214+ password : ${{ secrets.GITHUB_TOKEN }}
215+
216+ - name : Build plugin images
217+ uses : docker/build-push-action@v6
218+ with :
219+ context : .
220+ load : true
221+ file : Images /${{ matrix.multiplugin }}/${{ matrix.multiplugin }}.dockerfile
222+ tags : ghcr.io/ ${{ github.repository }}/${{ matrix.multiplugin }}:testcandidate
223+ cache-from : type=gha,scope=tinqiita-${{ github.ref_name }}
224+ cache-to : type=gha,scope=tinqiita-${{ github.ref_name }},mode=max
225+
226+ - name : adapt compose file to select specific plugin
227+ run : |
228+ if [[ "${{ matrix.multiplugin }}" == "qp-qiime2" ]]; then sed -i 's|- QIITA_PLUGINS=" MATRIXPLUGIN:"|- QIITA_PLUGINS=" ${{ matrix.multiplugin }}:qtp-diversity:qtp-visualization:"|' compose_github.yaml; sed -i 's|MATRIXPLUGIN:|${{ matrix.multiplugin }}:\n condition: service_started\n qtp-diversity:\n condition: service_started\n qtp-visualization:|' compose_github.yaml; fi;
229+
230+ - name : Run docker compose
231+ uses : hoverkraft-tech/compose-action@v2.0.1
232+ with :
233+ compose-file : " compose_github.yaml"
234+ services : |
235+ nginx
236+
237+ - name : Execute tests in the running services
238+ run : |
239+ sleep 5
240+ docker compose exec ${{ matrix.multiplugin }} /bin/bash -c "bash /test_plugin.sh"
241+
242+ - name : Push image to ghcr (only if tests passed)
243+ if : success()
244+ uses : docker/build-push-action@v6
245+ with :
246+ context : .
247+ push : true
248+ file : Images/${{ matrix.multiplugin }}/${{ matrix.multiplugin }}.dockerfile
249+ tags : ghcr.io/${{ github.repository }}/${{ matrix.multiplugin }}:testcandidate
250250
251251 publish_images :
252252 needs :
253253 - build_plugins
254254 - build_main
255+ - build_mulit_plugins
255256 strategy :
256257 matrix :
257258 image : ["qp-deblur", "qtp-biom", "qtp-sequencing", "qtp-visualization", "qtp-diversity", "qp-target-gene", "qtp-job-output-folder",
258- " nginx" , "qiita", "plugin_collector"]
259+ " nginx" , "qiita", "plugin_collector",
260+ " qp-qiime2" ]
259261 runs-on : ubuntu-latest
260262 steps :
261263 - name : Checkout tinqiita repo
0 commit comments