-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
74 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
pipeline { | ||
agent any | ||
triggers { | ||
// Every two days at 11 pm | ||
cron('0 23 */2 * *') | ||
} | ||
options{ | ||
timestamps() | ||
} | ||
stages { | ||
// Very first: pause for a minute to give a chance to | ||
// cancel and clean the workspace before use. | ||
stage('Ready and clean') { | ||
steps { | ||
// Give us a minute to cancel if we want. | ||
// sleep time: 1, unit: 'MINUTES' | ||
cleanWs() | ||
} | ||
} | ||
stage('Initialize') { | ||
steps { | ||
// Start preparing environment. | ||
parallel( | ||
"Report": { | ||
sh 'env > env.txt' | ||
sh 'echo $BRANCH_NAME > branch.txt' | ||
sh 'echo "$BRANCH_NAME"' | ||
sh 'cat env.txt' | ||
sh 'cat branch.txt' | ||
sh 'echo $START_DAY > dow.txt' | ||
sh 'echo "$START_DAY"' | ||
}) | ||
} | ||
} | ||
|
||
stage('Build kg_covid_19') { | ||
steps { | ||
dir('./config') { | ||
git( | ||
url: 'https://github.com/Knowledge-Graph-Hub/kg-covid-19', | ||
branch: 'master' | ||
) | ||
sh '/usr/bin/python3.7 -m venv venv' | ||
sh '. venv/bin/activate' | ||
sh './venv/bin/pip install bmt' | ||
sh './venv/bin/pip install -r requirements.txt' | ||
sh './venv/bin/python setup.py install' | ||
} | ||
} | ||
} | ||
stage('Download') { | ||
steps { | ||
sh 'cd config;. venv/bin/activate; python3.7 run.py download' | ||
} | ||
} | ||
stage('Transform') { | ||
steps { | ||
sh 'cd config;. venv/bin/activate; python3.7 run.py transform' | ||
} | ||
} | ||
stage('Load') { | ||
steps { | ||
sh 'cd config;. venv/bin/activate; python3.7 run.py load' | ||
} | ||
} | ||
stage('Push to s3 bucket') { | ||
steps { | ||
echo "???? # Need some details for this item" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
git+git://github.com/LucaCappelletti94/kgx.git | ||
git+git://github.com/NCATS-Tangerine/kgx.git |