Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
309 commits
Select commit Hold shift + click to select a range
05fd6e4
export the SSL affecting env variables
sjanssen2 Mar 5, 2025
a95b76a
more verbose debugging in qiita
sjanssen2 Mar 5, 2025
cf55ba6
use service name
sjanssen2 Mar 5, 2025
cecd052
start with parameters to specialize to different plugins
sjanssen2 Mar 5, 2025
a73feba
provide plugin specific parameters
sjanssen2 Mar 5, 2025
ed2dcd4
adding qtp-sequencing
sjanssen2 Mar 5, 2025
7484d30
also notify user if stream is not present at all
sjanssen2 Mar 5, 2025
6812b96
adding new plugin
sjanssen2 Mar 5, 2025
53061c0
refactor makefile to avoid code duplication for plugins
sjanssen2 Mar 5, 2025
74da283
ignore src files and tmp Certificates file
sjanssen2 Mar 5, 2025
0f839bb
add new plugin: qtp-visualization
sjanssen2 Mar 5, 2025
ee9a9e6
more debug info
sjanssen2 Mar 5, 2025
05d280e
more debug info
sjanssen2 Mar 5, 2025
8d08877
ensure that plugin mini-tornado runs in base env to make sure the cor…
sjanssen2 Mar 5, 2025
565b8c4
adding plugins "deblur" and "diversity"
sjanssen2 Mar 5, 2025
e5cf9cc
handle case that software is not present at all
sjanssen2 Mar 6, 2025
344594b
adding qtp-job-output-folder and qp-qiime2 plugins
sjanssen2 Mar 6, 2025
f5f2ced
a novel mechanism to create mountpoint sub-directories in qiita's BAS…
sjanssen2 Mar 6, 2025
78cd400
also fix the conda activation command for qiita's private plugins
sjanssen2 Mar 7, 2025
47e9320
ignore will shadow src in my IDE
sjanssen2 Mar 7, 2025
6c3e316
fix get_time issues when validating BIOM artifacts
sjanssen2 Mar 7, 2025
334b001
Merge branch 'stefan_pluginactivation' of github.com:jlab/qiita-keycl…
sjanssen2 Mar 7, 2025
cfd0646
also mount qiita src to workers
sjanssen2 Mar 7, 2025
7e3291a
Merge branch 'stefan_pluginactivation' of github.com:jlab/qiita-keycl…
sjanssen2 Mar 7, 2025
3166180
hide workflows to NOT filter commands for artifact processing
sjanssen2 Mar 7, 2025
8f61260
refactor in a sense that docker prefix "qiita-container-anna-" must n…
sjanssen2 Mar 11, 2025
3f4318b
make certificates in tmp dir + inject docker prefix
sjanssen2 Mar 11, 2025
eb71b4b
remove unneccessary lines from startup scripts
sjanssen2 Mar 11, 2025
1047bcb
make certificate creation more flexible with regards to docker prefix
sjanssen2 Mar 11, 2025
78b16e3
avoid hard coding of docker prefix
sjanssen2 Mar 11, 2025
363a70e
found an even better way to avoid basename project names: field "name…
sjanssen2 Mar 11, 2025
c25c8db
update base url
sjanssen2 Mar 11, 2025
2f5354d
add aspera for ENA submission
sjanssen2 Mar 14, 2025
c40668e
fixed parameter --server-cert to --ca-cert
svdlh Apr 22, 2025
f73ad0f
Merge pull request #12 from jlab/fix_configpar_diversity
sjanssen2 Apr 22, 2025
f1cece0
switched --server-cert to --ca-cert
svdlh Apr 22, 2025
06658f4
Merge pull request #14 from jlab/fix_joboutput
svdlh Apr 22, 2025
d9d6e4c
Merge pull request #9 from jlab/enable_study_creation
sjanssen2 May 8, 2025
d8a65bd
Merge pull request #10 from jlab/hide_workflows_to_enable_deblur
sjanssen2 May 8, 2025
ed9ad50
Merge pull request #11 from jlab/refactor_1
sjanssen2 May 8, 2025
3747872
Merge pull request #15 from jlab/hide_workflows_to_enable_deblur
sjanssen2 May 8, 2025
8001ad4
Merge pull request #16 from jlab/enable_study_creation
sjanssen2 May 8, 2025
824bbb3
intermediate state of rewrite
sjanssen2 May 8, 2025
342a87e
use cache for docker image creation for qiita + clone qtp-biom first
sjanssen2 May 8, 2025
c94955d
Update README.md
sjanssen2 May 8, 2025
8bab5d9
Update README.md
sjanssen2 May 8, 2025
36f3e78
ensure workdir for qiita exists
sjanssen2 May 8, 2025
b4949db
Update README.md
sjanssen2 May 8, 2025
fd2e9e3
Update README.md
sjanssen2 May 9, 2025
f3eea1f
Update README.md
sjanssen2 May 9, 2025
817284e
no extra volume names needed
sjanssen2 May 9, 2025
b6382f7
give postgres some time to initialize before speaking against the DB
sjanssen2 May 9, 2025
f107037
always overwrite configuration collection with files found in plugins…
sjanssen2 May 9, 2025
ed94b73
Merge branch 'tinqiita' of github.com:jlab/qiita-keycloak into tinqiita
sjanssen2 May 9, 2025
4bff551
added qp-multiqc dependencys (Makefile, compose.yaml, Images/qp-multiqc)
Tobias-Gr May 27, 2025
e0258c0
Revert "added qp-multiqc dependencys (Makefile, compose.yaml, Images/…
sjanssen2 May 28, 2025
478fec6
fix local time zone information in qiime2 container as it otherwise f…
sjanssen2 Jul 4, 2025
5439f28
Merge pull request #20 from jlab/fix_q2
sjanssen2 Jul 4, 2025
f6a91cb
fix git repo warning
sjanssen2 Jul 4, 2025
566dd6e
update qiime2 in qtp-siualization
sjanssen2 Jul 4, 2025
111d80f
update python version
sjanssen2 Jul 4, 2025
c1fb1ec
Merge pull request #21 from jlab/sync_qiime2
sjanssen2 Jul 4, 2025
adc9788
make downward compatible for deblur using py3.5
sjanssen2 Aug 21, 2025
9f02c34
also ignore newly designed "references" directory
sjanssen2 Aug 21, 2025
bb9b782
updating qp-deblur: extra target to create reference + using non-cond…
sjanssen2 Aug 21, 2025
c5e73b0
a version that ignores conda at all, for smaller plugin container
sjanssen2 Aug 21, 2025
48bb413
adapt to small non-conda container
sjanssen2 Aug 21, 2025
f8bb0d8
heavy changes to obtain a smaller docker image: using two-stage mecha…
sjanssen2 Aug 21, 2025
75e3943
using small qp-deblur plugin image
sjanssen2 Aug 21, 2025
50e62a8
be more general
sjanssen2 Aug 21, 2025
aa08479
in the future, certificate files shall be mounted directly into conta…
sjanssen2 Aug 22, 2025
3d0ea31
point to a predictable *.pem file, which will be mounted to container…
sjanssen2 Aug 22, 2025
1db96ba
mount certificat files from host to container to avoid having differe…
sjanssen2 Aug 22, 2025
5ed4492
keep certificat creation constand across multiple builds
sjanssen2 Aug 22, 2025
f194f74
distributing the SAME certificat files via mounts to the multiple con…
sjanssen2 Aug 22, 2025
f31769e
remove unneccessary volume
sjanssen2 Aug 22, 2025
9b70bbc
Merge pull request #24 from jlab/sync_certificates
sjanssen2 Aug 22, 2025
bfb619d
Merge branch 'tinqiita' into smaller_deblur
sjanssen2 Aug 22, 2025
0297710
merge
sjanssen2 Aug 22, 2025
0e8cfe2
adding patches for multistage qp-deblur build
sjanssen2 Aug 22, 2025
7764c3f
adding a version to the dockerfile
sjanssen2 Aug 22, 2025
fe5420f
in the middle of shrinking the image
sjanssen2 Aug 22, 2025
3612fc7
revert back to local
sjanssen2 Aug 22, 2025
26fde73
adding new files
sjanssen2 Aug 22, 2025
bf27ca6
change branch
sjanssen2 Aug 22, 2025
ad7f749
don't make
sjanssen2 Aug 22, 2025
94f804d
point to correct file
sjanssen2 Aug 22, 2025
a28fb1f
create dir for github action
sjanssen2 Aug 22, 2025
29b6bc5
copy files into context
sjanssen2 Aug 22, 2025
78fd7f5
migrate to no_conda trigger
sjanssen2 Aug 22, 2025
cc5320b
ensure use of correct branch for qiita_client
sjanssen2 Aug 22, 2025
dd776d5
revert
sjanssen2 Aug 22, 2025
a61ac38
leave some comments
sjanssen2 Aug 22, 2025
9b467d6
patch with correct working dir
sjanssen2 Aug 22, 2025
52f7696
debug
sjanssen2 Aug 25, 2025
334cba1
more debug
sjanssen2 Aug 25, 2025
eef19bb
create file to make find not fail
sjanssen2 Aug 25, 2025
14a9de5
change dockerhub repo
sjanssen2 Aug 25, 2025
7bd7157
sync parameter name
sjanssen2 Aug 25, 2025
61c22f4
proper use of argzment
sjanssen2 Aug 25, 2025
d27164e
store dead end of qtp-biom smaller
sjanssen2 Aug 25, 2025
274e8b2
a working (but still large) version for qtp-biom with q2-tiny
sjanssen2 Aug 26, 2025
cc95255
defining a pip dependency list via external file
sjanssen2 Aug 26, 2025
1c3e859
no conda anymore
sjanssen2 Aug 26, 2025
2c57bf9
working and small version for qtp-biom, dockfile needs some more clea…
sjanssen2 Aug 26, 2025
f5bc5fe
adding version
sjanssen2 Aug 26, 2025
0ee1f23
also build biom
sjanssen2 Aug 26, 2025
41a08e1
adding trigger.py file
sjanssen2 Aug 26, 2025
b7630d8
source from git instead local copy
sjanssen2 Aug 26, 2025
33ace7e
qiita-files from repo
sjanssen2 Aug 26, 2025
1e4430d
cleanup and moving crt issue to stage 2
sjanssen2 Aug 26, 2025
16dd895
arg plugincoupling without arg name
sjanssen2 Aug 27, 2025
506141f
adding shrunk container for qp-target-gene
sjanssen2 Aug 28, 2025
eb4285c
install additional dependency + copy library
sjanssen2 Aug 28, 2025
3133cda
also make deblur use a requirements.txt file for pip install in stage 2
sjanssen2 Aug 28, 2025
76dd901
first attempt to shrink qtp-sequences
sjanssen2 Aug 28, 2025
3b534ab
"install" pigz
sjanssen2 Aug 28, 2025
8598ae7
also build qtp-sequencing docker container
sjanssen2 Aug 28, 2025
946ed41
use a much smaller base for nginx
sjanssen2 Aug 28, 2025
26d1728
forgot to add a version line
sjanssen2 Aug 28, 2025
38e5ffd
copy file to correct location
sjanssen2 Aug 28, 2025
acc02c4
qiime2 tiny did not work out, since their qz* are too new for other p…
sjanssen2 Aug 29, 2025
d9f7029
code style
sjanssen2 Aug 29, 2025
826a413
speed up conda resolving
sjanssen2 Aug 29, 2025
98a65da
still big, but reduced qiime2
sjanssen2 Aug 29, 2025
6fae6b5
shrink qtp-visualization
sjanssen2 Aug 29, 2025
9fb7c51
Merge pull request #25 from jlab/small_qtp-vis
sjanssen2 Aug 29, 2025
47ee214
relax channel prios
sjanssen2 Aug 29, 2025
008273a
strict but no sub-version
sjanssen2 Sep 1, 2025
24abc27
use master branch for qiita-files and qiita-client
sjanssen2 Sep 1, 2025
3c0f4cb
use master
sjanssen2 Sep 1, 2025
9a2c9e5
trigger qiita image build
sjanssen2 Sep 2, 2025
b4daee7
add empty file
sjanssen2 Sep 2, 2025
fcf8292
add version tags
sjanssen2 Sep 2, 2025
485ac9d
add req file
sjanssen2 Sep 2, 2025
d519722
forgot target
sjanssen2 Sep 2, 2025
cad5c43
normalize name
sjanssen2 Sep 2, 2025
4c22e1d
remove duplicate
sjanssen2 Sep 2, 2025
ebb93a7
add compose
sjanssen2 Sep 2, 2025
41516db
execute more make targets
sjanssen2 Sep 2, 2025
03ab34d
also push to tag "latest"
sjanssen2 Sep 2, 2025
2c56710
create latest for all
sjanssen2 Sep 2, 2025
6a93de8
limit to save compute
sjanssen2 Sep 2, 2025
a73543c
all but diversity
sjanssen2 Sep 2, 2025
040325e
no compose for the moment
sjanssen2 Sep 2, 2025
41d7f70
restructure into build, test, push
sjanssen2 Sep 2, 2025
a909e2c
only deblur
sjanssen2 Sep 2, 2025
bbb9874
only qtp sequencing
sjanssen2 Sep 2, 2025
59afc22
mount log dir to containers
sjanssen2 Sep 2, 2025
3fea414
execute test
sjanssen2 Sep 2, 2025
b332144
change localhost on other places as well
sjanssen2 Sep 2, 2025
2d66191
fix quotes
sjanssen2 Sep 2, 2025
cdd6a67
/ is important
sjanssen2 Sep 2, 2025
e15f23c
extend make to copy test
sjanssen2 Sep 2, 2025
92470fa
add new script
sjanssen2 Sep 2, 2025
93a15c3
add missing file
sjanssen2 Sep 2, 2025
5a97f8e
outsource commands to extra script
sjanssen2 Sep 2, 2025
abb9d36
only service name
sjanssen2 Sep 2, 2025
ae047a7
copy test script
sjanssen2 Sep 2, 2025
c704f3f
pass plugin variable
sjanssen2 Sep 2, 2025
26eeda8
compose up with qiita-worker only as this seems to be the "axiom"
sjanssen2 Sep 3, 2025
7735a3b
install wget to enable docker compose health checks
sjanssen2 Sep 3, 2025
d97a088
add health checks
sjanssen2 Sep 3, 2025
e382721
redefine axiom
sjanssen2 Sep 3, 2025
f3120b4
used blocking tornado calls :-/
sjanssen2 Sep 3, 2025
4b7fc1c
wait 1min for qiita to get initialized prior to tests
sjanssen2 Sep 3, 2025
1324b39
share /tmp between plugin and main
sjanssen2 Sep 4, 2025
fb3da4c
improved dependencies
sjanssen2 Sep 4, 2025
3f61b06
as I am using a set of commands I need "shell" not "exec"
sjanssen2 Sep 5, 2025
7ee6227
also set certificates correctly
sjanssen2 Sep 5, 2025
7abee11
only communicate with Master
sjanssen2 Sep 8, 2025
2fa4d98
adding the missing quast dependency
sjanssen2 Sep 8, 2025
c26d84e
remove health checks
sjanssen2 Sep 8, 2025
27f4bcf
link quast
sjanssen2 Sep 8, 2025
981d721
a bit of debug information
sjanssen2 Sep 8, 2025
20acbf8
remove vim leftover
sjanssen2 Sep 8, 2025
7c17552
debug
sjanssen2 Sep 8, 2025
14896e6
let make create real certificates
sjanssen2 Sep 8, 2025
bbbb55f
no extra newline
sjanssen2 Sep 8, 2025
ce805c2
make before container build to have certificate files ready
sjanssen2 Sep 8, 2025
ad6e77b
rename cert dir for docker build
sjanssen2 Sep 8, 2025
01af883
need two copies
sjanssen2 Sep 8, 2025
83e5abc
working version
sjanssen2 Sep 8, 2025
e0b2653
move files for all plugins into Images/
sjanssen2 Sep 8, 2025
fb6e772
fix file path
sjanssen2 Sep 8, 2025
6fff701
use new file name
sjanssen2 Sep 8, 2025
879c468
test all other plugins (that are small by now)
sjanssen2 Sep 8, 2025
d3eda66
also skip this step for non plugins
sjanssen2 Sep 8, 2025
7e69c6e
bring back other plugin services
sjanssen2 Sep 8, 2025
4d19472
add shared tmp volume for local testing
sjanssen2 Sep 8, 2025
a2aebe9
info about docker images
sjanssen2 Sep 8, 2025
5f709e4
for plugins: use locally created images, not dockerhub
sjanssen2 Sep 8, 2025
97eeed8
switch to harbor
sjanssen2 Sep 8, 2025
3b68470
fix variable name
sjanssen2 Sep 8, 2025
3230d07
build non tested projects
sjanssen2 Sep 8, 2025
eaa6e5f
now the plugins
sjanssen2 Sep 8, 2025
3ba51a4
remove debug lines, as they might lead to exit != 0
sjanssen2 Sep 8, 2025
4d780d6
lean dependencies for qtp-diversity
sjanssen2 Sep 9, 2025
80488d9
forgot to add qtp-diversity to build matrix
sjanssen2 Sep 9, 2025
6b3a687
generalize quotes to match multiple cases
sjanssen2 Sep 9, 2025
7b09673
add test script
sjanssen2 Sep 9, 2025
cc085f1
"patch" qtp-biom tests
sjanssen2 Sep 9, 2025
238aa2f
ensure db re-populate does not destroy conda startup scripts
sjanssen2 Sep 9, 2025
bc9661c
escape " and '
sjanssen2 Sep 9, 2025
48f0b48
move requirements into file
sjanssen2 Sep 9, 2025
a497b09
a little easier
sjanssen2 Sep 9, 2025
721f745
trigger all but old q1.9
sjanssen2 Sep 9, 2025
cd1382f
extra work due to py2 py3 differences
sjanssen2 Sep 11, 2025
28957ac
make qp-target-gene work
sjanssen2 Sep 11, 2025
890b135
also build qp-target-gene
sjanssen2 Sep 11, 2025
20162ac
shrink qtp-job-output-folder
sjanssen2 Sep 11, 2025
4b0cc58
add qtp-job-output-folder
sjanssen2 Sep 11, 2025
f2fac48
added missing file
sjanssen2 Sep 11, 2025
fcd3dd6
add plugin name as env
sjanssen2 Sep 11, 2025
0517653
bring conda back in trigger.py
sjanssen2 Sep 11, 2025
f275fcd
adapt for qiime2 tests, which is still based on conda
sjanssen2 Sep 11, 2025
9cd09b8
ready for testing
sjanssen2 Sep 11, 2025
2ad5620
Merge pull request #23 from jlab/smaller_deblur
sjanssen2 Sep 11, 2025
2d216f7
test 1
sjanssen2 Sep 11, 2025
6d94ac7
two phases
sjanssen2 Sep 11, 2025
6a6d814
up/download certificates between jobs
sjanssen2 Sep 11, 2025
161c306
login to ghcr
sjanssen2 Sep 11, 2025
d87b55e
adding phase3: publish images
sjanssen2 Sep 11, 2025
504220c
transfer single dir
sjanssen2 Sep 11, 2025
8b3992c
only store artefact in one of matrix jobs
sjanssen2 Sep 11, 2025
57d73ea
just certificates
sjanssen2 Sep 11, 2025
dec95fa
now add build main image phase
sjanssen2 Sep 11, 2025
85e394b
add plugin build
sjanssen2 Sep 11, 2025
d707006
copy missing files
sjanssen2 Sep 11, 2025
9678446
add env configuration files
sjanssen2 Sep 11, 2025
33bb566
pull from ghcr
sjanssen2 Sep 11, 2025
d672d22
push to ghcr
sjanssen2 Sep 11, 2025
8233831
fix yaml
sjanssen2 Sep 11, 2025
0bdeb4d
adding jlab/
sjanssen2 Sep 11, 2025
2921b2f
push to ghcr
sjanssen2 Sep 11, 2025
d1a1b03
fix tag syntax
sjanssen2 Sep 11, 2025
d346019
create real SEPP references for qp-deblur & push to habor
sjanssen2 Sep 11, 2025
9ad6f15
make it a variable
sjanssen2 Sep 12, 2025
702e85f
checkout repo to obtain version number from docker file
sjanssen2 Sep 12, 2025
84a43c1
add action for qp-qiime2
sjanssen2 Sep 12, 2025
6a7f4c3
also create local "latest" tag before pushing
sjanssen2 Sep 12, 2025
4ce7411
Merge pull request #30 from jlab/restructure_github_actions
sjanssen2 Sep 12, 2025
1b96c23
Merge branch 'tinqiita' of github.com:jlab/qiita-keycloak into add_mu…
sjanssen2 Sep 12, 2025
12027b5
adding misisng file
sjanssen2 Sep 12, 2025
26ee536
some some gigs of image size by cleaning up conda
sjanssen2 Sep 12, 2025
bac91fa
activate conda env for qp-qiime2
sjanssen2 Sep 12, 2025
670cd87
Update buildContainer.yaml
sjanssen2 Sep 12, 2025
626afc1
Merge pull request #32 from jlab/add_multi_plugin
sjanssen2 Sep 12, 2025
d2f7467
Add tzdata package and configure timezone to run analyses
Anna-Rehm Sep 18, 2025
a3fe620
Merge pull request #42 from jlab/qp-qiime2-timezone-fix
sjanssen2 Sep 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
297 changes: 297 additions & 0 deletions .github/workflows/buildContainer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,297 @@
# todo: "make" files once and push around through artifacts!

