Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gitlab CI script which starts a maven image and links it to a mysql service
image: maven:3-jdk-8
services:
# mysql hostname is 'mysql'. You should configure your db configuration so that it connects to 'mysql' host.
- mysql:latest
variables:
# Configure mysql environment variables (https://hub.docker.com/r/_/mysql/)
MYSQL_DATABASE: REPLACE_WITH_YOUR_DB_NAME
MYSQL_ROOT_PASSWORD: REPLACE_WITH_YOUR_ROOT_PASSWORD
build:
script: "mvn clean install -B"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment