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
workspace:
base: /go/src
path: github.com/cortezaproject/corteza-server
kind: pipeline
name: docker image build
steps:
- name: unit-tests
image: cortezaproject/corteza-server-builder:latest
pull: always
environment:
CGO_ENABLED: 0
GOOS: linux
GOARCH: amd64
CI: circleci
commands:
- make test.unit
- name: corteza-server
image: plugins/docker
depends_on: [ "unit-tests" ]
settings:
repo: cortezaproject/corteza-server
auto_tag: true # generate tag names automatically based on git branch and git tag
dockerfile: Dockerfile.corteza-server
username: { from_secret: docker_hub_username }
password: { from_secret: docker_hub_password }
- name: corteza-server-system
image: plugins/docker
depends_on: [ "corteza-server" ]
settings:
repo: cortezaproject/corteza-server-system
auto_tag: true # generate tag names automatically based on git branch and git tag
dockerfile: Dockerfile.corteza-server-system
username: { from_secret: docker_hub_username }
password: { from_secret: docker_hub_password }
when:
ref: { include: [ "refs/tags/20??.*.*", "refs/heads/master" ] }
event: [ "push", "tag" ]
- name: corteza-server-compose
image: plugins/docker
depends_on: [ "corteza-server" ]
settings:
repo: cortezaproject/corteza-server-compose
auto_tag: true # generate tag names automatically based on git branch and git tag
dockerfile: Dockerfile.corteza-server-compose
username: { from_secret: docker_hub_username }
password: { from_secret: docker_hub_password }
when:
ref: { include: [ "refs/tags/20??.*.*", "refs/heads/master" ] }
event: [ "push", "tag" ]
- name: corteza-server-messaging
depends_on: [ "corteza-server" ]
image: plugins/docker
settings:
repo: cortezaproject/corteza-server-messaging
auto_tag: true # generate tag names automatically based on git branch and git tag
dockerfile: Dockerfile.corteza-server-messaging
username: { from_secret: docker_hub_username }
password: { from_secret: docker_hub_password }
when:
ref: { include: [ "refs/tags/20??.*.*", "refs/heads/master" ] }
event: [ "push", "tag" ]
trigger:
event:
# Pipeline will be executed from branch event,
# this ensures we do not run duplicates.
exclude: [ "pull_request" ]
---
workspace:
base: /go/src
path: github.com/cortezaproject/corteza-server
kind: pipeline
name: integration
steps:
- name: test
image: cortezaproject/corteza-server-builder:latest
pull: always
environment:
CGO_ENABLED: 0
GOOS: linux
GOARCH: amd64
CI: circleci
AUTH_OIDC_ENABLED: 0
AUTH_JWT_SECRET: FBjddkvwQib0d4usifnEGVr1bncuVeD7
SYSTEM_DB_DSN: corteza:corteza-pwd@tcp(corteza-db:3306)/corteza?collation=utf8mb4_general_ci
COMPOSE_DB_DSN: corteza:corteza-pwd@tcp(corteza-db:3306)/corteza?collation=utf8mb4_general_ci
MESSAGING_DB_DSN: corteza:corteza-pwd@tcp(corteza-db:3306)/corteza?collation=utf8mb4_general_ci
commands:
- wait-for-it.sh -t 60 --strict corteza-db:3306 -- echo "corteza-db is up"
- make test.coverprofile.all
- name: coverage
image: plugins/codecov
settings:
token: 628a7104-4ec8-46ef-a3a8-50b0c2507082
files:
- .cover.out
services:
- name: corteza-db
pull: always
image: percona:8.0
ports:
- 3306
environment:
MYSQL_ROOT_PASSWORD: bRxJ37sJ6Qu4
MYSQL_DATABASE: corteza
MYSQL_USER: corteza
MYSQL_PASSWORD: corteza-pwd
trigger:
event:
# Pipeline will be executed from branch event,
# this ensures we do not run duplicates.
exclude: [ "pull_request" ]