name: docker

on:
pull_request:
branches:
- tinqiita
push:
branches:
- tinqiita

jobs:
make_certificates:
runs-on: ubuntu-latest
steps:
- name: Checkout tinqiita repo
uses: actions/checkout@v4

- name: Create certificate
# second copy of "qiita_server_certificates" is necessary to match path for docker build, first copy for mounting into container
run: |
make ./references/qiita_server_certificates ./environments/qiita_db.env ./environments/qiita.env config
cp -r ./references/qiita_server_certificates ./qiita_server_certificates

- name: Store certifactes for follow up jobs
uses: actions/upload-artifact@v4
with:
name: certificates
path: |
./qiita_server_certificates
./references/qiita_server_certificates

build_main:
needs: make_certificates
strategy:
matrix:
container: ["nginx", "qiita", "plugin_collector"]
runs-on: ubuntu-latest
steps:
- name: Checkout tinqiita repo
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Read image version from dockerfile
id: vars
run: |
VERSION=$(head -n 1 Images/${{ matrix.container }}/${{ matrix.container }}.dockerfile | cut -d ":" -f 2- | tr -d " ")
echo "IMAGE_TAG=$VERSION" >> $GITHUB_ENV
cp Images/${{ matrix.container }}/start_${{ matrix.container }}.sh Images/test_plugin.sh Images/nginx/nginx_qiita.conf Images/${{ matrix.container }}/requirements.txt .
cp Images/qiita/config_portal.cfg Images/qiita/config_qiita_oidc.cfg Images/qiita/drop_workflows.py Images/qiita/start_plugin.py Images/qiita/start_qiita-initDB.sh Images/qiita/start_qiita.sh .
cp Images/plugin_collector/collect_configs.py Images/plugin_collector/fix_test_db.py Images/plugin_collector/stefan_cert.conf Images/plugin_collector/stefan_csr.conf .

