morgan.mcmillian.dev/Jenkinsfile
Morgan McMillian fbee2cfb8c
Some checks failed
dreamfall/morgan.mcmillian.dev/pipeline/head There was a failure building this commit
setup site deployment via jenkins
2023-02-09 17:36:29 -08:00

42 lines
1.6 KiB
Groovy

pipeline {
agent {
docker {
image 'git.dreamfall.space/thrrgilag/kiln:latest'
label 'docker-build'
}
}
stages {
stage('Build site') {
steps {
mattermostSend "Site build started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
sh 'kiln build'
}
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: 'onedrop-vetinari'
)
}
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>)"
}
}
}
}
}