-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy path.gitlab-ci.yml
55 lines (49 loc) · 1.38 KB
/
.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#this is the latest template to assist in copying
image: git.centralnic.com:5050/centralnic/syntaxchecker:master
stages:
- syntax-check
- git-robot
default:
before_script:
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@git.centralnic.com/centralnic/tests.git
- tests/prep-alpine-env.sh
step-syntax-check:
stage: syntax-check
script:
- export DYNAMIC_ENV_VAR=DEVELOP
- echo running tests in $DYNAMIC_ENV_VAR
- tests/testlints.sh
merge-master-to-ote:
stage: git-robot
only:
- master
script:
- eval $(ssh-agent -s)
- bash -c "ssh-add <(echo '$GIT_SSH_PRIV_KEY')"
- ssh-add -L
- export TMP_DIR=$(mktemp -d -t ./ci-XXXXXXXXXX)
- cd $TMP_DIR
- pwd
- bash -c "set -x; git clone [email protected]:${CI_PROJECT_PATH}.git"
- cd ${CI_PROJECT_NAME}
- git checkout master
- git checkout --track origin/ote
- git merge master
- git push origin ote
merge-ote-to-dev:
stage: git-robot
only:
- ote
script:
- eval $(ssh-agent -s)
- bash -c "ssh-add <(echo '$GIT_SSH_PRIV_KEY')"
- ssh-add -L
- export TMP_DIR=$(mktemp -d -t ./ci-XXXXXXXXXX)
- cd $TMP_DIR
- pwd
- bash -c "set -x; git clone [email protected]:${CI_PROJECT_PATH}.git"
- cd ${CI_PROJECT_NAME}
- git checkout --track origin/ote
- git checkout --track origin/dev
- git merge ote
- git push origin dev