forked from schildbach/public-transport-enabler
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
39 lines (36 loc) · 931 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
image: java:8-jdk
stages:
- git-robot
- build
gradle-build:
stage: build
only:
- master
- pushes
except:
- schedules
allow_failure: false
script:
- ./gradlew clean build
git-merge-upstream:
stage: git-robot
only:
- schedules
- master
except:
- pushes
allow_failure: false
script:
- git config --global user.name "Git Robot"
- git config --global user.email "[email protected]"
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- git clone [email protected]:${CI_PROJECT_PATH}.git
- cd ${CI_PROJECT_NAME}
- git remote add upstream https://github.com/schildbach/public-transport-enabler.git
- git fetch upstream
- git merge upstream/master
- ./gradlew clean build
- git push --force origin master