Skip to content

Instantly share code, notes, and snippets.

@kasunbg
Created December 30, 2018 13:00
Show Gist options
  • Save kasunbg/d22132aee2111e63f00e2e1f33ff6db5 to your computer and use it in GitHub Desktop.
Save kasunbg/d22132aee2111e63f00e2e1f33ff6db5 to your computer and use it in GitHub Desktop.
Jenkinsfile with Docker
pipeline {
agent {
docker { image 'mysql:5.6.37' }
}
stages {
stage('Run tests') {
steps {
sh 'pwd'
sh """
mysql -uroot -proot --version
"""
echo "I'm executing in node: ${env.NODE_NAME}"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment