From: Justin Pryzby Date: Mon, 28 Feb 2022 23:18:19 -0600 Subject: [PATCH 8/8] +html index file This allows linking to the artifacts from the last successful build. //freebsd ci-os-only: warnings --- .cirrus.yml | 4 ++-- src/tools/ci/copy-changed-docs | 39 ++++++++++++++++++++++++++++++++-- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 68b7229d117..e6f435b6981 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -27,23 +27,23 @@ env: PGCTLTIMEOUT: 120 # avoids spurious failures during parallel tests TEMP_CONFIG: ${CIRRUS_WORKING_DIR}/src/tools/ci/pg_ci_base.conf PG_TEST_EXTRA: kerberos ldap ssl load_balance # The commit that this branch is rebased on. There's no easy way to find this. # This does the right thing for cfbot, which always squishes all patches into a single commit. # And does the right thing for any 1-patch commits. # Patch series manually submitted to cirrus would benefit from setting this to the # number of patches in the series (or directly to the commit the series was rebased on). #BASE_COMMIT: HEAD~1 # For demo purposes: - BASE_COMMIT: HEAD~11 + BASE_COMMIT: HEAD~22 # What files to preserve in case tests fail on_failure_ac: &on_failure_ac log_artifacts: paths: - "**/*.log" - "**/*.diffs" - "**/regress_log_*" type: text/plain on_failure_meson: &on_failure_meson @@ -699,23 +699,23 @@ task: type: text/plain task: name: CompilerWarnings # To limit unnecessary work only run this once the SanityCheck # succeeds. This is particularly important for this task as we intentionally # use always: to continue after failures. Task that did not run count as a # success, so we need to recheck SanityChecks's condition here ... depends_on: SanityCheck - only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' + # only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' env: CPUS: 4 BUILD_JOBS: 4 # Use larger ccache cache, as this task compiles with multiple compilers / # flag combinations CCACHE_MAXSIZE: "1G" CCACHE_DIR: "/tmp/ccache_dir" LINUX_CONFIGURE_FEATURES: *LINUX_CONFIGURE_FEATURES diff --git a/src/tools/ci/copy-changed-docs b/src/tools/ci/copy-changed-docs index 1c921a8df6f..0efad386cca 100755 --- a/src/tools/ci/copy-changed-docs +++ b/src/tools/ci/copy-changed-docs @@ -1,29 +1,64 @@ #! /bin/sh # Copy HTML which differ between $old and $new into $outdir set -e old=$1 new=$2 outdir=$3 +branch=$CIRRUS_BRANCH # The index is large and changes often skippages="bookindex.html" mkdir "$outdir" cp "$new"/src/sgml/html/*.css "$new"/src/sgml/html/*.svg "$outdir" +# The index is useful to allow a static link (not specific to a cirrus run) to the artifacts for the most-recent, successful CI run for a branch +branchurl=https://api.cirrus-ci.com/v1/artifact/github/$CIRRUS_REPO_FULL_NAME/$CIRRUS_TASK_NAME/html_docs/html_docs/00-index.html?branch=$branch + +index="$outdir/00-index.html" +cat >"$index" < +Index of docs changed since: $BASE_COMMIT + + +

Index of docs changed since: $BASE_COMMIT

+