Skip to content

Commit 005af8d

Browse files
committed
Update github actions
1 parent b830e11 commit 005af8d

File tree

8 files changed

+108
-59
lines changed

8 files changed

+108
-59
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: CI
22
on:
33
pull_request:
4+
paths-ignore:
5+
- "docs/**"
6+
- "samples/**"
7+
- "**.md"
48
push:
59
branches:
610
- trunk
@@ -15,5 +19,5 @@ jobs:
1519
name: Tests (CI)
1620
uses: ./.github/workflows/tests.yml
1721
with:
18-
image: ${{ fromJSON(vars.KURRENTDB_DOCKER_IMAGES).ci.fullname }}
22+
runtime: ci
1923
secrets: inherit
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Load KurrentDB Runtime Configuration
2+
on:
3+
workflow_call:
4+
inputs:
5+
runtime:
6+
description: "The runtime's name. Current options are: `ci`, `previous-lts`, `latest`"
7+
type: string
8+
9+
outputs:
10+
runtime:
11+
description: The runtime's name
12+
value: ${{ inputs.runtime }}
13+
14+
registry:
15+
description: The Docker registry
16+
value: ${{ jobs.load.outputs.registry }}
17+
18+
image:
19+
description: The Docker image
20+
value: ${{ jobs.load.outputs.image }}
21+
22+
tag:
23+
description: The Docker image tag
24+
value: ${{ jobs.load.outputs.tag }}
25+
26+
full_image_name:
27+
description: The full Docker image name (including registry, image, and tag)
28+
value: ${{ jobs.load.outputs.full_image_name }}
29+
30+
jobs:
31+
load:
32+
runs-on: ubuntu-latest
33+
outputs:
34+
registry: ${{ steps.set.outputs.registry }}
35+
image: ${{ steps.set.outputs.image }}
36+
tag: ${{ steps.set.outputs.tag }}
37+
full_image_name: ${{ steps.set.outputs.full_image_name }}
38+
39+
steps:
40+
- name: Set KurrentDB Runtime Configuration Properties
41+
id: set
42+
run: |
43+
echo "registry=${{ fromJSON(vars.KURRENTDB_DOCKER_IMAGES)[inputs.runtime].registry }}" >> $GITHUB_OUTPUT
44+
echo "tag=${{ fromJSON(vars.KURRENTDB_DOCKER_IMAGES)[inputs.runtime].tag }}" >> $GITHUB_OUTPUT
45+
echo "image=${{ fromJSON(vars.KURRENTDB_DOCKER_IMAGES)[inputs.runtime].image }}" >> $GITHUB_OUTPUT
46+
echo "full_image_name=${{ fromJSON(vars.KURRENTDB_DOCKER_IMAGES)[inputs.runtime].fullname }}" >> $GITHUB_OUTPUT

.github/workflows/lts.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: LTS
22
on:
33
pull_request:
4+
paths-ignore:
5+
- "docs/**"
6+
- "samples/**"
7+
- "**.md"
48
push:
59
branches:
610
- trunk
@@ -15,7 +19,7 @@ jobs:
1519
name: Tests (LTS)
1620
uses: ./.github/workflows/tests.yml
1721
with:
18-
image: ${{ fromJSON(vars.KURRENTDB_DOCKER_IMAGES).lts.fullname }}
22+
runtime: lts
1923
secrets: inherit
2024

2125
# Will be removed in the future
@@ -24,5 +28,7 @@ jobs:
2428

2529
uses: ./.github/workflows/plugins-tests.yml
2630
with:
27-
image: "docker.eventstore.com/eventstore-ee/eventstoredb-commercial:24.2.0-jammy"
31+
registry: docker.eventstore.com/eventstore-ee
32+
image: eventstoredb-commercial
33+
tag: 24.2.0-jammy
2834
secrets: inherit

.github/workflows/plugins-tests.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ name: enterprise plugins tests workflow
33
on:
44
workflow_call:
55
inputs:
6+
registry:
7+
required: true
8+
type: string
69
image:
710
required: true
811
type: string
12+
tag:
13+
required: true
14+
type: string
915

1016
jobs:
1117
single_node:
@@ -46,7 +52,7 @@ jobs:
4652
- name: Execute Gradle build
4753
run: ./gradlew ci --tests ${{ matrix.test }}Tests
4854
env:
49-
KURRENTDB_IMAGE: ${{ inputs.image }}
55+
KURRENTDB_IMAGE: ${{inputs.registry}}/${{ inputs.image }}:${{ inputs.tag }}
5056
SECURE: true
5157

