.gitlab-ci.yml 2.19 KB
Newer Older
Jean Meurice's avatar
Jean Meurice committed
1 2 3 4 5
#
# (c) https://github.com/MontiCore/monticore
#
# The license generally applicable for this project
# can be found under https://github.com/MontiCore/monticore.
Evgeny Kusmenko's avatar
sonar  
Evgeny Kusmenko committed
6 7
#

Jean Meurice's avatar
Jean Meurice committed
8

Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
9
stages:
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
10
- windows
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
11
- docker
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
12 13
- linux

kusmenko@se-rwth.de's avatar
kusmenko@se-rwth.de committed
14

Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
15
masterJobLinux:
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
16
  stage: linux
vonWenckstern's avatar
vonWenckstern committed
17
  image: maven:3-jdk-8
Jean Meurice's avatar
Jean Meurice committed
18 19 20 21 22
  before_script:
  - apt update
  - apt --assume-yes install libxext6
  - apt --assume-yes install libxrender1
  - apt --assume-yes install libxtst6
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
23
  script: 
Jean Meurice's avatar
Jean Meurice committed
24 25 26 27 28
  - "JAWT_LIB=$(find / -name libjawt.so -print -quit)"
  - "echo JAWT_LIB: $JAWT_LIB"
  - "JAWT_FOLDER=$(dirname ${JAWT_LIB})"
  - "echo JAWT_FOLDER: $JAWT_FOLDER"
  - "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${JAWT_FOLDER}"
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
29
  - mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B  clean deploy --settings settings.xml
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
30
  - mvn package sonar:sonar -s settings.xml
kusmenko@se-rwth.de's avatar
kusmenko@se-rwth.de committed
31 32
  only:
  - master
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
33

kusmenko@se-rwth.de's avatar
kusmenko@se-rwth.de committed
34
  
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
35
masterJobWindows:
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
36
  stage: windows
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
37 38
  script: 
  - mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B  clean install --settings settings.xml
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
39
  tags:
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
40
  - Windows10
Hengwen Zhang's avatar
Hengwen Zhang committed
41 42
  only:
    - master
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
43 44 45
  artifacts:
    paths:
      - install/rmi-model-server.jar
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
46

Hengwen Zhang's avatar
Hengwen Zhang committed
47
BranchJobLinux:
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
48
  stage: linux
Hengwen Zhang's avatar
Hengwen Zhang committed
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
  image: maven:3-jdk-8
  before_script:
  - apt update
  - apt --assume-yes install libxext6
  - apt --assume-yes install libxrender1
  - apt --assume-yes install libxtst6
  #- apt --assume-yes install realpath
  script: 
  - "JAWT_LIB=$(find / -name libjawt.so -print -quit)"
  - "echo JAWT_LIB: $JAWT_LIB"
  - "JAWT_FOLDER=$(dirname ${JAWT_LIB})"
  - "echo JAWT_FOLDER: $JAWT_FOLDER"
  - "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${JAWT_FOLDER}"
  - mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B  clean install --settings settings.xml
  except:
  - master
Hengwen Zhang's avatar
Hengwen Zhang committed
65

66
masterJobDocker:
Hengwen Zhang's avatar
Hengwen Zhang committed
67
  image: docker:dind
Hengwen Zhang's avatar
Hengwen Zhang committed
68
  stage: docker
69
  before_script:
Hengwen Zhang's avatar
Hengwen Zhang committed
70
    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
71
  tags:
Hengwen Zhang's avatar
Hengwen Zhang committed
72 73 74 75 76 77 78 79
    - docker
  script:
    - cd docker
    - sh ./build.sh
    - docker tag rmi-server:latest $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
    - docker tag rmi-server:latest $CI_REGISTRY_IMAGE:latest
    - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
    - docker push $CI_REGISTRY_IMAGE:latest
80 81
  only:
    - master