.gitlab-ci.yml 1.67 KB
Newer Older
alexander.weigl's avatar
alexander.weigl committed
1 2
image: key-ant-openjdk-8:latest

alexander.weigl's avatar
alexander.weigl committed
3 4 5 6 7
cache:
  paths:
    - .m2/

variables:
Alexander Weigl's avatar
Alexander Weigl committed
8 9 10 11
  MAVEN_OPTS: >-
    -Dmaven.repo.local=${CI_PROJECT_DIR}/.m2
    -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN
    -Dorg.slf4j.simpleLogger.showDateTime=true
12
  GIT_SSL_NO_VERIFY: "true"
13

Alexander Weigl's avatar
Alexander Weigl committed
14 15 16 17 18 19 20
stages:
  - setup
  - build
  - test
  - deploy

setup:
Alexander Weigl's avatar
Alexander Weigl committed
21
  stage: setup
Alexander Weigl's avatar
Alexander Weigl committed
22 23 24 25 26 27 28 29
  script:
    - COMPONENTS=keydeps/lib/components/
    - GID=key-project-psdbg
    - V=2.7-SNAPSHOT
    - mvn install:install-file -Dfile=$COMPONENTS/key.core.jar -DartifactId=key.core  -DgroupId=$GID -Dversion=$V -Dpackaging=jar
    - mvn install:install-file -Dfile=$COMPONENTS/key.ui.jar -DartifactId=key.ui -DgroupId=$GID -Dversion=$V -Dpackaging=jar
    - mvn install:install-file -Dfile=$COMPONENTS/key.util.jar -DartifactId=key.util -DgroupId=$GID -Dversion=$V -Dpackaging=jar
    - mvn install:install-file -Dfile=$COMPONENTS/../libs/recoderKey.jar -DartifactId=recoder  -DgroupId=$GID -Dversion=2.7 -Dpackaging=jar
alexander.weigl's avatar
alexander.weigl committed
30

alexander.weigl's avatar
alexander.weigl committed
31
build:
Alexander Weigl's avatar
Alexander Weigl committed
32
  stage: build
alexander.weigl's avatar
alexander.weigl committed
33 34
  script: "mvn compile -B -T 2"

Alexander Weigl's avatar
Alexander Weigl committed
35 36
test:
  stage: test
alexander.weigl's avatar
alexander.weigl committed
37 38
  script: "mvn test -B"

alexander.weigl's avatar
alexander.weigl committed
39
deploy:
Alexander Weigl's avatar
Alexander Weigl committed
40
  stage: deploy
alexander.weigl's avatar
alexander.weigl committed
41
  script: 
Alexander Weigl's avatar
Alexander Weigl committed
42
    - "mvn package -DperformRelease=true -DcreateChecksum=true -DskipTests=true -B"
alexander.weigl's avatar
alexander.weigl committed
43 44
  artifacts: 
    paths:
Alexander Weigl's avatar
Alexander Weigl committed
45
      - "*/target/*.jar"
Alexander Weigl's avatar
Alexander Weigl committed
46 47
  allow_failure: true

48 49 50
sonar:
  stage: deploy
  script:
Alexander Weigl's avatar
Alexander Weigl committed
51
    - "mvn org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar  -Dsonar.organization=wadoon-github   -Dsonar.host.url=https://sonarcloud.io   -Dsonar.login=3441b7b4ade9f61b61b75322893d084c51d8acc3"
52 53
  allow_failure: true

Alexander Weigl's avatar
Alexander Weigl committed
54 55 56
site:
  stage: deploy
  script:
Alexander Weigl's avatar
Alexander Weigl committed
57
    - "mvn site:site -DskipTests=true -B"
Alexander Weigl's avatar
Alexander Weigl committed
58 59
  artifacts:
    paths:
Alexander Weigl's avatar
Alexander Weigl committed
60
      - "*/target/site/*"
alexander.weigl's avatar
alexander.weigl committed
61
  allow_failure: true