5258
- uses: actions/upload-artifact@v4
@@ -81,7 +87,9 @@ jobs:
8187
- name: Set up cluster with Docker Compose
8288
run: docker compose up -d
8389
env:
84-
KURRENTDB_IMAGE: ${{ inputs.image }}
90+
KURRENTDB_DOCKER_REGISTRY: ${{ inputs.registry }}
91+
KURRENTDB_DOCKER_IMAGE: ${{ inputs.image }}
92+
KURRENTDB_DOCKER_TAG: ${{ inputs.tag }}
8593

8694
- name: Generate user certificates
8795
run: docker compose --file configure-user-certs-for-tests.yml up

.github/workflows/previous-lts.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Previous LTS
22
on:
33
pull_request:
4+
paths-ignore:
5+
- "docs/**"
6+
- "samples/**"
7+
- "**.md"
48
push:
59
branches:
610
- trunk
@@ -15,5 +19,5 @@ jobs:
1519
name: Tests (Previous LTS)
1620
uses: ./.github/workflows/tests.yml
1721
with:
18-
image: ${{ fromJSON(vars.KURRENTDB_DOCKER_IMAGES)['previous-lts'].fullname }}
22+
runtime: previous-lts
1923
secrets: inherit

.github/workflows/tests.yml

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
name: tests workflow
22

33
on:
4-
pull_request:
5-
paths-ignore:
6-
- "docs/**"
7-
- "samples/**"
8-
- "**.md"
9-
104
workflow_call:
115
inputs:
12-
image:
6+
runtime:
137
required: true
148
type: string
159

1610
jobs:
11+
load_configuration:
12+
uses: ./.github/workflows/load-configuration.yml
13+
with:
14+
runtime: ${{ inputs.runtime }}
15+
1716
single_node:
17+
needs: load_configuration
1818
name: Single node
1919

2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
test: [Streams, PersistentSubscriptions, Telemetry]
23+
test: [Streams, PersistentSubscriptions, Telemetry, MultiStreamAppend]
2424

2525
runs-on: ubuntu-latest
2626
steps:
@@ -47,16 +47,10 @@ jobs:
4747
- name: Execute Gradle build
4848
run: ./gradlew ci --tests ${{ matrix.test }}Tests
4949
env:
50-
KURRENTDB_IMAGE: ${{ inputs.image }}
51-
52-
- uses: actions/upload-artifact@v4
53-
if: failure()
54-
with:
55-
name: esdb_logs.tar.gz
56-
path: /tmp/esdb_logs.tar.gz
57-
if-no-files-found: error
50+
KURRENTDB_IMAGE: ${{ needs.load_configuration.outputs.full_image_name }}
5851

5952
secure:
53+
needs: load_configuration
6054
name: Secure
6155

6256
strategy:
@@ -92,7 +86,7 @@ jobs:
9286
- name: Execute Gradle build
9387
run: ./gradlew ci --tests ${{ matrix.test }}Tests
9488
env:
95-
KURRENTDB_IMAGE: ${{ inputs.image }}
89+
KURRENTDB_IMAGE: ${{ needs.load_configuration.outputs.full_image_name }}
9690
SECURE: true
9791

9892
- uses: actions/upload-artifact@v4
@@ -102,12 +96,13 @@ jobs:
10296
path: /tmp/esdb_logs.tar.gz
10397

10498
cluster:
99+
needs: load_configuration
105100
name: Cluster
106101

107102
strategy:
108103
fail-fast: false
109104
matrix:
110-
test: [Streams, PersistentSubscriptions]
105+
test: [Streams, PersistentSubscriptions, MultiStreamAppend]
111106

112107
runs-on: ubuntu-latest
113108
steps:
@@ -123,7 +118,9 @@ jobs:
123118
- name: Set up cluster with Docker Compose
124119
run: docker compose up -d
125120
env:
126-
KURRENTDB_IMAGE: ${{ inputs.image }}
121+
KURRENTDB_DOCKER_REGISTRY: ${{ needs.load_configuration.outputs.registry }}
122+
KURRENTDB_DOCKER_IMAGE: ${{ needs.load_configuration.outputs.image }}
123+
KURRENTDB_DOCKER_TAG: ${{ needs.load_configuration.outputs.tag }}
127124

128125
- name: Set up JDK 8
129126
uses: actions/setup-java@v3

docker-compose.yml

Lines changed: 15 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: "3.5"
2-
31
services:
42
volumes-provisioner:
53
image: hasnat/volumes-provisioner
@@ -26,71 +24,57 @@ services:
2624
- volumes-provisioner
2725

