-
Notifications
You must be signed in to change notification settings - Fork 27
141 lines (129 loc) · 4.58 KB
/
Copy pathbackfill-ci.yaml
File metadata and controls
141 lines (129 loc) · 4.58 KB
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
132
133
134
135
136
137
138
139
140
141
name: Backfill CI
on:
pull_request:
branches:
- master
push:
branches:
- master
paths-ignore:
- 'docs/**'
- 'kubernetes/**'
- '**.md'
- 'grafana/**'
- 'prometheus/**'
# cancel same workflows in progress for pull request branches
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 90
name: Build
steps:
- uses: actions/checkout@v6
- name: Build project
env:
DSE_REPO_USERNAME: ${{ secrets.DSE_REPO_USERNAME }}
DSE_REPO_PASSWORD: ${{ secrets.DSE_REPO_PASSWORD }}
MAVEN_OPTS: "-Xmx2g -XX:MaxMetaspaceSize=512m" # PHASE 1: Limit JVM memory
GRADLE_OPTS: "-Xmx2g -Dorg.gradle.daemon=false" # PHASE 1: Limit Gradle memory
run: |
./gradlew -PdseRepoUsername=$DSE_REPO_USERNAME -PdseRepoPassword=$DSE_REPO_PASSWORD \
backfill-cli:build
test:
needs: build
name: Test Backfill CLI
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
jdk: ['11'] # TODO: Enable java 17 tests https://issues.apache.org/jira/browse/CASSANDRA-16895
pulsarImage: ['datastax/lunastreaming:2.10_3.4', 'apachepulsar/pulsar:2.10.3', 'apachepulsar/pulsar:2.11.0']
cassandraFamily: ['c3', 'c4', 'dse4']
steps:
- uses: actions/checkout@v6
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.jdk }}
distribution: 'adopt'
- name: Get project version
uses: HardNorth/github-version-generate@v1.4.1
with:
version-source: file
version-file: gradle.properties
version-file-extraction-pattern: '(?<=version=).+'
- name: Cache Docker layers
uses: actions/cache@v5
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Test with Gradle
env:
DSE_REPO_USERNAME: ${{ secrets.DSE_REPO_USERNAME }}
DSE_REPO_PASSWORD: ${{ secrets.DSE_REPO_PASSWORD }}
MAVEN_OPTS: "-Xmx2g -XX:MaxMetaspaceSize=512m" # PHASE 1: Limit JVM memory
GRADLE_OPTS: "-Xmx2g -Dorg.gradle.daemon=false" # PHASE 1: Limit Gradle memory
run: |
set -e
PREV_IFS=$IFS
IFS=':'
read -ra PULSAR_FULL_IMAGE <<< "${{ matrix.pulsarImage }}"
IFS=$PREV_IFS
PULSAR_IMAGE=${PULSAR_FULL_IMAGE[0]}
PULSAR_IMAGE_TAG=${PULSAR_FULL_IMAGE[1]}
./gradlew -Pdse4 -PdseRepoUsername=$DSE_REPO_USERNAME -PdseRepoPassword=$DSE_REPO_PASSWORD \
-Papi.version=1.43 \
-PtestPulsarImage=$PULSAR_IMAGE \
-PtestPulsarImageTag=$PULSAR_IMAGE_TAG \
-PcassandraFamily=${{ matrix.cassandraFamily }} \
backfill-cli:e2eTest
test-kafka:
needs: build
name: Test Backfill CLI (Kafka)
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
jdk: ['11']
kafkaImage: ['confluentinc/cp-kafka:7.8.8', 'confluentinc/cp-kafka:7.9.7', 'confluentinc/cp-kafka:8.1.3']
cassandraFamily: ['c3', 'c4', 'dse4']
steps:
- uses: actions/checkout@v6
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.jdk }}
distribution: 'adopt'
- name: Get project version
uses: HardNorth/github-version-generate@v1.4.1
with:
version-source: file
version-file: gradle.properties
version-file-extraction-pattern: '(?<=version=).+'
- name: Cache Docker layers
uses: actions/cache@v5
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Test with Gradle
env:
DSE_REPO_USERNAME: ${{ secrets.DSE_REPO_USERNAME }}
DSE_REPO_PASSWORD: ${{ secrets.DSE_REPO_PASSWORD }}
MAVEN_OPTS: "-Xmx2g -XX:MaxMetaspaceSize=512m"
GRADLE_OPTS: "-Xmx2g -Dorg.gradle.daemon=false"
run: |
set -e
./gradlew -Pdse4 -PdseRepoUsername=$DSE_REPO_USERNAME -PdseRepoPassword=$DSE_REPO_PASSWORD \
-Papi.version=1.43 \
-PkafkaImage=${{ matrix.kafkaImage }} \
-PcassandraFamily=${{ matrix.cassandraFamily }} \
backfill-cli:e2eTestKafka