.gitlab-ci.yml 2 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
- linux
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
6
- trigger
7

Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
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

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

44
  
45 46 47 48 49 50 51 52 53 54 55
#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
56

57 58 59 60 61

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

Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
72 73 74 75 76
trigger-emadl:
  stage: trigger
  trigger:
    project: monticore/EmbeddedMontiArc/generators/EMADL2CPP
    branch: master
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
77
  only:
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
78
  - master
Evgeny Kusmenko's avatar
Evgeny Kusmenko committed
79 80