-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathJenkinsfile
More file actions
executable file
·47 lines (45 loc) · 1.15 KB
/
Jenkinsfile
File metadata and controls
executable file
·47 lines (45 loc) · 1.15 KB
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
#!groovy
pipeline {
agent {
label 'docker-runner'
}
stages{
stage('Run docker container') {
environment {
AWS_ACCESS_KEY_ID = credentials('AWS_ACCESS_KEY_ID')
AWS_SECRET_ACCESS_KEY = credentials('AWS_SECRET_ACCESS_KEY')
}
steps {
echo "Running irx-r-base container"
sh """
\$(aws ecr get-login --no-include-email --region us-west-2 &> /dev/null)
docker run -d --name ${BUILD_TAG} 579831337053.dkr.ecr.us-west-2.amazonaws.com/irx-r-base:4
"""
}
}
stage('Build & test json2test') {
steps {
echo 'Installing and checking irxtools'
sh """
docker cp . ${BUILD_TAG}:/src/json2test
docker exec -i ${BUILD_TAG} Rscript -e "devtools::check('json2test')"
"""
}
}
}
post {
always {
sh """
docker rm -f ${BUILD_TAG} &>/dev/null && echo 'Removed container'
"""
}
failure {
sh "chmod +x slack_notification.sh"
sh "./slack_notification.sh"
}
}
environment {
KHALEESI_SLACK_TOKEN = credentials('KHALEESI_SLACK_TOKEN')
JENKINS_SLACKBOT = credentials('JENKINS_SLACKBOT')
}
}