forked from InsightRX/PKPDposterior
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
executable file
·39 lines (37 loc) · 902 Bytes
/
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
#!groovy
pipeline {
agent {
label 'docker-runner'
}
stages{
stage('Build docker image') {
environment {
AWS_ACCESS_KEY_ID = credentials('AWS_ACCESS_KEY_ID')
AWS_SECRET_ACCESS_KEY = credentials('AWS_SECRET_ACCESS_KEY')
}
steps {
echo "Building Docker image"
sh """
\$(aws ecr get-login --no-include-email --region us-west-2 &> /dev/null)
docker build -t pkpdposterior .
"""
}
}
stage('Test PKPDposterior') {
steps {
echo 'Installing and checking PKPDposterior'
sh """
docker run -d -t --name ${BUILD_TAG} pkpdposterior:latest
docker exec -i ${BUILD_TAG} Rscript -e "devtools::check(vignettes = FALSE)"
"""
}
}
}
post {
always {
sh """
docker rm -f ${BUILD_TAG} &>/dev/null && echo 'Removed container'
"""
}
}
}