2826
esdb-node1: &template
29-
image: ${KURRENTDB_IMAGE:-docker.kurrent.io/eventstore/eventstoredb-ee:lts}
27+
image: ${KURRENTDB_DOCKER_REGISTRY:-docker.kurrent.io/eventstore}/${KURRENTDB_DOCKER_IMAGE:-eventstoredb-ee}:${KURRENTDB_DOCKER_TAG:-lts}
3028
env_file:
3129
- vars.env
3230
environment:
3331
- EVENTSTORE_GOSSIP_SEED=172.30.240.12:2113,172.30.240.13:2113
34-
- EVENTSTORE_INT_IP=172.30.240.11
35-
- EVENTSTORE_CERTIFICATE_FILE=/etc/eventstore/certs/node1/node.crt
36-
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/eventstore/certs/node1/node.key
37-
- EVENTSTORE_ADVERTISE_HTTP_PORT_TO_CLIENT_AS=2111
32+
- EVENTSTORE_REPLICATION_IP=172.30.240.11
33+
- EVENTSTORE_CERTIFICATE_FILE=/etc/kurrentdb/certs/node1/node.crt
34+
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/kurrentdb/certs/node1/node.key
35+
- EVENTSTORE_ADVERTISE_NODE_PORT_TO_CLIENT_AS=2111
3836
ports:
3937
- 2111:2113
4038
networks:
4139
clusternetwork:
4240
ipv4_address: 172.30.240.11
4341
volumes:
44-
- ./certs:/etc/eventstore/certs
42+
- ./certs:/etc/kurrentdb/certs
4543
restart: unless-stopped
4644
depends_on:
4745
- cert-gen
4846

4947
esdb-node2:
5048
<<: *template
51-
env_file:
52-
- vars.env
5349
environment:
5450
- EVENTSTORE_GOSSIP_SEED=172.30.240.11:2113,172.30.240.13:2113
55-
- EVENTSTORE_INT_IP=172.30.240.12
56-
- EVENTSTORE_CERTIFICATE_FILE=/etc/eventstore/certs/node2/node.crt
57-
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/eventstore/certs/node2/node.key
58-
- EVENTSTORE_ADVERTISE_HTTP_PORT_TO_CLIENT_AS=2112
51+
- EVENTSTORE_REPLICATION_IP=172.30.240.12
52+
- EVENTSTORE_CERTIFICATE_FILE=/etc/kurrentdb/certs/node2/node.crt
53+
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/kurrentdb/certs/node2/node.key
54+
- EVENTSTORE_ADVERTISE_NODE_PORT_TO_CLIENT_AS=2112
5955
ports:
6056
- 2112:2113
6157
networks:
6258
clusternetwork:
6359
ipv4_address: 172.30.240.12
64-
volumes:
65-
- ./certs:/etc/eventstore/certs
66-
restart: unless-stopped
67-
depends_on:
68-
- cert-gen
6960

7061
esdb-node3:
7162
<<: *template
72-
env_file:
73-
- vars.env
7463
environment:
7564
- EVENTSTORE_GOSSIP_SEED=172.30.240.11:2113,172.30.240.12:2113
76-
- EVENTSTORE_INT_IP=172.30.240.13
77-
- EVENTSTORE_CERTIFICATE_FILE=/etc/eventstore/certs/node3/node.crt
78-
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/eventstore/certs/node3/node.key
79-
- EVENTSTORE_ADVERTISE_HTTP_PORT_TO_CLIENT_AS=2113
65+
- EVENTSTORE_REPLICATION_IP=172.30.240.13
66+
- EVENTSTORE_CERTIFICATE_FILE=/etc/kurrentdb/certs/node3/node.crt
67+
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/kurrentdb/certs/node3/node.key
68+
- EVENTSTORE_ADVERTISE_NODE_PORT_TO_CLIENT_AS=2113
8069
ports:
8170
- 2113:2113
8271
networks:
8372
clusternetwork:
8473
ipv4_address: 172.30.240.13
85-
volumes:
86-
- ./certs:/etc/eventstore/certs
87-
restart: unless-stopped
88-
depends_on:
89-
- cert-gen
9074

9175
networks:
9276
clusternetwork:
93-
name: eventstoredb.local
77+
name: kurrentdb.local
9478
driver: bridge
9579
ipam:
9680
driver: default

vars.env

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
EVENTSTORE_CLUSTER_SIZE=3
22
EVENTSTORE_RUN_PROJECTIONS=All
3-
EVENTSTORE_INT_TCP_PORT=1112
4-
EVENTSTORE_HTTP_PORT=2113
5-
EVENTSTORE_TRUSTED_ROOT_CERTIFICATES_PATH=/etc/eventstore/certs/ca
3+
EVENTSTORE_REPLICATION_PORT=1112
4+
EVENTSTORE_NODE_PORT=2113
5+
EVENTSTORE_TRUSTED_ROOT_CERTIFICATES_PATH=/etc/kurrentdb/certs/ca
66
EVENTSTORE_DISCOVER_VIA_DNS=false
77
EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP=true
88
EVENTSTORE_ADVERTISE_HOST_TO_CLIENT_AS=localhost

0 commit comments

Comments
 (0)