- name: Download certificates from job build_main
uses: actions/download-artifact@v4
with:
name: certificates
path: ./

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build main qiita images and push to github's own registry
uses: docker/build-push-action@v6
with:
context: .
push: true
file: Images/${{ matrix.container }}/${{ matrix.container }}.dockerfile
tags: ghcr.io/${{ github.repository }}/${{ matrix.container }}:testcandidate
cache-from: type=gha,scope=tinqiita-${{ github.ref_name }}
cache-to: type=gha,scope=tinqiita-${{ github.ref_name }},mode=max

make_references:
needs: build_main
runs-on: ubuntu-latest
steps:
- name: Checkout tinqiita repo
uses: actions/checkout@v4

- name: Create partially fake reference databases
run: |
mkdir -p ./references/qp-deblur/ ./references/qp-target-gene
make ./environments/qiita_db.env ./environments/qiita.env config ./references/qp-deblur/reference-gg-raxml-bl.tre
for f in `echo "references/qp-target-gene/97_otus.fasta references/qp-target-gene/97_otus.tree references/qp-target-gene/97_otu_taxonomy.txt"`; do echo "fake" > $f; done

- name: Store fake references for follow up jobs
uses: actions/upload-artifact@v4
with:
name: fake_references
path: |
./references/qp-deblur
./references/qp-target-gene
./environments

