Skip to content

Instantly share code, notes, and snippets.

@alexwoollam
Last active September 5, 2018 15:04
Show Gist options
  • Save alexwoollam/f850ad71a5bb33f207bad98161f2be1d to your computer and use it in GitHub Desktop.
Save alexwoollam/f850ad71a5bb33f207bad98161f2be1d to your computer and use it in GitHub Desktop.
Jenkinsfile for wordpress wip
#!/bin/sh
pipeline {
agent any
stages {
stage('Checkout Repo') {
steps {
checkout scm
}
}
stage('Build') {
steps {
sh 'chmod --recursive a+rwx ./bin/install-wp-tests.sh'
sh './bin/install-wp-tests.sh wordpress wordpress wordpress 127.0.0.1 4.9.8 false'
}
}
stage('Test') {
steps {
sh 'chmod --recursive a+rwx ./bin/do-tests.sh'
sh './bin/do-tests.sh'
}
}
}
post {
success {
echo 'For the win!'
}
failure {
echo 'Epic Fail!'
}
always{
sh 'mysql -uwordpress -pwordpress -e "DROP DATABASE IF EXISTS wordpress"'
deleteDir()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment