This repository has been archived by the owner on Sep 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
/
jenkins-x-chaos.yml
104 lines (99 loc) · 3.66 KB
/
jenkins-x-chaos.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
buildPack: none
pipelineConfig:
pipelines:
pullRequest:
pipeline:
agent:
image: mutadev/muta-build-env:v0.3.0
options:
timeout:
time: 180 # 3H
unit: minutes
stages:
- name: chaos
environment:
- name: BASE_WORKSPACE
value: /workspace/source
- name: NODE_SIZE
value: "4"
- name: CHAIN_GENESIS_TIMEOUT_GAP
value: "9999"
options:
containerOptions:
volumeMounts:
- name: jenkins-docker-cfg
mountPath: /kaniko/.docker
resources:
limits:
cpu: 4
memory: 8Gi
requests:
cpu: 2
memory: 8Gi
volumes:
- name: jenkins-docker-cfg
secret:
secretName: jenkins-docker-cfg
items:
- key: config.json
path: config.json
steps:
- name: build-release
image: mutadev/muta-build-env:v0.3.0
env:
- name: OPENSSL_STATIC
value: "1"
- name: OPENSSL_LIB_DIR
value: /usr/lib/x86_64-linux-gnu
- name: OPENSSL_INCLUDE_DIR
value: /usr/include/openssl
command: cargo
args:
- build
- --release
- --example
- muta-chain
- name: push-image
image: gcr.io/kaniko-project/executor:9912ccbf8d22bbafbf971124600fbb0b13b9cbd6
command: /kaniko/executor
args:
- --dockerfile=/workspace/source/devtools/docker-build/Dockerfile
- --destination=mutadev/${REPO_NAME}:pr-${PULL_NUMBER}-${BUILD_NUMBER}
- --context=/workspace/source
- name: create-chaos-crd
image: alpine/helm:3.2.4
command: helm
args:
- install
- chaos-${REPO_NAME}-pr-${PULL_NUMBER}-${BUILD_NUMBER}
- charts/deploy-chaos
- --namespace
- mutadev
- --set
- size=${NODE_SIZE},repo_name=${REPO_NAME},version=pr-${PULL_NUMBER}-${BUILD_NUMBER},resources.cpu=1100m,resources.memory=8Gi,chain_genesis.metadata.timeout_gap=${CHAIN_GENESIS_TIMEOUT_GAP}
- name: watchdog
image: mutadev/muta-watchdog:v0.2.0-rc
env:
- name: WATCH_DURATION
value: 1H
- name: APP_NAMESPACE
value: mutadev
- name: APP_PORT
value: "8000"
- name: APP_GRAPHQL_URL
value: graphql
- name: JOB_BENCHMARK_DURATION
value: "300"
- name: JOB_BENCHMARK_TIMEOUT_GAP
value: "9999"
- name: JOB_BENCHMARK_CPU
value: "3"
command: APP_NAME=chaos-${REPO_NAME}-pr-${PULL_NUMBER}-${BUILD_NUMBER} node /watchdog/index.js
- name: delete-chaos-crd
image: alpine/helm:3.2.4
command: helm
args:
- uninstall
- chaos-${REPO_NAME}-pr-${PULL_NUMBER}-${BUILD_NUMBER}
- --namespace
- mutadev