build_plugins:
needs:
- build_main
- make_references
strategy:
matrix:
plugin: ["qp-deblur", "qtp-biom", "qtp-sequencing", "qtp-visualization", "qtp-diversity", "qp-target-gene", "qtp-job-output-folder"]
runs-on: ubuntu-latest
steps:
- name: Checkout tinqiita repo
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Read image version from dockerfile
id: vars
run: |
VERSION=$(head -n 1 Images/${{ matrix.plugin }}/${{ matrix.plugin }}.dockerfile | cut -d ":" -f 2- | tr -d " ")
echo "IMAGE_TAG=$VERSION" >> $GITHUB_ENV
cp Images/${{ matrix.plugin }}/start_${{ matrix.plugin }}.sh Images/test_plugin.sh Images/${{ matrix.plugin }}/requirements.txt Images/trigger_noconda.py Images/trigger.py .

- name: Download certificates from job build_main
uses: actions/download-artifact@v4
with:
name: certificates
path: ./
- name: Download fake references
uses: actions/download-artifact@v4
with:
name: fake_references
path: ./

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build plugin images
uses: docker/build-push-action@v6
with:
context: .
load: true
file: Images/${{ matrix.plugin }}/${{ matrix.plugin }}.dockerfile
tags: ghcr.io/${{ github.repository }}/${{ matrix.plugin }}:testcandidate
cache-from: type=gha,scope=tinqiita-${{ github.ref_name }}
cache-to: type=gha,scope=tinqiita-${{ github.ref_name }},mode=max

