Created
August 23, 2017 07:50
-
-
Save hkarakose/8182238c12ae62a7ba9b47fc4a8019ec to your computer and use it in GitHub Desktop.
Gitlab CI script which starts a maven image and links it to a mysql service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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