morgan.mcmillian.dev/Jenkinsfile
Morgan McMillian 6e9c19014d
All checks were successful
dreamfall/morgan.mcmillian.dev/pipeline/head This commit looks good
move deployment to new server
2023-03-05 10:22:32 -08:00

38 lines
1.5 KiB
Groovy

pipeline {
agent { label 'fedora' }
stages {
stage('Build site') {
steps {
// mattermostSend "Site build started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
sh 'git submodule update --init'
sh 'hugo'
}
// post {
// success {
// mattermostSend color: "good", message: "Site build success - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
// }
// failure {
// mattermostSend color: "danger", message: "Site build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
// }
// }
}
stage('Deploy site') {
steps {
// mattermostSend "Site deploy started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
ansiblePlaybook(
playbook: 'main.yaml',
inventory: 'hosts.ini',
credentialsId: 'igor'
)
}
// post {
// success {
// mattermostSend color: "good", message: "Site deploy success - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
// }
// failure {
// mattermostSend color: "danger", message: "Site deploy failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
// }
// }
}
}
}