2024-02-15 12:24:00 -05:00
|
|
|
pipeline {
|
|
|
|
agent {
|
|
|
|
docker {
|
|
|
|
image 'jvconseil/jekyll-docker'
|
|
|
|
args '''
|
|
|
|
-u root:root
|
|
|
|
-v "${PWD}:/srv"
|
|
|
|
-e JEKYLL_UID=1001 -e JEKYLL_GID=1001
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
environment {
|
|
|
|
KEY_FILE = credentials('ubuntu-box.myemail.cloud')
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('Prep') {
|
|
|
|
steps {
|
2024-03-11 16:25:26 -04:00
|
|
|
sh 'apk add curl'
|
2024-02-15 12:24:00 -05:00
|
|
|
sh 'chmod -R 777 .'
|
|
|
|
sh 'gem install bundler'
|
2024-05-29 17:25:47 -04:00
|
|
|
sh 'curl -d "scottjohnson.pro Prep stage done." https://ntfy.draft13.com/jenkins'
|
2024-02-15 12:24:00 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Build') {
|
|
|
|
steps {
|
|
|
|
sh 'bundle install'
|
|
|
|
sh 'bundle exec jekyll build'
|
2024-05-29 17:25:47 -04:00
|
|
|
sh 'curl -d "scottjohnson.pro Build stage done." https://ntfy.draft13.com/jenkins'
|
2024-02-15 12:24:00 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Deploy') {
|
|
|
|
steps {
|
2024-02-15 12:46:25 -05:00
|
|
|
sh 'scp -r -o StrictHostKeychecking=no -i $KEY_FILE _site/ ubuntu@box.myemail.cloud:/home/ubuntu'
|
2024-02-15 12:24:00 -05:00
|
|
|
sh 'ssh ubuntu@box.myemail.cloud -i $KEY_FILE \'bash -s\' < deploy.sh'
|
2024-05-29 17:25:47 -04:00
|
|
|
sh 'curl -d "scottjohnson.pro Deploy stage done." https://ntfy.draft13.com/jenkins'
|
2024-02-15 12:24:00 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|