21 lines
865 B
YAML
21 lines
865 B
YAML
variables:
|
|
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
|
|
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
|
|
|
|
image: maven:3-openjdk-11
|
|
|
|
cache:
|
|
paths:
|
|
- .m2/repository
|
|
|
|
deploy:jdk8:
|
|
stage: deploy
|
|
script:
|
|
- if [ ! -f ci_settings.xml ];
|
|
then echo "CI settings missing\! If deploying to GitLab Maven Repository, please see https://docs.gitlab.com/ee/user/packages/maven_repository/index.html#create-maven-packages-with-gitlab-cicd for instructions.";
|
|
fi
|
|
- 'mvn $MAVEN_CLI_OPTS deploy -s ci_settings.xml'
|
|
only:
|
|
variables:
|
|
- $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|