Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions .github/workflows/flink_cdc_base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ on:
workflow_call:
inputs:
java-version:
description: "Jdk version to test against."
description: "Jdk versions to test against."
required: false
type: string
default: "8"
default: "['8']"
flink-version:
description: "Flink version to test against."
description: "Flink versions to test against."
required: false
type: string
default: "['generic']"
module:
description: "Flink CDC module to test against."
required: true
Expand Down Expand Up @@ -99,9 +100,12 @@ jobs:
compile_and_test:
runs-on: ubuntu-latest
timeout-minutes: 120
strategy:
matrix:
java-version: ${{ fromJSON(inputs.java-version) }}
flink-version: ${{ fromJSON(inputs.flink-version) }}
steps:
- run: echo "Running CI pipeline for JDK version ${{ inputs.java-version }}"

- run: echo "Running CI pipeline for JDK version ${{ matrix.java-version }}"
- name: Clean up disk space
run: |
set -euo pipefail
Expand All @@ -127,7 +131,7 @@ jobs:
- name: Set JDK
uses: actions/setup-java@v4
with:
java-version: ${{ inputs.java-version }}
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
cache: 'maven'

Expand Down Expand Up @@ -200,8 +204,8 @@ jobs:
build_maven_parameter="-DspecifiedMongoVersion=7.0.12"
fi

if [ ! -z "${{ inputs.flink-version }}" ]; then
build_maven_parameter="${build_maven_parameter:+$build_maven_parameter }-DspecifiedFlinkVersion=${{ inputs.flink-version }}"
if [ ! -z "${{ matrix.flink-version }}" ]; then
build_maven_parameter="${build_maven_parameter:+$build_maven_parameter }-DspecifiedFlinkVersion=${{ matrix.flink-version }}"
fi

build_maven_parameter="${build_maven_parameter:+$build_maven_parameter }${{ inputs.custom-maven-parameter }}"
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/flink_cdc_java_11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Flink CDC CI Nightly
on:
schedule:
- cron: '0 0 * * *' # Deploy every day
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.number || github.run_id }}
cancel-in-progress: true

jobs:
license_check:
name: License Check
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
submodules: true
- name: Set up Ruby environment
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: Set JDK
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: 'maven'
- name: Compiling jar packages
run: mvn --no-snapshot-updates -B package -DskipTests
- name: Run license check
run: gem install rubyzip -v 2.3.0 && ./tools/ci/license_check.rb
ut:
strategy:
matrix:
module: [ 'core', 'pipeline_connectors', 'mysql', 'postgres', 'oracle', 'mongodb6', 'mongodb7', 'sqlserver', 'tidb', 'oceanbase', 'db2', 'vitess' ]
name: Unit Tests
uses: ./.github/workflows/flink_cdc_base.yml
with:
java-version: "[11]"
module: ${{ matrix.module }}
pipeline_e2e:
name: Pipeline E2E Tests
uses: ./.github/workflows/flink_cdc_base.yml
with:
java-version: "[11]"
flink-version: "['1.19.1', '1.20.0']"
module: pipeline_e2e
source_e2e:
name: Source E2E Tests
uses: ./.github/workflows/flink_cdc_base.yml
with:
java-version: "[11]"
flink-version: "['1.19.1', '1.20.0']"
module: source_e2e
migration_test:
name: Migration Tests
uses: ./.github/workflows/flink_cdc_migration_test_base.yml
with:
java-version: "[11]"
flink-version: "['1.19.1', '1.20.0']"
Original file line number Diff line number Diff line change
Expand Up @@ -60,37 +60,29 @@ jobs:
ut:
strategy:
matrix:
java-version: [ '8' ]
module: [ 'core', 'pipeline_connectors', 'mysql', 'postgres', 'oracle', 'mongodb6', 'mongodb7', 'sqlserver', 'tidb', 'oceanbase', 'db2', 'vitess' ]
name: Unit Tests
uses: ./.github/workflows/flink_cdc_base.yml
with:
java-version: ${{ matrix.java-version }}
java-version: "[8]"
module: ${{ matrix.module }}
pipeline_e2e:
strategy:
matrix:
java-version: [ '8' ]
flink-version: ['1.19.1', '1.20.0']
module: [ 'pipeline_e2e' ]
name: Pipeline E2E Tests
uses: ./.github/workflows/flink_cdc_base.yml
with:
java-version: ${{ matrix.java-version }}
flink-version: ${{ matrix.flink-version }}
module: ${{ matrix.module }}
java-version: "[8]"
flink-version: "['1.19.1', '1.20.0']"
module: pipeline_e2e
source_e2e:
strategy:
matrix:
java-version: [ '8' ]
flink-version: ['1.19.1', '1.20.0']
module: [ 'source_e2e' ]
name: Source E2E Tests
uses: ./.github/workflows/flink_cdc_base.yml
with:
java-version: ${{ matrix.java-version }}
flink-version: ${{ matrix.flink-version }}
module: ${{ matrix.module }}
java-version: "[8]"
flink-version: "['1.19.1', '1.20.0']"
module: source_e2e
migration_test:
name: Migration Tests
uses: ./.github/workflows/flink_cdc_migration_test.yml
uses: ./.github/workflows/flink_cdc_migration_test_base.yml
with:
java-version: "[8]"
flink-version: "['1.19.1', '1.20.0']"
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,32 @@ name: Migration Tests

