Unverified Commit 8c5c720c authored by Todd Volkert's avatar Todd Volkert Committed by GitHub

Temporarily disable docset generation (#62386)

https://github.com/flutter/flutter/issues/60646
parent 39fa0020
......@@ -274,58 +274,18 @@ task:
- name: hostonly_devicelab_tests-3_last-linux
<< : *LINUX_SHARD_TEMPLATE
# This task populates `docs_cache`
- name: docs-linux # linux-only
only_if: "changesInclude('.cirrus.yml', 'dev/**', 'packages/flutter/**', 'packages/flutter_test/**', 'packages/flutter_drive/**', 'packages/flutter_localizations/**', 'packages/flutter_goldens/**', 'bin/**') || $CIRRUS_PR == ''"
environment:
# Empirically, as of October 2019, the docs-linux shard took about 30 minutes when run with
# 1 CPU and 4G of RAM. 2 CPUs reduced that to 20 minutes, more CPUs did not improve matters.
CPU: 2
USE_IN_MEMORY_DISK: true
docs_cache:
folder: dev/docs
fingerprint_script:
- echo "docs_${CIRRUS_CHANGE_IN_REPO}_${CIRRUS_BUILD_ID}"
script:
- ./dev/bots/docs.sh docs
# This task relies on `docs_cache` having been populated in `docs-linux`.
# It updates the cache with the docset gzip file it generates.
- name: docs_docset-linux # linux-only
only_if: "$CIRRUS_PR == ''"
depends_on:
- docs-linux
environment:
# TODO(tvolkert): optimize CPU and MEMORY settings once #60646 is resolved.
CPU: 2
CPU: 4
MEMORY: 8G
USE_IN_MEMORY_DISK: true
docs_cache:
folder: dev/docs
reupload_on_changes: true
fingerprint_script:
- echo "docs_${CIRRUS_CHANGE_IN_REPO}_${CIRRUS_BUILD_ID}"
script:
- ./dev/bots/docs.sh docset
# This task relies on an updated `docs_cache` from `docs_docset-linux`
- name: docs_deploy-linux # linux-only
only_if: "$CIRRUS_BRANCH == 'master' || $CIRRUS_BRANCH == 'stable'"
depends_on:
- docs-linux
- docs_docset-linux
environment:
USE_IN_MEMORY_DISK: true
# For uploading master docs to Firebase master branch staging site
FIREBASE_MASTER_TOKEN: ENCRYPTED[eb768d18798fdc5abfe09b224e1724c4d82831d715ccf90df2c79d618c317216cbd99493278361f6fe7948b409b603f0]
# For uploading stable docs to Firebase public live site
FIREBASE_PUBLIC_TOKEN: ENCRYPTED[37e8b82f167864cae9a3f4d2cf3f37dea331d9375c295327c45de524f6c588fa6f6d63e5784f10f6d43ce29689f36c92]
docs_cache:
folder: dev/docs
fingerprint_script:
- echo "docs_${CIRRUS_CHANGE_IN_REPO}_${CIRRUS_BUILD_ID}"
script:
- ./dev/bots/docs.sh deploy
- ./dev/bots/docs.sh
- name: customer_testing-linux
# environment:
......
......@@ -37,13 +37,6 @@ function script_location() {
echo "$(cd -P "$(dirname "$script_location")" >/dev/null && pwd)"
}
function assert_not_in_pr() {
if [[ -z "$CIRRUS_CI" || -n "$CIRRUS_PR" ]]; then
>&2 echo "The $COMMAND command can only be run in Cirrus for non-PR commits."
exit 1
fi
}
function generate_docs() {
# Install and activate dartdoc.
"$PUB" global activate dartdoc 0.32.1
......@@ -90,16 +83,9 @@ function create_docset() {
}
function deploy_docs() {
(cd "$FLUTTER_ROOT/dev/docs"; move_offline_into_place)
# Ensure google webmaster tools can verify our site.
cp "$FLUTTER_ROOT/dev/docs/google2ed1af765c529f57.html" "$FLUTTER_ROOT/dev/docs/doc"
# To help diagnose when things go wrong.
echo "Deploying the following files to Firebase:"
find "$FLUTTER_ROOT/dev/docs"
echo 'EOL'
case "$CIRRUS_BRANCH" in
master)
echo "$(date): Updating $CIRRUS_BRANCH docs: https://master-api.flutter.dev/"
......@@ -118,7 +104,7 @@ function deploy_docs() {
deploy 5 docs-flutter-dev
;;
*)
>&2 echo "The $COMMAND command cannot be run on the $CIRRUS_BRANCH branch."
>&2 echo "Docs deployment cannot be run on the $CIRRUS_BRANCH branch."
exit 1
esac
}
......@@ -132,13 +118,14 @@ function move_offline_into_place() {
mkdir -p doc/offline
mv flutter.docs.zip doc/offline/flutter.docs.zip
du -sh doc/offline/flutter.docs.zip
if [[ "$CIRRUS_BRANCH" == "stable" ]]; then
echo -e "<entry>\n <version>${FLUTTER_VERSION}</version>\n <url>https://api.flutter.dev/offline/flutter.docset.tar.gz</url>\n</entry>" > doc/offline/flutter.xml
else
echo -e "<entry>\n <version>${FLUTTER_VERSION}</version>\n <url>https://master-api.flutter.dev/offline/flutter.docset.tar.gz</url>\n</entry>" > doc/offline/flutter.xml
fi
mv flutter.docset.tar.gz doc/offline/flutter.docset.tar.gz
du -sh doc/offline/flutter.docset.tar.gz
# TODO(tvolkert): re-enable (https://github.com/flutter/flutter/issues/60646)
# if [[ "$CIRRUS_BRANCH" == "stable" ]]; then
# echo -e "<entry>\n <version>${FLUTTER_VERSION}</version>\n <url>https://api.flutter.dev/offline/flutter.docset.tar.gz</url>\n</entry>" > doc/offline/flutter.xml
# else
# echo -e "<entry>\n <version>${FLUTTER_VERSION}</version>\n <url>https://master-api.flutter.dev/offline/flutter.docset.tar.gz</url>\n</entry>" > doc/offline/flutter.xml
# fi
# mv flutter.docset.tar.gz doc/offline/flutter.docset.tar.gz
# du -sh doc/offline/flutter.docset.tar.gz
}
# So that users can run this script from anywhere and it will work as expected.
......@@ -148,8 +135,7 @@ SCRIPT_LOCATION="$(script_location)"
# then this line will need to as well.
FLUTTER_ROOT="$(dirname "$(dirname "$SCRIPT_LOCATION")")"
COMMAND="$1"
echo "$(date): Running docs.sh $COMMAND"
echo "$(date): Running docs.sh"
if [[ ! -d "$FLUTTER_ROOT" || ! -f "$FLUTTER_ROOT/bin/flutter" ]]; then
>&2 echo "Unable to locate the Flutter installation (using FLUTTER_ROOT: $FLUTTER_ROOT)"
......@@ -175,22 +161,11 @@ if [[ -d "$FLUTTER_PUB_CACHE" ]]; then
export PUB_CACHE="${PUB_CACHE:-"$FLUTTER_PUB_CACHE"}"
fi
case "$COMMAND" in
docs)
generate_docs
if [[ -n "$CIRRUS_CI" && -z "$CIRRUS_PR" ]]; then
(cd "$FLUTTER_ROOT/dev/docs"; create_offline_zip)
fi
;;
docset)
assert_not_in_pr
(cd "$FLUTTER_ROOT/dev/docs"; create_docset)
;;
deploy)
assert_not_in_pr
deploy_docs
;;
*)
>&2 echo "Usage: $0 {docs|docset|deploy}"
exit 1
esac
generate_docs
if [[ -n "$CIRRUS_CI" && -z "$CIRRUS_PR" ]]; then
(cd "$FLUTTER_ROOT/dev/docs"; create_offline_zip)
# TODO(tvolkert): re-enable (https://github.com/flutter/flutter/issues/60646)
# (cd "$FLUTTER_ROOT/dev/docs"; create_docset)
(cd "$FLUTTER_ROOT/dev/docs"; move_offline_into_place)
deploy_docs
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment