-
Notifications
You must be signed in to change notification settings - Fork 7
/
Jenkinsfile
35 lines (35 loc) · 1.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
pipeline {
agent none
stages {
stage('Checkout repo') {
agent any
steps {
sh 'wget -O DOIRootCA2.cer http://sslhelp.doi.net/docs/DOIRootCA2.cer'
git "https://github.com/wdwatkins/gage-conditions"
}
}
stage('build viz') {
agent {
dockerfile {
args '-v ${WORKSPACE}:/home/rstudio/gage-conditions'
}
}
steps {
sh 'mkdir -p target'
sh '''
Rscript -e 'vizlab::vizmake("dv_sites_sp")'
Rscript -e "remake::make(remake_file = 'map_preprocess.yml')"
Rscript -e "vizlab::vizmake()"
'''
}
}
stage('push to S3') {
agent any
steps {
sh 'aws s3 sync ./target/ s3://dev-owi.usgs.gov/vizlab/water-use-15/ --exclude "*.svg" --exclude "*.json"; \
aws s3 sync ./target/ s3://dev-owi.usgs.gov/vizlab/water-use-15/ --exclude "*" --include "*.svg" --content-type "image/svg+xml"; \
aws s3 sync ./target/ s3://dev-owi.usgs.gov/vizlab/water-use-15/ --exclude "*" --include "*.json" --content-type "application/json"'
}
}
}
}