Skip to content

Instantly share code, notes, and snippets.

@alexwoollam
Created April 17, 2020 09:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexwoollam/2daacb129fd42c7d0855972def258d7a to your computer and use it in GitHub Desktop.
Save alexwoollam/2daacb129fd42c7d0855972def258d7a to your computer and use it in GitHub Desktop.
#!/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