Skip to content

Commit 1dc201f

Browse files
authored
[FLINK-34180] Migrate doc website from ververica to flink (#3028)
1 parent 86272bf commit 1dc201f

File tree

214 files changed

+15577
-5194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

214 files changed

+15577
-5194
lines changed

.github/workflows/build_docs.yml

Lines changed: 63 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,73 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
name: build_docs
17-
18-
# execute this docs build workflow automatically when new push happens in any branch
16+
name: "Build documentation"
17+
1918
on:
2019
push:
2120
paths:
2221
- 'docs/**'
23-
22+
branches:
23+
- master
24+
- release-*
25+
schedule:
26+
- cron: '0 0 * * *' # Deploy every day
27+
28+
concurrency:
29+
group: ${{ github.workflow }}-${{ github.ref }}
30+
cancel-in-progress: true
31+
2432
jobs:
25-
26-
build_docs_job:
33+
build-documentation:
34+
if: github.repository == 'apache/flink-cdc'
2735
runs-on: ubuntu-latest
28-
container: debian:buster-slim
29-
36+
strategy:
37+
max-parallel: 1
38+
matrix:
39+
branch:
40+
- master
41+
- release-3.0
42+
3043
steps:
31-
32-
- name: Prereqs
33-
env:
34-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35-
run: |
36-
apt-get update
37-
apt-get install -y git
38-
git clone "https://token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" .
39-
shell: bash
40-
41-
- name: Execute script to build our documentation and update pages
42-
env:
43-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44-
run: "docs/build_docs.sh"
45-
shell: bash
44+
- uses: actions/checkout@v3
45+
with:
46+
ref: ${{ matrix.branch }}
47+
48+
- name: Set branch environment variable
49+
run: |
50+
currentBranch=$(git branch --show-current)
51+
52+
echo "flink_branch=${currentBranch}" >> ${GITHUB_ENV}
53+
54+
if [ "${currentBranch}" = "master" ]; then
55+
echo "flink_alias=release-3.1" >> ${GITHUB_ENV}
56+
elif [ "${currentBranch}" = "release-3.0" ]; then
57+
echo "flink_alias=stable" >> ${GITHUB_ENV}
58+
fi
59+
60+
- name: Build documentation
61+
run: |
62+
docker run --rm --volume "$PWD:/root/flink-cdc" chesnay/flink-ci:java_8_11_17_21_maven_386 bash -c "cd /root/flink-cdc && chmod +x ./.github/workflows/docs.sh && ./.github/workflows/docs.sh"
63+
64+
- name: Upload documentation
65+
uses: burnett01/[email protected]
66+
with:
67+
switches: --archive --compress
68+
path: docs/target/
69+
remote_path: ${{ secrets.NIGHTLIES_RSYNC_PATH }}/flink/flink-cdc-docs-${{ env.flink_branch }}/
70+
remote_host: ${{ secrets.NIGHTLIES_RSYNC_HOST }}
71+
remote_port: ${{ secrets.NIGHTLIES_RSYNC_PORT }}
72+
remote_user: ${{ secrets.NIGHTLIES_RSYNC_USER }}
73+
remote_key: ${{ secrets.NIGHTLIES_RSYNC_KEY }}
74+
75+
- name: Upload documentation alias
76+
if: env.flink_alias != ''
77+
uses: burnett01/[email protected]
78+
with:
79+
switches: --archive --compress
80+
path: docs/target/
81+
remote_path: ${{ secrets.NIGHTLIES_RSYNC_PATH }}/flink/flink-cdc-docs-${{ env.flink_alias }}/
82+
remote_host: ${{ secrets.NIGHTLIES_RSYNC_HOST }}
83+
remote_port: ${{ secrets.NIGHTLIES_RSYNC_PORT }}
84+
remote_user: ${{ secrets.NIGHTLIES_RSYNC_USER }}
85+
remote_key: ${{ secrets.NIGHTLIES_RSYNC_KEY }}

.github/workflows/docs.sh

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/usr/bin/env bash
2+
################################################################################
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
################################################################################
19+
set -e
20+
21+
mvn --version
22+
java -version
23+
javadoc -J-version
24+
25+
# workaround for a git security patch
26+
git config --global --add safe.directory /root/flink-cdc
27+
git submodule update --init --recursive
28+
29+
HUGO_REPO=https://github.com/gohugoio/hugo/releases/download/v0.80.0/hugo_extended_0.80.0_Linux-64bit.tar.gz
30+
HUGO_ARTIFACT=hugo_extended_0.80.0_Linux-64bit.tar.gz
31+
if ! curl --fail -OL $HUGO_REPO ; then
32+
echo "Failed to download Hugo binary"
33+
exit 1
34+
fi
35+
tar -zxvf $HUGO_ARTIFACT
36+
37+
# Build the docs
38+
hugo --source docs
39+
40+
# generate docs into docs/target
41+
hugo -v --source docs --destination target
42+
if [ $? -ne 0 ]; then
43+
echo "Error building the docs"
44+
exit 1
45+
fi
46+
47+
# build Flink; required for Javadoc step
48+
mvn clean install -B -DskipTests -Dfast
49+
50+
# build java/scala docs
51+
mkdir -p docs/target/api
52+
mvn javadoc:aggregate -B \
53+
-DadditionalJOption="-Xdoclint:none --allow-script-in-comments" \
54+
-Dmaven.javadoc.failOnError=false \
55+
-Dcheckstyle.skip=true \
56+
-Dspotless.check.skip=true \
57+
-Denforcer.skip=true \
58+
-Dheader="<a href=\"http://flink.apache.org/\" target=\"_top\"><h1>Back to Flink Website</h1></a> <script>var _paq=window._paq=window._paq||[];_paq.push([\"disableCookies\"]),_paq.push([\"setDomains\",[\"*.flink.apache.org\",\"*.nightlies.apache.org/flink\"]]),_paq.push([\"trackPageView\"]),_paq.push([\"enableLinkTracking\"]),function(){var u=\"//matomo.privacy.apache.org/\";_paq.push([\"setTrackerUrl\",u+\"matomo.php\"]),_paq.push([\"setSiteId\",\"1\"]);var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s)}();</script>"
59+
mv target/site/apidocs docs/target/api/java

.github/workflows/flink_cdc.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,16 @@ on:
1919
branches:
2020
- master
2121
- release-*
22+
paths-ignore:
23+
- 'docs/**'
24+
- 'README.md'
2225
pull_request:
2326
branches:
2427
- master
2528
- release-*
29+
paths-ignore:
30+
- 'docs/**'
31+
- 'README.md'
2632

2733
concurrency:
2834
group: ${{ github.workflow }}-${{ github.ref }}

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "docs/themes/book"]
2+
path = docs/themes/book
3+
url = https://github.com/alex-shpak/hugo-book

