Commit b8e7794f authored by sunye's avatar sunye
Browse files

Add Gitlab-CI configuration

parent 2417c928
image: docker-registry.univ-nantes.fr/sunye-g/docker-java-maven:latest
variables:
MAVEN_OPTS: "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true -Dhttps.proxyHost=proxy-serveur.univ-nantes.prive -Dhttps.proxyPort=3128"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
cache:
paths:
- .m2/repository/
key: "$CI_BUILD_REF_NAME"
build:
stage: build
script:
- java -version
- mvn -version
- 'mvn --settings ./.gitlab.maven.settings.xml $MAVEN_OPTS -e $MAVEN_CLI_OPTS compile'
artifacts:
paths:
- target/
- salut-common/target
- salut-cache/target
verify:
stage: test
script:
- 'mvn --settings ./.gitlab.maven.settings.xml $MAVEN_OPTS verify'
artifacts:
paths:
- target/
- salut-common/target
- salut-cache/target
pages:
stage: deploy
script:
- 'mvn --settings .gitlab.maven.settings.xml $MAVEN_OPTS -e $MAVEN_CLI_OPTS compile site'
- mkdir -p public/salut-common
- mkdir -p public/salut-cache
- rsync -r target/site/ public
- rsync -r salut-common/target/site/ public/salut-common
- rsync -r salut-cache/target/site/ public/salut-cache
artifacts:
paths:
- public
only:
- master
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<proxies>
<proxy>
<protocol>https</protocol>
<port>3128</port>
<host>proxy-serveur.univ-nantes.prive</host>
</proxy>
</proxies>
<localRepository>.m2/repository/</localRepository>
<profiles>
<profile>
<id>default</id>
<repositories>
<repository>
<id>central</id>
<name>Maven Central</name>
<releases>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<url>https://repo1.maven.org/maven2/</url>
<layout>default</layout>
</repository>
<repository>
<id>jenkins-ci</id>
<name>Jenkins CI Releases</name>
<releases>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<url>https://repo.jenkins-ci.org/public</url>
<layout>default</layout>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>default</activeProfile>
</activeProfiles>
</settings>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment