What you need to know
- Database services can be attached to all types of build actions.
- Each service runs as a separate container.
- The containers are run in the same network, so they are accessible from within each other.
- By default, Buddy pulls the latest version of the service, but you can change it to a specific release if required
The services can be activated in the Services tab of the build action. To use a database in your tests, you need to copy its hostname and login credentials (depending on the type).
MySQL action attached to build
- SQL: MariaDB, MySQL, PostgreSQL
- NoSQL: Cassandra, Memcached, MongoDB, Redis
- Engines: Elastic, RabbitMQ
- Integration testing: Selenium Chrome, Selenium Firefox
- Custom services
You can add up to 5 services to a single build action.
Depending on the service type, the following options are available:
- Cache database between pipeline runs – use this option to speed up your builds (not every pipeline run has to seed the database)
- Allow passing variables to this service – check this option if your service requires data from variables defined in the pipeline. For example, you can send
MYSQL_ROOT_USERvariables to the official MySQL image in order to configure the image during the start.
- Create database on startup – creates a fresh instance of the database on every run. Check this option if your framework or tests require an already existing database.
- Seed database with SQL dump – imports data from the selected SQL dump in the pipeline filesystem
If you want to upload a fresh instance of the database, run the pipeline with the 'Clear cache' flag.
Last modified on October 20, 2022