-
Notifications
You must be signed in to change notification settings - Fork 7
/
.gitlab-ci.yml.bak
54 lines (47 loc) · 1.04 KB
/
.gitlab-ci.yml.bak
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
before_script:
- docker info
- echo "build $CI_COMMIT_REF_NAME"
# after_script:
# - echo "build done"
workflow:
rules:
- if: $CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME == "test" || $CI_COMMIT_REF_NAME == "release" || $CI_COMMIT_REF_NAME =~ /^sprint/
when: always
- if: $CI_COMMIT_TAG
when: always
# - if: $CI_COMMIT_REF_NAME == "feat/ci" # test ci only
# when: always
- when: never
stages:
- build
- deploy
build-tags:
stage: build
script:
- make qucheng citag=${CI_COMMIT_TAG}
only:
- tags
build-custom:
stage: build
script:
- make qucheng
after_script:
- echo "clean build"
except:
- tags
build-api:
stage: build
script:
- make api
after_script:
- echo "clean build"
only:
- test
- master
deploy:
stage: deploy
script:
- kubectl rollout restart deploy/qucheng -n cne-system --kubeconfig=$HOME/.kube/pre.kubeconfig
- kubectl rollout restart deploy/cne-api -n cne-system --kubeconfig=$HOME/.kube/pre.kubeconfig
only:
- test