-
Notifications
You must be signed in to change notification settings - Fork 3
/
Jenkinsfile
64 lines (60 loc) · 2.31 KB
/
Jenkinsfile
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
59
60
61
62
63
64
pipeline {
agent { label 'monarch-agent-medium' }
environment {
HOME = "${env.WORKSPACE}"
RELEASE = sh(script: "echo `date +%Y-%m-%d`", returnStdout: true).trim()
PATH = "/opt/poetry/bin:${env.PATH}"
}
stages {
stage('setup') {
steps {
sh 'poetry install'
}
}
stage('download') {
steps {
sh '''
poetry run gene-mapping download
ls -lasd
ls -la data
# Copy the data to the GCP bucket
gsutil -q -m cp -r data/* gs://monarch-archive/mapping-data-cache/${RELEASE}/
'''
}
}
stage('generate-mapping-files') {
steps {
sh '''
poetry run make GH_ACTION=false mappings
'''
}
}
stage('upload-mapping-files'){
steps{
sh '''
gsutil -q -m cp mappings/*.sssom.tsv gs://monarch-archive/mappings/${RELEASE}/
gsutil -q -m cp mappings/*.sssom.tsv gs://data-public-monarchinitiative/mappings/${RELEASE}/
gsutil -q rm -f gs://data-public-monarchinitiative/mappings/latest/* || true
gsutil -q -m cp gs://data-public-monarchinitiative/mappings/${RELEASE}/* gs://data-public-monarchinitiative/mappings/latest/
'''
}
}
stage('index') {
steps {
sh '''
echo "Current directory: $(pwd)"
python3 --version
pip --version
export PATH=$HOME/.local/bin:$PATH
echo "Path: $PATH"
cd $HOME
mkdir data-public
gcsfuse --implicit-dirs data-public-monarchinitiative data-public
git clone https://github.com/monarch-initiative/monarch-file-server.git
pip install -r monarch-file-server/scripts/requirements.txt
python3 monarch-file-server/scripts/directory_indexer.py --inject monarch-file-server/scripts/directory-index-template.html --directory data-public --prefix https://data.monarchinitiative.org -x
'''
}
}
}
}