.idea/vcs.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ This README is meant as a brief walkthrough on the core features of CDC Connecto
77

88
## Supported (Tested) Databases
99

10-
| Connector | Database | Driver |
11-
|------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|
12-
| [mongodb-cdc](docs/content/connectors/mongodb-cdc.md) | <li> [MongoDB](https://www.mongodb.com): 3.6, 4.x, 5.0, 6.0 | MongoDB Driver: 4.3.4 |
13-
| [mysql-cdc](docs/content/connectors/mysql-cdc.md) | <li> [MySQL](https://dev.mysql.com/doc): 5.6, 5.7, 8.0.x <li> [RDS MySQL](https://www.aliyun.com/product/rds/mysql): 5.6, 5.7, 8.0.x <li> [PolarDB MySQL](https://www.aliyun.com/product/polardb): 5.6, 5.7, 8.0.x <li> [Aurora MySQL](https://aws.amazon.com/cn/rds/aurora): 5.6, 5.7, 8.0.x <li> [MariaDB](https://mariadb.org): 10.x <li> [PolarDB X](https://github.com/ApsaraDB/galaxysql): 2.0.1 | JDBC Driver: 8.0.28 |
14-
| [oceanbase-cdc](/docs/content/connectors/oceanbase-cdc.md) | <li> [OceanBase CE](https://open.oceanbase.com): 3.1.x, 4.x <li> [OceanBase EE](https://www.oceanbase.com/product/oceanbase): 2.x, 3.x, 4.x | OceanBase Driver: 2.4.x |
15-
| [oracle-cdc](docs/content/connectors/oracle-cdc.md) | <li> [Oracle](https://www.oracle.com/index.html): 11, 12, 19, 21 | Oracle Driver: 19.3.0.0 |
16-
| [postgres-cdc](docs/content/connectors/postgres-cdc.md) | <li> [PostgreSQL](https://www.postgresql.org): 9.6, 10, 11, 12, 13, 14 | JDBC Driver: 42.5.1 |
17-
| [sqlserver-cdc](docs/content/connectors/sqlserver-cdc.md) | <li> [Sqlserver](https://www.microsoft.com/sql-server): 2012, 2014, 2016, 2017, 2019 | JDBC Driver: 9.4.1.jre8 |
18-
| [tidb-cdc](docs/content/connectors/tidb-cdc.md) | <li> [TiDB](https://www.pingcap.com): 5.1.x, 5.2.x, 5.3.x, 5.4.x, 6.0.0 | JDBC Driver: 8.0.27 |
19-
| [Db2-cdc](docs/content/connectors/db2-cdc.md) | <li> [Db2](https://www.ibm.com/products/db2): 11.5 | Db2 Driver: 11.5.0.0 |
20-
| [Vitess-cdc](docs/content/connectors/vitess-cdc.md) | <li> [Vitess](https://vitess.io/): 8.0.x, 9.0.x | MySql JDBC Driver: 8.0.26 |
10+
| Connector | Database | Driver |
11+
|-------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|
12+
| [mongodb-cdc](docs/content/docs/connectors/cdc-connectors/mongodb-cdc.md) | <li> [MongoDB](https://www.mongodb.com): 3.6, 4.x, 5.0, 6.0 | MongoDB Driver: 4.3.4 |
13+
| [mysql-cdc](docs/content/docs/connectors/cdc-connectors/mysql-cdc.md) | <li> [MySQL](https://dev.mysql.com/doc): 5.6, 5.7, 8.0.x <li> [RDS MySQL](https://www.aliyun.com/product/rds/mysql): 5.6, 5.7, 8.0.x <li> [PolarDB MySQL](https://www.aliyun.com/product/polardb): 5.6, 5.7, 8.0.x <li> [Aurora MySQL](https://aws.amazon.com/cn/rds/aurora): 5.6, 5.7, 8.0.x <li> [MariaDB](https://mariadb.org): 10.x <li> [PolarDB X](https://github.com/ApsaraDB/galaxysql): 2.0.1 | JDBC Driver: 8.0.28 |
14+
| [oceanbase-cdc](docs/content/docs/connectors/cdc-connectors/oceanbase-cdc.md) | <li> [OceanBase CE](https://open.oceanbase.com): 3.1.x, 4.x <li> [OceanBase EE](https://www.oceanbase.com/product/oceanbase): 2.x, 3.x, 4.x | OceanBase Driver: 2.4.x |
15+
| [oracle-cdc](docs/content/docs/connectors/cdc-connectors/oracle-cdc.md) | <li> [Oracle](https://www.oracle.com/index.html): 11, 12, 19, 21 | Oracle Driver: 19.3.0.0 |
16+
| [postgres-cdc](docs/content/docs/connectors/cdc-connectors/postgres-cdc.md) | <li> [PostgreSQL](https://www.postgresql.org): 9.6, 10, 11, 12, 13, 14 | JDBC Driver: 42.5.1 |
17+
| [sqlserver-cdc](docs/content/docs/connectors/cdc-connectors/sqlserver-cdc.md) | <li> [Sqlserver](https://www.microsoft.com/sql-server): 2012, 2014, 2016, 2017, 2019 | JDBC Driver: 9.4.1.jre8 |
18+
| [tidb-cdc](docs/content/docs/connectors/cdc-connectors/tidb-cdc.md) | <li> [TiDB](https://www.pingcap.com): 5.1.x, 5.2.x, 5.3.x, 5.4.x, 6.0.0 | JDBC Driver: 8.0.27 |
19+
| [Db2-cdc](docs/content/docs/connectors/cdc-connectors/db2-cdc.md) | <li> [Db2](https://www.ibm.com/products/db2): 11.5 | Db2 Driver: 11.5.0.0 |
20+
| [Vitess-cdc](docs/content/docs/connectors/cdc-connectors/vitess-cdc.md) | <li> [Vitess](https://vitess.io/): 8.0.x, 9.0.x | MySql JDBC Driver: 8.0.26 |
2121

2222
## Features
2323

@@ -106,10 +106,10 @@ Include following Maven dependency (available through Maven Central):
106106

107107
```
108108
<dependency>
109-
<groupId>com.ververica</groupId>
109+
<groupId>org.apache.flink</groupId>
110110
<!-- add the dependency matching your database -->
111111
<artifactId>flink-connector-mysql-cdc</artifactId>
112-
<!-- The dependency is available only for stable releases, SNAPSHOT dependencies need to be built based on master or release- branches by yourself. -->
112+
<!-- The dependency is available only for stable releases, SNAPSHOT dependencies need to be built based on master or release branches by yourself. -->
113113
<version>2.5-SNAPSHOT</version>
114114
</dependency>
115115
```

docs/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.bundle/
2+
.jekyll-metadata
3+
.jekyll-cache/
4+
.rubydeps/
5+
ruby2/.bundle/
6+
ruby2/.rubydeps/
7+
public/
8+
resources/
9+
.hugo_build.lock
10+
.DS_Store

docs/Dockerfile

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/Makefile

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)