Skip to content
Snippets Groups Projects
.gitlab-ci.yml 2.31 KiB
Newer Older
Alexis Mergez's avatar
Alexis Mergez committed
# Steps:
# - Getting apps
# - Running the dag
# - Publishing the release with the dag inside

Alexis Mergez's avatar
Alexis Mergez committed
shallow_run_workflow:
  stage: test
Alexis Mergez's avatar
Alexis Mergez committed
  tags: 
    - stable
Alexis Mergez's avatar
Alexis Mergez committed
  image: 
Alexis Mergez's avatar
Alexis Mergez committed
    name: kaczmarj/apptainer:latest
    entrypoint: [""]
  script:
Alexis Mergez's avatar
Alexis Mergez committed
    ## Downloading apps
Alexis Mergez's avatar
Alexis Mergez committed
    - mkdir appimgs
Alexis Mergez's avatar
Alexis Mergez committed
    #- apptainer build apps/pggb.sif oras://registry.forgemia.inra.fr/alexis.mergez/pangratools/pggb:latest
Alexis Mergez's avatar
Alexis Mergez committed
    - apptainer pull appimgs/snakebox.sif oras://registry.forgemia.inra.fr/alexis.mergez/pan1capps/pan1cbox:latest
Alexis Mergez's avatar
Alexis Mergez committed
    #- apptainer build apps/pytools.sif oras://registry.forgemia.inra.fr/alexis.mergez/pangetools/pytools:latest
    #- apptainer build apps/PanGeTools.sif oras://registry.forgemia.inra.fr/alexis.mergez/pangetools/pangetools:latest
Alexis Mergez's avatar
Alexis Mergez committed
    ## Running workflow
Alexis Mergez's avatar
Alexis Mergez committed
    - mkdir -p data/haplotypes
Alexis Mergez's avatar
Alexis Mergez committed
    - cp example/*.fa.gz data/haplotypes
Alexis Mergez's avatar
Alexis Mergez committed
    - HOME=$(pwd)
Alexis Mergez's avatar
Alexis Mergez committed
    - rm config.yaml && mv example/config_CICD.yaml config.yaml
    - apptainer run --bind $HOME:/root appimgs/snakebox.sif snakemake -c1 --dag > workflow.dot
Alexis Mergez's avatar
Alexis Mergez committed
  artifacts:
Alexis Mergez's avatar
Alexis Mergez committed
    paths:
Alexis Mergez's avatar
Alexis Mergez committed
      - workflow.dot
Alexis Mergez's avatar
Alexis Mergez committed
create_graph:
  stage: deploy
  image: ubuntu:latest
Alexis Mergez's avatar
Alexis Mergez committed
  tags: 
    - stable
Alexis Mergez's avatar
Alexis Mergez committed
  script:
Alexis Mergez's avatar
Alexis Mergez committed
    - apt update -y && apt install graphviz -y
Alexis Mergez's avatar
Alexis Mergez committed
    - dot -Tsvg workflow.dot > workflow.svg
Alexis Mergez's avatar
Alexis Mergez committed
  artifacts:
    paths:
      - workflow.svg

# deep_run_workflow:
#   stage: test
#   image: 
#     name: kaczmarj/apptainer:latest
#     entrypoint: [""]
#   tags:
#     - custom
#   script:
#     ## Downloading apps
#     - mkdir appimgs
#     - apptainer build appimgs/PanGeTools.sif oras://registry.forgemia.inra.fr/alexis.mergez/pangetools/pangetools:latest  
#     - apptainer build appimgs/pan1c-env.sif oras://registry.forgemia.inra.fr/alexis.mergez/pan1capps/pan1cenv:latest  
#     - apptainer build appimgs/pggb.sif oras://registry.forgemia.inra.fr/alexis.mergez/pangratools/pggb:latest  
#     - apptainer build appimgs/pan1c-box.sif oras://registry.forgemia.inra.fr/alexis.mergez/pan1capps/pan1cbox:latest
#     ## Running workflow
#     - mkdir -p data/haplotypes
#     - cp example/*.fa.gz data/haplotypes
#     - HOME=$(pwd)
#     - rm config.yaml && mv example/config_CICD.yaml config.yaml
#     - apptainer run --bind $HOME:/root appimgs/pan1c-box.sif snakemake -c 4
#   artifacts:
#     paths:
#       - output/pan1c.pggb.03SC_CICD.gfa
#       - output/pan1c.pggb.03SC_CICD.workflow.stats.tsv
#   allow_failure: true