- name: adapt compose file to select specific plugin
run: |
sed -i "s/MATRIXPLUGIN/${{ matrix.plugin }}/g" compose_github.yaml

- name: Run docker compose
uses: hoverkraft-tech/[email protected]
with:
compose-file: "compose_github.yaml"
services: |
nginx

- name: Execute tests in the running services
run: |
sleep 5
docker compose exec ${{ matrix.plugin }} /bin/bash -c "bash /test_plugin.sh"

- name: Push image to ghcr (only if tests passed)
if: success()
uses: docker/build-push-action@v6
with:
context: .
push: true
file: Images/${{ matrix.plugin }}/${{ matrix.plugin }}.dockerfile
tags: ghcr.io/${{ github.repository }}/${{ matrix.plugin }}:testcandidate

# the qp-qiime2 plugin cannot be tested in isolation, it also needs qtp-diversity and qtp-visualization to be active in qiita
build_mulit_plugins:
needs:
- build_plugins
strategy:
matrix:
multiplugin: ["qp-qiime2"]
runs-on: ubuntu-latest
steps:
- name: Checkout tinqiita repo
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Read image version from dockerfile
id: vars
run: |
VERSION=$(head -n 1 Images/${{ matrix.multiplugin }}/${{ matrix.multiplugin }}.dockerfile | cut -d ":" -f 2- | tr -d " ")
echo "IMAGE_TAG=$VERSION" >> $GITHUB_ENV
cp Images/${{ matrix.multiplugin }}/start_${{ matrix.multiplugin }}.sh Images/test_plugin.sh Images/${{ matrix.multiplugin }}/requirements.txt Images/trigger_noconda.py Images/trigger.py .

