-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile1
90 lines (89 loc) · 2.11 KB
/
Jenkinsfile1
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
pipeline {
agent none
stages {
stage('Docker Network') {
agent any
steps {
sh 'docker network create my-net'
}
}
stage('Database') {
parallel {
stage('MySql') {
agent any
steps {
sh 'docker run -d \
--name mysql \
--network=my-net \
-p 3306:3306 \
-e MYSQL_ROOT_PASSWORD=rootpassword \
-e MYSQL_USER=mysqluser \
-e MYSQL_PASSWORD=mysqlpw \
eventuateio/eventuate-tram-sagas-mysql:0.3.0.RELEASE'
}
}
stage('MongoDB') {
agent any
steps {
sh 'docker run -d \
--name mongodb \
--network=my-net \
-p 27017:27017 \
-e MONGO_DATA_DIR=/data/db \
-e MONGO_LOG_DIR=/dev/null \
-v /data/db:/data/db \
mongo:3.0.15'
}
}
}
}
stage('Zookeeper') {
agent any
steps {
sh 'docker run -d \
--name zookeeper \
--network=my-net \
-p 2181:2181 \
-p 2888:2888 \
-p 3888:3888 \
eventuateio/eventuateio-local-zookeeper:0.14.0'
}
}
stage('Kafka') {
agent any
steps {
sh 'docker run -d \
--name kafka \
--network=my-net \
-p 9092:9092 \
--link zookeeper \
-e ADVERTISED_HOST_NAME=${DOCKER_HOST_IP} \
-e "KAFKA_HEAP_OPTS=-Xmx320m -Xms320m" \
-e ZOOKEEPER_SERVERS=zookeeper:2181 \
eventuateio/eventuateio-local-kafka:0.14.0'
}
}
stage('Cdcservice') {
agent any
steps {
sh 'docker run -d \
--name cdcservice \
--network=my-net \
-p 8099:8080 \
--link mysql \
--link kafka \
--link zookeeper \
-e SPRING_DATASOURCE_URL=jdbc:mysql://mysql/eventuate \
-e SPRING_DATASOURCE_USERNAME=mysqluser \
-e SPRING_DATASOURCE_PASSWORD=mysqlpw \
-e SPRING_DATASOURCE_DRIVER_CLASS_NAME=com.mysql.jdbc.Driver \
-e EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS=kafka:9092 \
-e EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING=zookeeper:2181 \
-e EVENTUATELOCAL_CDC_DB_USER_NAME=root \
-e EVENTUATELOCAL_CDC_DB_PASSWORD=rootpassword \
-e EVENTUATELOCAL_CDC_BINLOG_CLIENT_ID=1234567890 \
eventuateio/eventuate-tram-cdc-mysql-service:0.3.0.RELEASE'
}
}
}
}