forked from monarch-initiative/monarch-ingest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile-download
49 lines (49 loc) · 1.39 KB
/
Jenkinsfile-download
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
pipeline {
agent none
triggers {
cron('H H * * 7') //sometime on Sundays
}
environment {
HOME = "${env.WORKSPACE}"
}
stages {
stage('setup') {
agent { dockerfile true }
steps {
// This step could (and maybe should) do a poetry install like the ingest Jenkinsfile
// and then run downloader from within a poetry run command
sh '''
python3 -mvenv venv
. venv/bin/activate
pip install click==8.0.4
pip install kghub-downloader
'''
}
}
stage('download') {
agent { dockerfile true }
steps {
sh '''
. venv/bin/activate
downloader
'''
}
}
stage('post-process') {
agent { dockerfile true }
steps {
sh '''
zcat data/alliance/BGI_*.gz | jq '.data[].basicGeneticEntity.primaryId' | gzip > data/alliance/alliance_gene_ids.txt.gz
'''
}
}
stage('upload') {
agent { label 'worker' }
steps {
sh '''
gsutil -m cp -r data gs://monarch-ingest/data-cache
'''
}
}
}
}