on:
workflow_call:
inputs:
java-version:
description: "Jdk versions to test against, passed as a JSON array string."
required: false
type: string
default: "['8']"
flink-version:
description: "Flink versions to test against, passed as a JSON array string."
required: true
type: string

jobs:
migration_test_ut:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: ${{ fromJSON(inputs.java-version) }}
flink-version: ${{ fromJSON(inputs.flink-version) }}
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-java@v4
with:
java-version: 8
java-version: ${{ matrix.java-version }}
distribution: temurin
- name: Compile snapshot CDC version
run: mvn --no-snapshot-updates -B install -DskipTests
Expand All @@ -39,8 +53,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
flink-version: [ '1.19.1', '1.20.0' ]

java-version: ${{ fromJSON(inputs.java-version) }}
flink-version: ${{ fromJSON(inputs.flink-version) }}
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
Expand All @@ -50,7 +64,7 @@ jobs:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- uses: actions/setup-java@v4
with:
java-version: 8
java-version: ${{ matrix.java-version }}
distribution: temurin
cache: maven
- name: Install dependencies
Expand Down Expand Up @@ -78,6 +92,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: ${{ fromJSON(inputs.java-version) }}
flink-version: [ '1.19.1', '1.20.0' ]

steps:
Expand All @@ -89,7 +104,7 @@ jobs:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- uses: actions/setup-java@v4
with:
java-version: 8
java-version: ${{ matrix.java-version }}
distribution: temurin
cache: maven
- name: Install dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ limitations under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven.shade.plugin.version}</version>
<executions>
<execution>
<id>shade-flink</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ limitations under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>${maven.shade.plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
Expand All @@ -245,15 +245,6 @@ limitations under the License.
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ limitations under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.1</version>
<version>${maven.shade.plugin.version}</version>
<executions>
<execution>
<id>shade-flink</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ limitations under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>${maven.shade.plugin.version}</version>
<executions>
<execution>
<id>shade-flink</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ limitations under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.1</version>
<version>${maven.shade.plugin.version}</version>
<executions>
<execution>
<id>shade-flink</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ limitations under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.1</version>
<version>${maven.shade.plugin.version}</version>
<executions>
<execution>
<id>shade-flink</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ limitations under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.1</version>
<version>${maven.shade.plugin.version}</version>
<executions>
<execution>
<id>shade-flink</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ limitations under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>${maven.shade.plugin.version}</version>
<executions>
<execution>
<id>shade-flink</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ limitations under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>${maven.shade.plugin.version}</version>
<executions>
<execution>
<id>shade-flink</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ limitations under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>${maven.shade.plugin.version}</version>
<executions>
<execution>
<id>shade-flink</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ limitations under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>${maven.shade.plugin.version}</version>
<executions>
<execution>
<id>shade-flink</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ limitations under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>${maven.shade.plugin.version}</version>
<executions>
<execution>
<id>shade-flink</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ limitations under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>${maven.shade.plugin.version}</version>
<executions>
<execution>
<id>shade-flink</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ limitations under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>${maven.shade.plugin.version}</version>
<executions>
<execution>
<id>shade-flink</id>
Expand Down
Loading