- name: Download certificates from job build_main
uses: actions/download-artifact@v4
with:
name: certificates
path: ./
- name: Download fake references
uses: actions/download-artifact@v4
with:
name: fake_references
path: ./

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build plugin images
uses: docker/build-push-action@v6
with:
context: .
load: true
file: Images/${{ matrix.multiplugin }}/${{ matrix.multiplugin }}.dockerfile
tags: ghcr.io/${{ github.repository }}/${{ matrix.multiplugin }}:testcandidate
cache-from: type=gha,scope=tinqiita-${{ github.ref_name }}
cache-to: type=gha,scope=tinqiita-${{ github.ref_name }},mode=max

- name: adapt compose file to select specific plugin
run: |
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;

- name: Run docker compose
uses: hoverkraft-tech/[email protected]
with:
compose-file: "compose_github.yaml"
services: |
nginx

- name: Execute tests in the running services
run: |
sleep 5
docker compose exec ${{ matrix.multiplugin }} /bin/bash -c "bash /test_plugin.sh"

- name: Push image to ghcr (only if tests passed)
if: success()
uses: docker/build-push-action@v6
with:
context: .
push: true
file: Images/${{ matrix.multiplugin }}/${{ matrix.multiplugin }}.dockerfile
tags: ghcr.io/${{ github.repository }}/${{ matrix.multiplugin }}:testcandidate

