-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
58 lines (50 loc) · 1.86 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
image: continuumio/miniconda3:latest
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
key: one-key-to-rule-them-all
paths:
- .conda/
- .cache/pip/
stages:
- test_infrastructure
- test_code
- for_production
before_script:
- export PIP_CACHE_DIR="/opt/cache/pip"
- conda install -c conda-forge mamba
- mamba create -c conda-forge -c bioconda -n snakemake snakemake=5.30 git-annex #conda env create -f workflow/envs/snakemake-base.yml
- source activate snakemake
# Test if snakmake is installed
test_snakemake:
stage: test_infrastructure
tags:
- test
script:
- echo $ftp_proxy
- snakemake --version
# Start the snakemake pipeline as a dry-run (-n)
test_pipeline:
stage: test_code
tags:
- test
script:
- snakemake --use-conda -n -p --configfile=config/config.json --config genome_config=resources/examples/saccharomyces_cerevisiae.json ensembl_release=98
# Run the snakemake pipeline on the "review" runner, which creates genome files at a temporary location but not in the final
# directory with version control
review_pipeline:
stage: test_code
tags:
- review
script:
- snakemake --use-conda -p $CI_SNAKEMAKE_ARGS --configfile=config/config.json --config genome_config=resources/current.json ensembl_release=98
# Run the snakemake pipeline on the "production" runner, which creates genome files at the final location and commit it
# to version control w/ git annex
run_pipeline:
stage: for_production
tags:
- production
script:
- snakemake --use-conda -p $CI_SNAKEMAKE_ARGS --configfile=config/config.json --config genome_config=resources/current.json ensembl_release=98
- cd /data/reference-data/public-data/ && git annex add /data/reference-data/public-data/
- cd /data/reference-data/public-data/ && git commit -a -m "add genome" && echo "commit successful" || echo "commit unsucessful"