Skip to content

Commit

Permalink
ARROW-7834: [Release] Post release task for updating the documentations
Browse files Browse the repository at this point in the history
Generate prose and apidocs and update arrow-site's asf-site branch as a post-release task.

Closes #6407 from kszucs/release-docs and squashes the following commits:

bfb9c54 <Krisztián Szűcs> fix review comments
b34729f <Krisztián Szűcs> post release script for updating docs

Authored-by: Krisztián Szűcs <szucs.krisztian@gmail.com>
Signed-off-by: Krisztián Szűcs <szucs.krisztian@gmail.com>
  • Loading branch information
kszucs committed Feb 13, 2020
1 parent 5099450 commit 66185d6
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 15 deletions.
28 changes: 24 additions & 4 deletions ci/docker/linux-apt-docs.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,38 @@
ARG base
FROM ${base}

ARG r=3.6
ARG jdk=8
RUN apt-get update -y -q && \
apt-get install -y -q --no-install-recommends \

RUN apt-get update -y && \
apt-get install -y \
dirmngr \
apt-transport-https \
software-properties-common && \
apt-key adv \
--keyserver keyserver.ubuntu.com \
--recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 && \
add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu '$(lsb_release -cs)'-cran35/' && \
apt-get install -y \
autoconf-archive \
automake \
doxygen \
gobject-introspection \
gtk-doc-tools \
libcurl4-openssl-dev \
libgirepository1.0-dev \
libglib2.0-doc \
libtool \
libxml2-dev \
ninja-build \
openjdk-${jdk}-jdk-headless \
ruby-dev \
rsync && \
pandoc \
r-base=${r}* \
rsync \
ruby-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

ENV JAVA_HOME=/usr/lib/jvm/java-${jdk}-openjdk-amd64

ARG maven=3.5.4
Expand All @@ -58,6 +73,11 @@ COPY c_glib/Gemfile /arrow/c_glib/
RUN gem install bundler && \
bundle install --gemfile /arrow/c_glib/Gemfile

COPY ci/scripts/r_deps.sh /arrow/ci/scripts/
COPY r/DESCRIPTION /arrow/r/
RUN /arrow/ci/scripts/r_deps.sh /arrow && \
R -e "install.packages('pkgdown')"

ENV ARROW_PYTHON=ON \
ARROW_BUILD_STATIC=OFF \
ARROW_BUILD_TESTS=OFF \
Expand Down
15 changes: 9 additions & 6 deletions ci/scripts/docs_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,19 @@ export CFLAGS="-DARROW_NO_DEPRECATED_API"
export CXXFLAGS="-DARROW_NO_DEPRECATED_API"

# Prose and Python
sphinx-build -b html ${arrow_dir}/docs/source ${build_dir}/sphinx
sphinx-build -b html ${arrow_dir}/docs/source ${build_dir}

# C++
rsync -a --delete ${arrow_dir}/cpp/apidoc/* ${build_dir}/cpp
# C++ - original doxygen
# rsync -a ${arrow_dir}/cpp/apidoc/ ${build_dir}/cpp

# R
rsync -a ${arrow_dir}/r/docs/ ${build_dir}/r

# C GLib
rsync -a --delete ${ARROW_HOME}/share/gtk-doc/html/* ${build_dir}/c_glib
rsync -a ${ARROW_HOME}/share/gtk-doc/html/ ${build_dir}/c_glib

# Java
rsync -a --delete ${arrow_dir}/java/target/site/apidocs ${build_dir}/java
rsync -a ${arrow_dir}/java/target/site/apidocs/ ${build_dir}/java

# Javascript
rsync -a --delete ${arrow_dir}/js/doc ${build_dir}/js
rsync -a ${arrow_dir}/js/doc/ ${build_dir}/js
33 changes: 33 additions & 0 deletions ci/scripts/r_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/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.

set -ex

: ${R_BIN:=R}
source_dir=${1}/r
with_docs=${2:-false}

pushd ${source_dir}

${R_BIN} CMD INSTALL .

if [ "${with_docs}" == "true" ]; then
${R_BIN} -e "pkgdown::build_site(install = FALSE)"
fi

popd
8 changes: 3 additions & 5 deletions dev/release/post-03-website.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

set -e
set -u

SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ARROW_DIR="${SOURCE_DIR}/../.."
ARROW_SITE_DIR="${SOURCE_DIR}/../../../arrow-site"
ARROW_SITE_DIR="${ARROW_DIR}/../arrow-site"

if [ "$#" -ne 2 ]; then
echo "Usage: $0 <previous-version> <version>"
Expand Down Expand Up @@ -258,9 +258,7 @@ github_url=$(git remote get-url origin | \
-e 's,\.git$,,')

echo "Success!"
echo "1. Open a JIRA issue:"
echo " https://issues.apache.org/jira/projects/ARROW/issues/"
echo "2. Create a pull request:"
echo "Create a pull request:"
echo " ${github_url}/pull/new/${branch_name}"

popd
56 changes: 56 additions & 0 deletions dev/release/post-09-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/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.

set -e
set -u

SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ARROW_DIR="${SOURCE_DIR}/../.."
ARROW_SITE_DIR="${ARROW_DIR}/../arrow-site"

if [ "$#" -ne 1 ]; then
echo "Usage: $0 <version>"
exit 1
fi

version=$1
branch_name=release-docs-${version}

pushd "${ARROW_SITE_DIR}"
git checkout asf-site
git checkout -b ${branch_name}
rm -rf docs/*
popd

pushd "${ARROW_DIR}"
docker-compose build ubuntu-cpp
docker-compose build ubuntu-python
docker-compose build ubuntu-docs
docker-compose run --rm -v "${ARROW_SITE_DIR}/docs:/build/docs" ubuntu-docs
popd

pushd "${ARROW_SITE_DIR}"
git add docs
git commit -m "[Website] Update documentations for ${version}"
git push -u origin ${branch_name}
popd

echo "Success!"
echo "Create a pull request:"
echo " ${github_url}/pull/new/${branch_name}"
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,7 @@ services:
/arrow/ci/scripts/python_build.sh /arrow /build &&
/arrow/ci/scripts/java_build.sh /arrow /build true &&
/arrow/ci/scripts/js_build.sh /arrow true &&
/arrow/ci/scripts/r_build.sh /arrow true &&
/arrow/ci/scripts/docs_build.sh /arrow /build"

################################# Tools #####################################
Expand Down

0 comments on commit 66185d6

Please sign in to comment.