Commit 7b2b75ab authored by Benjamin Beeker's avatar Benjamin Beeker

updating build-script

parent acc37144
......@@ -3,27 +3,9 @@ stages:
- install
- deploy
before_script:
- echo '<settings>
<servers>
<server>
<id>Comhix-Releases</id>
<username>'$NEXUS_USER'</username>
<password>'$NEXUS_PASSWORD'</password>
</server>
<server>
<id>Comhix-Snapshots</id>
<username>'$NEXUS_USER'</username>
<password>'$NEXUS_PASSWORD'</password>
</server>
</servers>
</settings>' > $HOME/.m2/settings.xml
cache:
key: "$CI_BUILD_REF_NAME"
paths:
- target/
- .m2/
untracked: true
variables:
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
......@@ -33,25 +15,37 @@ build-job:
image: maven:alpine
stage: build
script:
- mvn $MAVEN_CLI_OPTS --version
- mvn $MAVEN_CLI_OPTS clean compile test
- mvn $MAVEN_CLI_OPTS clean install
verify-dependencies:
image: maven:alpine
stage: install
only:
- release
- /^v[0-9]+\.[0-9]+\.[0-9]+.*$/
script:
- mvn $MAVEN_CLI_OPTS verify -Prelease
install-job:
image: maven:3
image: maven:alpine
stage: install
only:
- master
- release
- /^v[0-9]+\.[0-9]+\.[0-9]+.*$/
before_script:
- echo '<settings>
<servers>
<server>
<id>Comhix-Releases</id>
<username>'$NEXUS_USER'</username>
<password>'$NEXUS_PASSWORD'</password>
</server>
<server>
<id>Comhix-Snapshots</id>
<username>'$NEXUS_USER'</username>
<password>'$NEXUS_PASSWORD'</password>
</server>
</servers>
</settings>' > $HOME/.m2/settings.xml
script:
- mvn $MAVEN_CLI_OPTS --version
- mvn $MAVEN_CLI_OPTS source:jar javadoc:jar deploy
artifacts:
name: "${CI_BUILD_REF_NAME}_${CI_BUILD_REF}"
......@@ -64,7 +58,7 @@ pages:
name: production
stage: deploy
only:
- release
- /^v[0-9]+\.[0-9]+\.[0-9]+.*$/
script:
- mvn $MAVEN_CLI_OPTS site site:stage
- mkdir ./public
......
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