forked from RichardBradley/liquibase.github.com
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
51 lines (49 loc) · 1.62 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
pipeline {
options {
timestamps()
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '5', artifactDaysToKeepStr: '45'))
withAWS(credentials: 'JenkinsUserAtAWS')
}
agent {
node {
label 'dockerBuilder'
}
}
environment {
GITHUB_AUTH = credentials('github-auth')
ART_AUTH = credentials('artifactory-auth')
}
stages {
stage('staging-cd') {
when {
branch 'staging'
}
steps {
echo 'Building and Deploying Jekyll `_site/` to Staging.'
script {
sh 'export JEKYLL_VERSION=3.8 && \
docker run \
--volume="$PWD:/srv/jekyll" \
jekyll/jekyll:$JEKYLL_VERSION \
jekyll build'
s3Upload(file:'_site', bucket:'staging.liquibase.org', path:'')
}
slackSend channel: '#liquibase_pro_website',
color: 'good',
message: "Liquibase Staging Site Updated: http://staging.liquibase.org"
}
}
}
post {
success {
slackSend channel: '#jenkinsbuilds',
color: 'good',
message: "SUCCESSFUL: Job '${JOB_NAME} [${BUILD_NUMBER}]' (${env.BUILD_URL})"
}
unsuccessful {
slackSend channel: '#jenkinsbuilds',
color: 'bad',
message: "FAILED: Job '${JOB_NAME} [${BUILD_NUMBER}]' (${env.BUILD_URL})"
}
}
}