forked from SeldonIO/seldon-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jenkins-x.yml
132 lines (131 loc) · 4.31 KB
/
jenkins-x.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
buildPack: none
pipelineConfig:
pipelines:
overrides:
- name: changelog
pipeline: release
stage: promote
step:
command: echo "skipping promote"
pullRequest:
pipeline:
agent:
image: seldonio/core-builder:0.15
stages:
- name: pr-build-comment
steps:
- agent:
image: gcr.io/jenkinsxio/builder-go:2.0.916-264
dir: ci
sh: "./add-pr-build-comment"
- name: build-and-test
parallel:
- name: test-python
agent:
image: seldonio/python-builder:0.2
steps:
- name: test-python
command: make
args:
- -C python
- update_package
- install_dev
- test
- name: seldon-engine
steps:
- name: test-engine
command: make
args:
- -C engine
- -f Makefile
- build_jar
- name: seldon-operator
steps:
- name: test-operator
command: make
args:
- -C operator
- test
- name: seldon-executor
steps:
- name: test-executor
command: make
args:
- -C executor
- test
release:
setVersion:
steps:
- name: create-version
command: cat version.txt > VERSION
- name: delete-existing-branch
command: git branch -D v\$(cat version.txt) || echo "No branch exists"
- name: create-new-branch
command: git checkout -b v\$(cat version.txt)
- name: commit-new-branch
command: git push origin v\$(cat version.txt) -f
- name: skip-tag
command: echo "skipping tag"
pipeline:
agent:
image: seldonio/core-builder:0.15
stages:
- name: build-and-push
steps:
- name: build-and-push-images
command: bash
args:
- ./ci_build_and_push_images.sh
- name: create-dated-version
command: echo $(cat version.txt)_$(date +"%Y%m%d%H%M%S") > version.txt
- name: create-new-branch
command: git checkout -b v$(cat version.txt)
# This is necessary as the python release.py has a known bug which hangs if the JARs are not downloaded first
- name: update-release-tags
command: (cd engine && mvn versions:set -DnewVersion=$(cat ../version.txt)) && python release.py $(cat version.txt)
- name: add-changes-to-branch
command: git add .
- name: commit-changes-to-branch
command: git commit -m "Added changes for branch"
- name: build-and-push-dated-images
command: bash
args:
- ./ci_build_and_push_images.sh
- name: push-new-branch
command: git push origin v$(cat version.txt)
options:
containerOptions:
volumeMounts:
- mountPath: /lib/modules
name: modules
readOnly: true
- mountPath: /sys/fs/cgroup
name: cgroup
- name: dind-storage
mountPath: /var/lib/docker
- mountPath: /builder/home/.docker
name: jenkins-docker-config-volume
resources:
requests:
cpu: 1
memory: 2000Mi
securityContext:
privileged: true
imagePullPolicy: Always
volumes:
- name: modules
hostPath:
path: /lib/modules
type: Directory
- name: cgroup
hostPath:
path: /sys/fs/cgroup
type: Directory
- name: dind-storage
emptyDir: {}
- name: jenkins-docker-config-volume
secret:
items:
- key: config.json
path: config.json
secretName: jenkins-docker-cfg