.gitlab-ci.yml 1.79 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# this file is a template, and might need editing before it works on your project.
---
# Build JAVA applications using Apache Maven (http://maven.apache.org)
# For docker image tags see https://hub.docker.com/_/maven/
#
# For general lifecycle information see https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
# 
# This template will build and test your projects as well as create the documentation.
# 
# * Caches downloaded dependencies and plugins between invocation.

variables:
  # This will supress any download for dependencies and plugins or upload messages which would clutter the console log.
  # `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
15
  MAVEN_OPTS: "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true -Dmaven.repo.local=/cache/maven.repository"
16 17 18
  # As of Maven 3.3.0 instead of this you may define these options in `.mvn/maven.config` so the same config is used
  # when running from the command line.
  # `installAtEnd` and `deployAtEnd`are only effective with recent version of the corresponding plugins.
Nicola Bertazzo's avatar
Nicola Bertazzo committed
19
  MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
20 21

# Cache downloaded dependencies and plugins between builds.
22 23 24
# cache:
#  paths:
#    - $HOME/.m2/repository/
25

26
build:
Nicola Bertazzo's avatar
Nicola Bertazzo committed
27
  script: 
Nicola Bertazzo's avatar
Nicola Bertazzo committed
28
    - "mvn clean package -Dhttps.proxyHost=192.168.10.1 -Dhttps.proxyPort=3128"
29 30 31 32 33
  image: maven:3.3.9-jdk-8
  tags:
    - docker

int-test:
Nicola Bertazzo's avatar
Nicola Bertazzo committed
34
  script: "mvn verify -Dhttps.proxyHost=192.168.10.1 -Dhttps.proxyPort=3128"
35 36 37 38 39 40
  image: maven:3.3.9-jdk-8
  tags:
    - docker

docker-build:
  script:
Nicola Bertazzo's avatar
Nicola Bertazzo committed
41
    - "echo docker build"
42
  image: maven:3.3.9-jdk-8
43
  tags:
44
    - docker