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

ham's avatar
ham committed
8

Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
9
10
11
image: maven:3-jdk-8

stages:
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
12
- windows
hengwen's avatar
Fix yml    
hengwen committed
13
- linux
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
14

Pascal Maurice Porta's avatar
Pascal Maurice Porta committed
15
masterJobWindowsRpc:
Christoph von Oy's avatar
Christoph von Oy committed
16
17
  stage: windows
  script:
Pascal Maurice Porta's avatar
Pascal Maurice Porta committed
18
19
  - cd rpc
  - mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B  clean deploy --settings ..\settings.xml
hengwen's avatar
hengwen committed
20
  - mvn package sonar:sonar --settings ..\settings.xml -DskipTests
Pascal Maurice Porta's avatar
Pascal Maurice Porta committed
21
22
23
24
25
26
27
28
29
30
31
  tags:
  - Windows10
  only:
  - master
  
masterJobWindowsRestful:
  stage: windows
  script:
  - cd restful
  # TODO: we have to skip tests for now, because most tests require a running instance of zookeeper
  - mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B  clean deploy --settings ..\settings.xml -DskipTests
hengwen's avatar
hengwen committed
32
  - mvn package sonar:sonar --settings ..\settings.xml -DskipTests
Christoph von Oy's avatar
Christoph von Oy committed
33
34
  tags:
  - Windows10
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
35
36
37
  only:
  - master

hengwen's avatar
Testing    
hengwen committed
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#branchJobWindowsRpc:
#  stage: windows
#  script:
#  - cd rpc
#  - mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B  clean install --settings ..\settings.xml
#  tags:
#  - Windows10
#  except:
#  - master
#
#branchJobWindowsRestful:
#  stage: windows
#  script:
#    - cd restful
#    # TODO: we have to skip tests for now, because most tests require a running instance of zookeeper
#    - mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B  clean install --settings ..\settings.xml -DskipTests
#  tags:
#    - Windows10
#  except:
#    - master
58

hengwen's avatar
hengwen committed
59
# run tests
hengwen's avatar
hengwen committed
60
branchJobLinux:
hengwen's avatar
hengwen committed
61
62
63
  tags:
    - docker
  stage: linux
hengwen's avatar
hengwen committed
64
65
  before_script:
    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
hengwen's avatar
hengwen committed
66
  script:
hengwen's avatar
hengwen committed
67
68
69
70
    # clean up
    - docker rmi montisim-server-builder
    - docker rmi rpc-server
    - docker rmi restful-server
hengwen's avatar
hengwen committed
71
72
    # pull the latest RMIServer image
    - docker pull registry.git.rwth-aachen.de/monticore/embeddedmontiarc/simulators/rmimodelserver:latest
hengwen's avatar
hengwen committed
73
74
75
76
77
78
79
80
    - cd docker
    - ./build.sh
    - ./run_test.sh
  except:
    - master

# build, test and publish docker images
masterJobLinux:
hengwen's avatar
hengwen committed
81
82
83
84
85
86
  tags:
    - docker
  stage: linux
  before_script:
    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
  script:
hengwen's avatar
hengwen committed
87
88
    # pull the latest RMIServer image
    - docker pull registry.git.rwth-aachen.de/monticore/embeddedmontiarc/simulators/rmimodelserver:latest
hengwen's avatar
hengwen committed
89
90
91
92
93
94
95
    - cd docker
    - ./build.sh
    - ./run_test.sh
    - docker tag rpc-server:latest $CI_REGISTRY_IMAGE:rpc
    - docker tag restful-server:latest $CI_REGISTRY_IMAGE:restful
    - docker push $CI_REGISTRY_IMAGE:rpc
    - docker push $CI_REGISTRY_IMAGE:restful
hengwen's avatar
hengwen committed
96
  only:
hengwen's avatar
hengwen committed
97
    - master