publish_images:
needs:
- build_plugins
- build_main
- build_mulit_plugins
strategy:
matrix:
image: ["qp-deblur", "qtp-biom", "qtp-sequencing", "qtp-visualization", "qtp-diversity", "qp-target-gene", "qtp-job-output-folder",
"nginx", "qiita", "plugin_collector",
"qp-qiime2"]
runs-on: ubuntu-latest
steps:
- name: Checkout tinqiita repo
uses: actions/checkout@v4

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to computational.bio registry
uses: docker/login-action@v3
with:
registry: harbor.computational.bio.uni-giessen.de
username: ${{ vars.HARBOR_CB_USERNAME }}
password: ${{ secrets.HARBOR_CB_SECRET }}

- name: Pull image from GHCR
run: docker pull ghcr.io/${{ github.repository }}/${{ matrix.image }}:testcandidate

- name: Read image version from dockerfile
id: vars
run: |
VERSION=$(head -n 1 Images/${{ matrix.image }}/${{ matrix.image }}.dockerfile | cut -d ":" -f 2- | tr -d " ")
echo "IMAGE_TAG=$VERSION" >> $GITHUB_ENV

- name: Retag image for Docker Hub
run: |
docker tag ghcr.io/${{ github.repository }}/${{ matrix.image }}:testcandidate harbor.computational.bio.uni-giessen.de/tinqiita/${{ matrix.image }}:${{ env.IMAGE_TAG }}
docker tag ghcr.io/${{ github.repository }}/${{ matrix.image }}:testcandidate harbor.computational.bio.uni-giessen.de/tinqiita/${{ matrix.image }}:latest

- name: Push image to Docker Hub
run: |
docker push harbor.computational.bio.uni-giessen.de/tinqiita/${{ matrix.image }}:${{ env.IMAGE_TAG }}
docker push harbor.computational.bio.uni-giessen.de/tinqiita/${{ matrix.image }}:latest
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
environments/db.env
environments/keycloak.env
environments/*.env
logs/*
.built_image_*
Certificates/*
references/*
Loading