Commit e4bb3fac by Jessica Hawkwell

Add .gitlab-ci.yml

1 parent b27a37fc
Pipeline #200 failed
in 10 seconds
Showing with 54 additions and 0 deletions
image: registry.felinewith.me/dockerhelper/maven:master
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.
MAVEN_OPTS: "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
# 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.
MAVEN_CLI_OPTS: "--batch-mode --errors --show-version"
stages:
- compile
- deploy
compile:
stage: compile
script:
- mvn -Dgit-rev="`git describe`" $MAVEN_CLI_OPTS compile test package install deploy
only:
- master
pages:
stage: deploy
script:
- mvn -Dgit-rev="`git describe`" $MAVEN_CLI_OPTS test
- mvn versions:set -DprocessDependencies=false -DnewVersion=`git describe`-$CI_COMMIT_REF_NAME
- mvn -Dgit-rev="`git describe`" $MAVEN_CLI_OPTS site
- mvn -Dgit-rev="`git describe`" $MAVEN_CLI_OPTS site:stage
- mv target/staging public
artifacts:
paths:
- public
only:
- master
test:
stage: compile
script:
- mvn -Dgit-rev="`git describe`" $MAVEN_CLI_OPTS compile test
only:
- branches
except:
- master
release:
stage: compile
script:
- mvn versions:set -DnewVersion=`git describe`
- mvn versions:commit
- find * -name pom.xml -exec git add {} \;
- mvn -Dgit-rev="`git describe`" $MAVEN_CLI_OPTS compile package install deploy
only:
- /([.0-9]+)-RELEASE/
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!