You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2022/03/15 12:48:05 UTC
[flink] branch experiment_gha_docs updated (27a330b -> 1b6f29c)
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a change to branch experiment_gha_docs
in repository https://gitbox.apache.org/repos/asf/flink.git.
from 27a330b add random file
new 5008078 reset
new 1b6f29c Try building docs
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.github/workflows/docs.yml | 19 ++++++-------
docs/ci.sh | 68 ++++++++++++++++++++++++++++++++++++++++++++++
docs/docker/Dockerfile | 4 +++
3 files changed, 81 insertions(+), 10 deletions(-)
create mode 100644 docs/ci.sh
create mode 100644 docs/docker/Dockerfile
[flink] 01/02: reset
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch experiment_gha_docs
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 500807809bd2815bcb9a19ed1ba31b50d98c96cb
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Tue Mar 15 11:03:08 2022 +0100
reset
---
.github/workflows/docs.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index cd46e1c..fead5cc 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -9,9 +9,9 @@ jobs:
- name: rsync
uses: burnett01/rsync-deployments@5.2
with:
- switches: --archive --verbose --compress --delete --exclude=*/ --exclude="*.html" --exclude="*.md" --exclude="*.ico" --exclude=y.txt
+ switches: --archive --verbose --compress
path: test/
- remote_path: ${{ secrets.NIGHTLIES_RSYNC_PATH }}
+ remote_path: ${{ secrets.NIGHTLIES_RSYNC_PATH }}/flink
remote_host: ${{ secrets.NIGHTLIES_RSYNC_HOST }}
remote_port: ${{ secrets.NIGHTLIES_RSYNC_PORT }}
remote_user: ${{ secrets.NIGHTLIES_RSYNC_USER }}
[flink] 02/02: Try building docs
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch experiment_gha_docs
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 1b6f29c994a161d4f23c43c1de89864e01ad8418
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Tue Mar 15 13:47:22 2022 +0100
Try building docs
---
.github/workflows/docs.yml | 19 ++++++-------
docs/ci.sh | 68 ++++++++++++++++++++++++++++++++++++++++++++++
docs/docker/Dockerfile | 4 +++
3 files changed, 81 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index fead5cc..5c8d3cf 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -6,13 +6,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- - name: rsync
- uses: burnett01/rsync-deployments@5.2
- with:
- switches: --archive --verbose --compress
- path: test/
- remote_path: ${{ secrets.NIGHTLIES_RSYNC_PATH }}/flink
- remote_host: ${{ secrets.NIGHTLIES_RSYNC_HOST }}
- remote_port: ${{ secrets.NIGHTLIES_RSYNC_PORT }}
- remote_user: ${{ secrets.NIGHTLIES_RSYNC_USER }}
- remote_key: ${{ secrets.NIGHTLIES_RSYNC_KEY }}
\ No newline at end of file
+ - name: Build docker image
+ run: |
+ docker build -t docs docs/docker
+ - name: Build documentation
+ run: |
+ docker run --rm --volume "$PWD:/root/flink" -it docs bash -c "cd /root/flink && ./docs/ci.sh"
+ - name: Upload documentation
+ run: |
+ echo "success"
\ No newline at end of file
diff --git a/docs/ci.sh b/docs/ci.sh
new file mode 100644
index 0000000..4680159
--- /dev/null
+++ b/docs/ci.sh
@@ -0,0 +1,68 @@
+#!/usr/bin/env bash
+################################################################################
+# 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.
+################################################################################
+
+mvn --version
+java -version
+javadoc -J-version
+
+HUGO_REPO=https://github.com/gohugoio/hugo/releases/download/v0.80.0/hugo_extended_0.80.0_Linux-64bit.tar.gz
+HUGO_ARTIFACT=hugo_extended_0.80.0_Linux-64bit.tar.gz
+if ! curl --fail -OL $HUGO_REPO ; then
+ echo "Failed to download Hugo binary"
+ exit 1
+fi
+tar -zxvf $HUGO_ARTIFACT
+git submodule update --init --recursive
+# generate docs into docs/target
+./hugo -v --source docs --destination target
+if [ $? -ne 0 ]; then
+ echo "Error building the docs"
+ exit 1
+fi
+
+mvn clean install -B -DskipTests -Dfast -Pskip-webui-build
+
+mkdir -p docs/target/api
+mvn javadoc:aggregate -B \
+ -Paggregate-scaladoc \
+ -DadditionalJOption="-Xdoclint:none --allow-script-in-comments" \
+ -Dmaven.javadoc.failOnError=false \
+ -Dcheckstyle.skip=true \
+ -Dspotless.check.skip=true \
+ -Denforcer.skip=true \
+ -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.createEle [...]
+mv target/site/apidocs docs/target/api/java
+pushd flink-scala
+mvn scala:doc -B
+mv target/site/scaladocs ../docs/target/api/scala
+popd
+
+if [ -f ./flink-python/dev/lint-python.sh ]; then
+
+ # Just completely ignore sudo in conda.
+ unset SUDO_UID SUDO_GID SUDO_USER
+
+ # build python docs
+ # disable the gateway, because otherwise it tries to find FLINK_HOME to access Java classes
+ PYFLINK_GATEWAY_DISABLED=1 ./flink-python/dev/lint-python.sh -i "sphinx"
+
+ # move python docs
+ mv flink-python/docs/_build/html docs/target/api/python
+
+fi
\ No newline at end of file
diff --git a/docs/docker/Dockerfile b/docs/docker/Dockerfile
new file mode 100644
index 0000000..fc4cb0b
--- /dev/null
+++ b/docs/docker/Dockerfile
@@ -0,0 +1,4 @@
+FROM chesnay/flink-ci:base
+
+RUN update-alternatives --set javadoc /usr/lib/jvm/java-8-openjdk-amd64/bin/javadoc
+RUN apt-get install hugo