forked from folio-org/raml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
47 lines (36 loc) · 977 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
40
41
42
43
44
45
pipeline {
options {
buildDiscarder(logRotator(numToKeepStr: '30', artifactNumToKeepStr: '30'))
}
agent {
node {
label 'jenkins-slave-all'
}
}
stages {
stage('Prep') {
steps {
script {
currentBuild.displayName = "#${env.BUILD_NUMBER}-${env.JOB_BASE_NAME}"
}
sendNotifications 'STARTED'
}
}
stage('Publish API Docs') {
steps {
sh 'python3 /usr/local/bin/generate_api_docs.py -r raml -l info -o folio-api-docs'
withCredentials([[$class: 'AmazonWebServicesCredentialsBinding',
accessKeyVariable: 'AWS_ACCESS_KEY_ID',
credentialsId: 'jenkins-aws',
secretKeyVariable: 'AWS_SECRET_ACCESS_KEY']]) {
sh 'aws s3 sync folio-api-docs s3://foliodocs/api'
}
}
}
} // end stages
post {
always {
sendNotifications currentBuild.result
}
}
}