Skip to content

Commit

Permalink
mobile: add CircleCI docs generation CI job (#24295)
Browse files Browse the repository at this point in the history
This is the CI job that's responsible for building the public website docs at https://envoymobile.io.

Commit Message: mobile: add CircleCI docs generation CI job
Additional Description: This is the CI job that's responsible for building the public website docs at https://envoymobile.io.
Risk Level: Low
Testing: In Envoy Mobile repo.
Docs Changes: Yes :)
Release Notes: None.
Platform Specific Features: Only relevant to mobile.

Part of #23758
Signed-off-by: JP Simard <jp@jpsim.com>
  • Loading branch information
jpsim authored Dec 1, 2022
1 parent 75b4d28 commit 937818c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
32 changes: 32 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: 2.1

executors:
ubuntu-build:
description: "A regular build executor based on ubuntu image"
docker:
- image: envoyproxy/envoy-build-ubuntu:0a02a76af5951bf7f4c7029c0ea6d29d96c0f682
# TODO(mattklein123): Get xlarge class enabled
resource_class: medium
working_directory: /source

jobs:
docs:
executor: ubuntu-build
steps:
- checkout
- run: mobile/docs/build.sh
- add_ssh_keys:
fingerprints:
- "33:78:4d:5c:bd:62:2e:43:9d:79:2c:3e:dc:45:c0:98"
- run: mobile/docs/publish.sh
- store_artifacts:
path: generated/docs

workflows:
version: 2
all:
jobs:
- docs:
filters:
tags:
only: /^v.*/
6 changes: 3 additions & 3 deletions mobile/docs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
set -e

# shellcheck disable=SC1091
. envoy/tools/shell_utils.sh
. tools/shell_utils.sh

# We need to set ENVOY_DOCS_VERSION_STRING and ENVOY_DOCS_RELEASE_LEVEL for Sphinx.
# We also validate that the tag and version match at this point if needed.

# Docs for release tags are reserved for vX.Y.Z versions.
# vX.Y.Z.ddmmyy do not publish tagged docs.
VERSION_NUMBER=$(cat VERSION)
VERSION_NUMBER=$(cat mobile/VERSION)
if [[ -n "$CIRCLE_TAG" ]] && [[ "${VERSION_NUMBER}" =~ ^[0-9]+\.[0-9]+\.[0-9]$ ]]
then
# Check the git tag matches the version number in the VERSION file.
if [ "v${VERSION_NUMBER}" != "${CIRCLE_TAG}" ]; then
echo "Given git tag does not match the VERSION file content:"
echo "${CIRCLE_TAG} vs $(cat VERSION)"
echo "${CIRCLE_TAG} vs $(cat mobile/VERSION)"
exit 1
fi
# Check the version_history.rst contains current release version.
Expand Down

0 comments on commit 937818c

Please sign in to comment.