title |
---|
Jenkins Plugin |
The mktmpio plugin for Jenkins integrates the mktmpio server with Jenkins so that any build can include a dedicated database server that is created at the start of the build and then automatically shutdown at the end. Because the provisioning takes less than 1 second, there is virtually no impact on build times.
- GitHub
- jenkinsci/mktmpio-plugin
- Jenkins Plugin Page
- mktmpio Plugin
- Install the mktmpio plugin for Jenkins using the Jenkins control panel
- Create a mktmpio account by signing in with GitHub at https://mktmp.io/
- Get your API key/token from https://mktmp.io/me
- Enter your token into the mktmpio section of the Jenkins global config page
- Enable mktmpio on a new or existing job
- Select the type of database server to create
- Modify your tests, scripts, or job actions to make use of the database credentials added to the build environment.
The mktmpio Jenkins plugin is also Workflow ready. Here's an example:
node {
wrap([$class: 'Mktmpio', dbs: 'redis']) {
sh 'cat seed.data | redis-cli -h $REDIS_HOST -p $REDIS_PORT -a $REDIS_PASSWORD'
sh 'make test'
}
}