Created
October 4, 2018 12:16
-
-
Save jeffque/05ab5fadd57bb7c16452f98a6b8ac511 to your computer and use it in GitHub Desktop.
Esboço do .gitlab-ci.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: maven:3.3.9-jdk-8 | |
variables: | |
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true -Xmx2048m -Xms1024m" | |
MAVEN_CLI_OPTS: "-P gitlab,!dev -DskipDefaultProfile -Dgitlabci -s .m2/settings.xml --batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true" | |
stages: | |
- build-test-nucleo | |
- build-apps | |
- archive | |
- deploy | |
.maven-app-template: &maven-app-template | |
before_script: | |
- for folder in nucleo "${CI_JOB_NAME#*-}"; do | |
- ln -vs ../.m2 "${folder}/.m2" | |
- done | |
- ( cd nucleo; mvn $MAVEN_CLI_OPTS clean install -DskipTests; ) | |
.maven-basico-template: &maven-basico-template | |
before_script: | |
- ln -vs ../.m2 "${CI_JOB_NAME#*-}/.m2" | |
build-nucleo: | |
stage: build-test-nucleo | |
<<: *maven-basico-template | |
script: | |
- cd nucleo | |
- mvn $MAVEN_CLI_OPTS clean test | |
- cd .. | |
.build-app-template: &build-app-template | |
<<: *maven-app-template | |
stage: build-apps | |
cache: | |
paths: | |
- .m2/repository | |
key: repo-maven-proj-${CI_JOB_NAME#build-} | |
script: | |
- 'cd ${CI_JOB_NAME#build-}' | |
- mvn $MAVEN_CLI_OPTS clean test | |
- cd .. | |
dependencies: | |
- build-nucleo | |
build-portal: | |
<<: *build-app-template | |
build-mobile: | |
<<: *build-app-template |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment