--- /dev/null
+#!/bin/bash
+# vim: ts=4 sw=4 expandtab
+
+set -ex
+
+# did any doc/ files change?
+# If $GIT_COMMIT is a merge commit (it is usually, because that's how
+# we manage ceph, with PRs that include merges): noting the three dots,
+# this git diff invocation compares the common ancestor between first parent
+# (original state of the branch) to the second parent (the branch being merged
+# in) i.e., same as git diff $(git merge-base p1 p2) p2 and outputs filenames
+# only (--name-only).
+#
+# Skip this optimization for non-merge commits
+
+if git rev-parse --verify ${GIT_COMMIT}^2; then
+ # enclosing doublequotes prevent newlines from disappearing, for grep below
+ files="$(git diff --name-only ${GIT_COMMIT}^1...${GIT_COMMIT}^2)"
+ echo -e "changed files:\n$files"
+ if ! (echo "$files" | grep -sq '^doc/'); then
+ echo "No doc files changed, skipping build"
+ exit 0
+ fi
+fi
+
+./admin/build-doc
+
+REV="$(git rev-parse HEAD)"
+OUTDIR="docs.raw/sha1/$REV"
+mkdir -p $OUTDIR
+
+cp -a build-doc/output/html/* $OUTDIR
+
+# Log this $OUTDIR's sha1
+printf '%s\n' "$REV" >"$OUTDIR/sha1"
+
+# Symlink the branch name
+BRANCH=${GIT_BRANCH#*/}
+mkdir -p docs.raw/ref/
+ln -s ../sha1/$REV "docs.raw/ref/$BRANCH"
+
+# Publish this sha1's contents first:
+rsync -a -v docs.raw/sha1/$REV /var/docs.raw/sha1/
+# Now point the ref symlink at the newly-uploaded sha1.
+rsync -a -v docs.raw/ref/$BRANCH /var/docs.raw/ref/
--- /dev/null
+- job:
+ name: ceph-docs
+ node: docs
+ project-type: freestyle
+ defaults: global
+ quiet-period: 5
+ block-downstream: false
+ block-upstream: false
+ properties:
+ - build-discarder:
+ days-to-keep: 1
+ num-to-keep: 10
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: -1
+ - github:
+ url: https://github.com/ceph/ceph
+ discard-old-builds: true
+
+ triggers:
+ - github
+
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph
+ browser: auto
+ # The default is to build and publish every branch.
+ # Uncomment this for testing:
+ #branches:
+ # - 'origin/main'
+ skip-tag: true
+ timeout: 20
+ wipe-workspace: true
+
+ builders:
+ - shell:
+ !include-raw-verbatim: ../../build/build
+++ /dev/null
-#!/bin/bash
-# vim: ts=4 sw=4 expandtab
-
-set -ex
-
-# did any doc/ files change?
-# If $GIT_COMMIT is a merge commit (it is usually, because that's how
-# we manage ceph, with PRs that include merges): noting the three dots,
-# this git diff invocation compares the common ancestor between first parent
-# (original state of the branch) to the second parent (the branch being merged
-# in) i.e., same as git diff $(git merge-base p1 p2) p2 and outputs filenames
-# only (--name-only).
-#
-# Skip this optimization for non-merge commits
-
-if git rev-parse --verify ${GIT_COMMIT}^2; then
- # enclosing doublequotes prevent newlines from disappearing, for grep below
- files="$(git diff --name-only ${GIT_COMMIT}^1...${GIT_COMMIT}^2)"
- echo -e "changed files:\n$files"
- if ! (echo "$files" | grep -sq '^doc/'); then
- echo "No doc files changed, skipping build"
- exit 0
- fi
-fi
-
-./admin/build-doc
-
-REV="$(git rev-parse HEAD)"
-OUTDIR="docs.raw/sha1/$REV"
-mkdir -p $OUTDIR
-
-cp -a build-doc/output/html/* $OUTDIR
-
-# Log this $OUTDIR's sha1
-printf '%s\n' "$REV" >"$OUTDIR/sha1"
-
-# Symlink the branch name
-BRANCH=${GIT_BRANCH#*/}
-mkdir -p docs.raw/ref/
-ln -s ../sha1/$REV "docs.raw/ref/$BRANCH"
-
-# Publish this sha1's contents first:
-rsync -a -v docs.raw/sha1/$REV /var/docs.raw/sha1/
-# Now point the ref symlink at the newly-uploaded sha1.
-rsync -a -v docs.raw/ref/$BRANCH /var/docs.raw/ref/
+++ /dev/null
-- job:
- name: ceph-docs
- node: docs
- project-type: freestyle
- defaults: global
- quiet-period: 5
- block-downstream: false
- block-upstream: false
- properties:
- - build-discarder:
- days-to-keep: 1
- num-to-keep: 10
- artifact-days-to-keep: -1
- artifact-num-to-keep: -1
- - github:
- url: https://github.com/ceph/ceph
- discard-old-builds: true
-
- triggers:
- - github
-
- scm:
- - git:
- url: https://github.com/ceph/ceph
- browser: auto
- # The default is to build and publish every branch.
- # Uncomment this for testing:
- #branches:
- # - 'origin/main'
- skip-tag: true
- timeout: 20
- wipe-workspace: true
-
- builders:
- - shell:
- !include-raw-verbatim: ../../build/build