From 4edb7a97ac665c88f646409ea76c8ac6bf667dcd Mon Sep 17 00:00:00 2001 From: Evgeny Kusmenko Date: Sat, 26 Sep 2020 20:39:34 +0200 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2c23630..6d1b3f9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,6 +11,28 @@ stages: #- windows - linux +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 + + masterJobLinux: stage: linux image: maven:3-jdk-8 @@ -21,6 +43,10 @@ masterJobLinux: only: - master + except: + - .gitlab-ci.yml + - .README.md + - .gitignore #masterJobWindows: # stage: windows -- GitLab