.gitlab-ci.yml 1.85 KB
Newer Older
Bernhard Rumpe's avatar
BR-sy    
Bernhard Rumpe committed
1
# (c) https://github.com/MontiCore/monticore  
vonWenckstern's avatar
vonWenckstern committed
2

3
stages:
4
#- windows
5
6
- linux

Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
githubjob:
  image: maven:3-jdk-8
  stage: linux
  before_script:
  - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
  - eval $(ssh-agent -s)
  - ssh-add <(echo "$GITHUB_SSH_PRIV_KEY")
  - echo "$GITHUB_SSH_PRIV_KEY" | tr -d '\r' | ssh-add -
  - git config --global user.email "kusmenko@se-rwth.de"
  - git config --global user.name "EMA CI Robot"
  - mkdir -p ~/.ssh
#  - cat gitlab-known-hosts >> ~/.ssh/known_hosts
  - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
  script: 
  - git clone git@github.com:MontiCore/EmbeddedMontiArc.git
  - cd EmbeddedMontiArc
  - git subtree pull --prefix $PRJ_NAME https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/${PRJ_NAME}.git master --squash
  - git push --force
  only:
  - master

28
29
30
31
masterJobLinux:
  stage: linux
  image: maven:3-jdk-8
  script: 
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
32
  - mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B -U clean deploy --settings settings.xml
33
34
  - cat target/site/jacoco/index.html
  - mvn package sonar:sonar -s settings.xml
35
36
  only:
  - master
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
37
38
39
40
41
42
  except:
    changes:
    - README.md
    - .gitignore
    - .gitlab-ci.yml

43
  
44
45
46
47
48
49
50
51
52
53
54
#masterJobWindows:
#  stage: windows
#  script:
#  - mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B  clean install --settings settings.xml
#  tags:
#  - Windows10
#  except:
#    changes:
#    - README.md
#    - .gitignore
#    - .gitlab-ci.yml
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
55

56
57
58
59
60

BranchJobLinux:
  stage: linux
  image: maven:3-jdk-8
  script: 
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
61
  - mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B -U  clean install --settings settings.xml
62
  - cat target/site/jacoco/index.html
63
64
  except:
  - master
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
65
66
67
68
69
70
  except:
    changes:
    - README.md
    - .gitignore
    - .gitlab-ci.yml