.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:
10
- build
Hengwen Zhang's avatar
Fix CI    
Hengwen Zhang committed
11
- docker
kusmenko@se-rwth.de's avatar
kusmenko@se-rwth.de committed
12

Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
13
masterJobLinux:
14
  stage: build
vonWenckstern's avatar
vonWenckstern committed
15
  image: maven:3-jdk-8
Jean Meurice's avatar
Jean Meurice committed
16
17
18
19
20
  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
21
  script: 
Jean Meurice's avatar
Jean Meurice committed
22
23
24
25
26
  - "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
27
  - 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
28
  - mvn package sonar:sonar -s settings.xml
kusmenko@se-rwth.de's avatar
kusmenko@se-rwth.de committed
29
30
  only:
  - master
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
31
32
  tags:
  - se
kusmenko@se-rwth.de's avatar
kusmenko@se-rwth.de committed
33
  
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
34
masterJobWindows:
35
  stage: build
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
36
37
  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
38
39
  tags:
  - Windows10
Hengwen Zhang's avatar
Fix CI    
Hengwen Zhang committed
40
41
  only:
    - master
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
42

Hengwen Zhang's avatar
Fix CI    
Hengwen Zhang committed
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
BranchJobLinux:
  stage: build
  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
  tags:
  - se
  artifacts:
    paths:
Hengwen Zhang's avatar
Fix CI    
Hengwen Zhang committed
65
      - install/rmi-model-server.jar
Hengwen Zhang's avatar
Hengwen Zhang committed
66

Hengwen Zhang's avatar
Fix CI    
Hengwen Zhang committed
67
BranchJobDocker:
Hengwen Zhang's avatar
Hengwen Zhang committed
68
  image: docker:dind
Hengwen Zhang's avatar
Fix CI    
Hengwen Zhang committed
69
  stage: docker
70
  before_script:
Hengwen Zhang's avatar
Hengwen Zhang committed
71
    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
72
  tags:
Hengwen Zhang's avatar
Hengwen Zhang committed
73
74
75
76
77
78
79
80
    - 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