Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate API docs using Ubuntu Focal #274

Merged
merged 2 commits into from
Aug 12, 2022
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ found under the `API Reference` section of [https://gazebosim.org/docs](https://

## Main docs

The documentation in this repository is updated whenever the ign-webserver,
a private repository to Open Robotics, is deployed. The ign-webserver maintains a clone of this repository, and
serves the markdown pages to https://gazebosim.org.
The documentation in this repository is updated whenever the
[gazebosim-web-backend](https://github.com/gazebo-web/gazebosim-web-backend),
is deployed. The gazebosim-web-backend webserver maintains a clone of this repository, and serves the markdown pages to https://gazebosim.org/docs.

## Library docs

Expand Down
10 changes: 3 additions & 7 deletions tools/Dockerfile.acropolis
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@ RUN apt-get update \

ARG GZ_VERSION_PASSWORD
ARG GZ_VERSION_DATE

COPY s3.cfg /root/.s3cfg
ARG AWS_ACCESS_KEY
ARG AWS_SECRET_KEY

COPY scripts/install_common_deps.sh scripts/install_common_deps.sh
RUN scripts/install_common_deps.sh

# This is not strictly necessary, but makes things faster down the line.
COPY scripts/install_ign_deps.sh scripts/install_ign_deps.sh
RUN scripts/install_ign_deps.sh
RUN scripts/install_common_deps.sh $AWS_ACCESS_KEY $AWS_SECRET_KEY

COPY scripts/enable_gcc8.sh scripts/enable_gcc8.sh
RUN scripts/enable_gcc8.sh
Expand Down
6 changes: 3 additions & 3 deletions tools/Dockerfile.blueprint
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ RUN apt-get update \

ARG GZ_VERSION_PASSWORD
ARG GZ_VERSION_DATE

COPY s3.cfg /root/.s3cfg
ARG AWS_ACCESS_KEY
ARG AWS_SECRET_KEY

COPY scripts/install_common_deps.sh scripts/install_common_deps.sh
RUN scripts/install_common_deps.sh
RUN scripts/install_common_deps.sh $AWS_ACCESS_KEY $AWS_SECRET_KEY

COPY scripts/enable_gcc8.sh scripts/enable_gcc8.sh
RUN scripts/enable_gcc8.sh
Expand Down
22 changes: 10 additions & 12 deletions tools/Dockerfile.citadel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:bionic
FROM ubuntu:focal

ENV DEBIAN_FRONTEND=noninteractive

Expand All @@ -11,11 +11,11 @@ RUN apt-get update \

ARG GZ_VERSION_PASSWORD
ARG GZ_VERSION_DATE

COPY s3.cfg /root/.s3cfg
ARG AWS_ACCESS_KEY
ARG AWS_SECRET_KEY

COPY scripts/install_common_deps.sh scripts/install_common_deps.sh
RUN scripts/install_common_deps.sh
RUN scripts/install_common_deps.sh $AWS_ACCESS_KEY $AWS_SECRET_KEY

COPY scripts/enable_gcc8.sh scripts/enable_gcc8.sh
RUN scripts/enable_gcc8.sh
Expand All @@ -24,19 +24,17 @@ COPY scripts/build_gz.sh scripts/build_gz.sh

RUN echo ::endgroup::

# See https://github.com/gazebosim/docs/issues/53
# RUN scripts/build_gz.sh gazebosim gz-cmake ign-cmake2 n \
# $GZ_VERSION_DATE \
# $GZ_VERSION_PASSWORD; exit 0
RUN scripts/build_gz.sh gazebosim gz-cmake ign-cmake2 n \
$GZ_VERSION_DATE \
$GZ_VERSION_PASSWORD; exit 0

RUN scripts/build_gz.sh gazebosim gz-math ign-math6 y \
$GZ_VERSION_DATE \
$GZ_VERSION_PASSWORD; exit 0

# See https://github.com/gazebosim/docs/issues/53
# RUN scripts/build_gz.sh gazebosim gz-tools ign-tools1 n \
# $GZ_VERSION_DATE \
# $GZ_VERSION_PASSWORD; exit 0
RUN scripts/build_gz.sh gazebosim gz-tools ign-tools1 n \
$GZ_VERSION_DATE \
$GZ_VERSION_PASSWORD; exit 0

RUN scripts/build_gz.sh gazebosim gz-plugin ign-plugin1 y \
$GZ_VERSION_DATE \
Expand Down
20 changes: 9 additions & 11 deletions tools/Dockerfile.dome
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ RUN apt-get update \

ARG GZ_VERSION_PASSWORD
ARG GZ_VERSION_DATE

COPY s3.cfg /root/.s3cfg
ARG AWS_ACCESS_KEY
ARG AWS_SECRET_KEY

COPY scripts/install_common_deps.sh scripts/install_common_deps.sh
RUN scripts/install_common_deps.sh
RUN scripts/install_common_deps.sh $AWS_ACCESS_KEY $AWS_SECRET_KEY

COPY scripts/enable_gcc8.sh scripts/enable_gcc8.sh
RUN scripts/enable_gcc8.sh
Expand All @@ -24,19 +24,17 @@ COPY scripts/build_gz.sh scripts/build_gz.sh

RUN echo ::endgroup::

# See https://github.com/gazebosim/docs/issues/53
# RUN scripts/build_gz.sh gazebosim gz-cmake ign-cmake2 n \
# $GZ_VERSION_DATE \
# $GZ_VERSION_PASSWORD; exit 0
RUN scripts/build_gz.sh gazebosim gz-cmake ign-cmake2 n \
$GZ_VERSION_DATE \
$GZ_VERSION_PASSWORD; exit 0

RUN scripts/build_gz.sh gazebosim gz-math ign-math6 y \
$GZ_VERSION_DATE \
$GZ_VERSION_PASSWORD; exit 0

# See https://github.com/gazebosim/docs/issues/53
# RUN scripts/build_gz.sh gazebosim gz-tools ign-tools1 n \
# $GZ_VERSION_DATE \
# $GZ_VERSION_PASSWORD; exit 0
RUN scripts/build_gz.sh gazebosim gz-tools ign-tools1 n \
$GZ_VERSION_DATE \
$GZ_VERSION_PASSWORD; exit 0

RUN scripts/build_gz.sh gazebosim gz-plugin ign-plugin1 y \
$GZ_VERSION_DATE \
Expand Down
20 changes: 9 additions & 11 deletions tools/Dockerfile.edifice
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ RUN apt-get update \

ARG GZ_VERSION_PASSWORD
ARG GZ_VERSION_DATE

COPY s3.cfg /root/.s3cfg
ARG AWS_ACCESS_KEY
ARG AWS_SECRET_KEY

COPY scripts/install_common_deps.sh scripts/install_common_deps.sh
RUN scripts/install_common_deps.sh
RUN scripts/install_common_deps.sh $AWS_ACCESS_KEY $AWS_SECRET_KEY

COPY scripts/enable_gcc8.sh scripts/enable_gcc8.sh
RUN scripts/enable_gcc8.sh
Expand All @@ -24,19 +24,17 @@ COPY scripts/build_gz.sh scripts/build_gz.sh

RUN echo ::endgroup::

# See https://github.com/gazebosim/docs/issues/53
# RUN scripts/build_gz.sh gazebosim gz-cmake ign-cmake2 n \
# $GZ_VERSION_DATE \
# $GZ_VERSION_PASSWORD; exit 0
RUN scripts/build_gz.sh gazebosim gz-cmake ign-cmake2 n \
$GZ_VERSION_DATE \
$GZ_VERSION_PASSWORD; exit 0

RUN scripts/build_gz.sh gazebosim gz-math ign-math6 y \
$GZ_VERSION_DATE \
$GZ_VERSION_PASSWORD; exit 0

# See https://github.com/gazebosim/docs/issues/53
# RUN scripts/build_gz.sh gazebosim gz-tools ign-tools1 n \
# $GZ_VERSION_DATE \
# $GZ_VERSION_PASSWORD; exit 0
RUN scripts/build_gz.sh gazebosim gz-tools ign-tools1 n \
$GZ_VERSION_DATE \
$GZ_VERSION_PASSWORD; exit 0

RUN scripts/build_gz.sh gazebosim gz-plugin ign-plugin1 y \
$GZ_VERSION_DATE \
Expand Down
22 changes: 10 additions & 12 deletions tools/Dockerfile.fortress
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:bionic
FROM ubuntu:focal

ENV DEBIAN_FRONTEND=noninteractive

Expand All @@ -11,11 +11,11 @@ RUN apt-get update \

ARG GZ_VERSION_PASSWORD
ARG GZ_VERSION_DATE

COPY s3.cfg /root/.s3cfg
ARG AWS_ACCESS_KEY
ARG AWS_SECRET_KEY

COPY scripts/install_common_deps.sh scripts/install_common_deps.sh
RUN scripts/install_common_deps.sh
RUN scripts/install_common_deps.sh $AWS_ACCESS_KEY $AWS_SECRET_KEY

COPY scripts/enable_gcc8.sh scripts/enable_gcc8.sh
RUN scripts/enable_gcc8.sh
Expand All @@ -24,19 +24,17 @@ COPY scripts/build_gz.sh scripts/build_gz.sh

RUN echo ::endgroup::

# See https://github.com/gazebosim/docs/issues/53
# RUN scripts/build_gz.sh gazebosim gz-cmake ign-cmake2 n \
# $GZ_VERSION_DATE \
# $GZ_VERSION_PASSWORD; exit 0
RUN scripts/build_gz.sh gazebosim gz-cmake ign-cmake2 n \
$GZ_VERSION_DATE \
$GZ_VERSION_PASSWORD; exit 0

RUN scripts/build_gz.sh gazebosim gz-math ign-math6 y \
$GZ_VERSION_DATE \
$GZ_VERSION_PASSWORD; exit 0

# See https://github.com/gazebosim/docs/issues/53
# RUN scripts/build_gz.sh gazebosim gz-tools ign-tools1 n \
# $GZ_VERSION_DATE \
# $GZ_VERSION_PASSWORD; exit 0
RUN scripts/build_gz.sh gazebosim gz-tools ign-tools1 n \
$GZ_VERSION_DATE \
$GZ_VERSION_PASSWORD; exit 0

RUN scripts/build_gz.sh gazebosim gz-plugin ign-plugin1 y \
$GZ_VERSION_DATE \
Expand Down
23 changes: 9 additions & 14 deletions tools/build_docs.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/bin/bash
#
# Usage
# 1. Make sure you have the s3cmd tool configured. This script will use your
# ~/.s3cfg file to upload documentation.
# 1. Export the AWS keys using:
# export AWS_ACCESS_KEY=aws_access_key_value
# export AWS_SECRET_KEY=aws_secret_key_value
# 2. Documentation upload requires a password to
# https://api.gazebosim.org. The password is listed on the
# internal Open Robotics wiki. Set the GZ_VERSION_PASSWORD environment
Expand All @@ -22,46 +23,40 @@
# The distribution ID can be found on the internal wiki right near the
# GZ_VERSION_PASSWORD information

# Copy your s3 configuration to the local path so that docker can copy it.
s3cmd --dump-config > s3.cfg

# Build the docker container, which also uploads all documentation.
# We are using docker because a library's documentation links to other
# library documentation, and we want to guarantee a clean system.
if [[ $1 == 'acropolis' || $1 == 'Acropolis' ]]; then
echo -e "\e[46m\e[30mUploading documentation for Acropolis\e[0m\e[39m"
docker build -t ign-acropolis-docs -f Dockerfile.acropolis --build-arg GZ_VERSION_PASSWORD --build-arg GZ_VERSION_DATE=`date -Iseconds` --no-cache .
docker build -t gz-acropolis-docs -f Dockerfile.acropolis --build-arg GZ_VERSION_PASSWORD --build-arg GZ_VERSION_DATE=`date -Iseconds` --no-cache --build-arg AWS_ACCESS_KEY --build-arg AWS_SECRET_KEY .
fi

if [[ $1 == 'blueprint' || $1 == 'Blueprint' ]]; then
echo -e "\e[46m\e[30mUploading documentation for Blueprint\e[0m\e[39m"
docker build -t ign-blueprint-docs -f Dockerfile.blueprint --build-arg GZ_VERSION_PASSWORD --build-arg GZ_VERSION_DATE=`date -Iseconds` --no-cache .
docker build -t gz-blueprint-docs -f Dockerfile.blueprint --build-arg GZ_VERSION_PASSWORD --build-arg GZ_VERSION_DATE=`date -Iseconds` --no-cache --build-arg AWS_ACCESS_KEY --build-arg AWS_SECRET_KEY .
fi

if [[ $1 == 'all' || $1 == 'citadel' || $1 == 'Citadel' ]]; then
echo -e "\e[46m\e[30mUploading documentation for Citadel\e[0m\e[39m"
docker build -t ign-citadel-docs -f Dockerfile.citadel --build-arg GZ_VERSION_PASSWORD --build-arg GZ_VERSION_DATE=`date -Iseconds` --no-cache .
docker build -t gz-citadel-docs -f Dockerfile.citadel --build-arg GZ_VERSION_PASSWORD --build-arg GZ_VERSION_DATE=`date -Iseconds` --no-cache --build-arg AWS_ACCESS_KEY --build-arg AWS_SECRET_KEY .
fi

if [[ $1 == 'dome' || $1 == 'Dome' ]]; then
echo -e "\e[46m\e[30mUploading documentation for Dome\e[0m\e[39m"
docker build -t ign-dome-docs -f Dockerfile.dome --build-arg GZ_VERSION_PASSWORD --build-arg GZ_VERSION_DATE=`date -Iseconds` --no-cache .
docker build -t gz-dome-docs -f Dockerfile.dome --build-arg GZ_VERSION_PASSWORD --build-arg GZ_VERSION_DATE=`date -Iseconds` --no-cache --build-arg AWS_ACCESS_KEY --build-arg AWS_SECRET_KEY .
fi

if [[ $1 == 'edifice' || $1 == 'Edifice' ]]; then
echo -e "\e[46m\e[30mUploading documentation for Edifice\e[0m\e[39m"
docker build -t ign-edifice-docs -f Dockerfile.edifice --build-arg GZ_VERSION_PASSWORD --build-arg GZ_VERSION_DATE=`date -Iseconds` --no-cache .
docker build -t gz-edifice-docs -f Dockerfile.edifice --build-arg GZ_VERSION_PASSWORD --build-arg GZ_VERSION_DATE=`date -Iseconds` --no-cache --build-arg AWS_ACCESS_KEY --build-arg AWS_SECRET_KEY .
fi

if [[ $1 == 'all' || $1 == 'fortress' || $1 == 'Fortress' ]]; then
echo -e "\e[46m\e[30mUploading documentation for Fortress\e[0m\e[39m"
docker build -t ign-fortress-docs -f Dockerfile.fortress --build-arg GZ_VERSION_PASSWORD --build-arg GZ_VERSION_DATE=`date -Iseconds` --no-cache .
docker build -t gz-fortress-docs -f Dockerfile.fortress --build-arg GZ_VERSION_PASSWORD --build-arg GZ_VERSION_DATE=`date -Iseconds` --no-cache --build-arg AWS_ACCESS_KEY --build-arg AWS_SECRET_KEY .
fi

# Reminder to tic over cloudfront.
echo "WARNING"
echo " A CloudFront invalidation is required. Run the following command with the appropriate \$CLOUDFRONT_DISTRIBUTION_ID:\n"
echo " aws cloudfront create-invalidation --distribution-id \$CLOUDFRONT_DISTRIBUTION_ID --paths '/*'"

# Remove your s3 configuration
rm s3.cfg
6 changes: 3 additions & 3 deletions tools/scripts/build_gz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Command line parameters:
# 1 - GitHub organization name. For example gazebosim or osrf.
# 2 - the name of the Gazebo repository. For example gz-math.
# 3 - the name of the branch. For example ign-math6
# 3 - the name of the branch. For example gz-math7
# 4 - 'y' or 'n' without the quotes that indicate whether or not to upload docs
# 5 - Release date in the ISO 8601 format. See the command `date -Iseconds`.
# 6 - Password to https://api.gazebosim.org/1.0/versions.
Expand All @@ -17,7 +17,7 @@ echo ::group::Clone and make
git clone https://github.com/$1/$2 -b $3
cd $2

sudo apt -y install \
sudo DEBIAN_FRONTEND=noninteractive apt -y install \
$(sort -u $(find . -iname 'packages-'$SYSTEM_VERSION'.apt' -o -iname 'packages.apt' | grep -v '/\.git/') | tr '\n' ' ')

mkdir build
Expand All @@ -39,7 +39,7 @@ if [[ ! -z "$4" && "$4" != "n" ]]; then
version=`grep "project(.* VERSION" ../CMakeLists.txt | grep -oP "(?<=VERSION )[0-9]*.[0-9]*.[0-9]*"`

# Get the libName from the second parameter
libName=`echo "$2" | grep -oP "(?<=ign-).*"`
libName=`echo "$2" | grep -oP "(?<=gz-).*"`
libName="${libName//-/_}"

echo -e "\e[46m\e[30mAdding version [$version] for library [$libName], release date [$5]...\e[0m\e[39m"
Expand Down
13 changes: 10 additions & 3 deletions tools/scripts/install_common_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ sudo apt-get install -y \
pkg-config \
ruby-dev \
ruby-ronn \
s3cmd \
software-properties-common \
texlive-latex-base
software-properties-common

sudo curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
sudo unzip awscliv2.zip
sudo ./aws/install

# Configure AWS so that API docs can be uploaded to s3.
aws configure set aws_access_key_id $1
aws configure set aws_secret_access_key $2
aws configure set default.region us-east-1