forked from Pelagicore/pelux.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
51 lines (44 loc) · 1.28 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 {
agent {
dockerfile {
/* There are resolution issues on the Jenkins server for pelux.io */
/* This domain is temporarily changed to pelux.xyz until the pelux.io is
changed to point to the "New Jenkins" server */
args "--add-host=pelux.xyz:${env.JENKINS_IP}"
}
}
stages {
stage('Download') {
steps {
// Delete old files
sh 'rm -rf .[^.] .??* *'
// Checkout the git repository and refspec pointed to by jenkins
checkout scm
}
}
// Configure the software
stage('Configure') {
steps {
script {
sh "bundle install --path vendor/bundle"
}
}
}
stage("Build") {
steps {
sh "bundle exec jekyll build"
}
}
stage("Test") {
steps {
sh "bundle exec htmlproofer --disable-external ./_site"
}
}
stage('Archive') {
steps {
// Store the artifacts of the entire build
archiveArtifacts artifacts: '_site/**/*', fingerprint: true
}
}
}
}