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

Add rebuild instructions #2865

Merged
merged 11 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from 9 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
20 changes: 18 additions & 2 deletions .github/actions/docs-preview/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,28 @@ runs:
const { REPO, PR, PREVIEW_PATH } = process.env

const comment = `A documentation preview will be available soon.
Help us out by validating the Buildkite preview and reporting issues [here](https://github.com/elastic/docs/issues/new?labels=buildkite-migration,bug).
Help us out by validating the Buildkite preview and reporting issues [here](https://github.com/elastic/docs/issues/new?labels=buildkite-migration,bug). Please also be sure to **double check all images to ensure they are correct** in the preview.

- 🔨 Buildkite [builds](https://buildkite.com/elastic/docs-build-pr/builds?meta_data[repo_pr]=${REPO}_${PR})
- 📚 HTML diff: [Buildkite](https://${REPO}_bk_${PR}.docs-preview.app.elstc.co/diff) - [Jenkins](https://${REPO}_${PR}.docs-preview.app.elstc.co/diff)
- 📙 Preview: [Buildkite](https://${REPO}_bk_${PR}.docs-preview.app.elstc.co/${PREVIEW_PATH}) - [Jenkins](https://${REPO}_${PR}.docs-preview.app.elstc.co/${PREVIEW_PATH})
- 🧪 [Buildkite vs Jenkins diff](https://github.com/elastic/built-docs/compare/${REPO}_bk_${PR}..${REPO}_${PR})`;
- 🧪 [Buildkite vs Jenkins diff](https://github.com/elastic/built-docs/compare/${REPO}_bk_${PR}..${REPO}_${PR})

<details>
<summary>Requesting new docs builds via comments</summary>

\`\`\`
run docs-build
run docs-build rebuild
run docs-build warnlinkcheck
run docs-build skiplinkcheck (takes precedence over the warnlinkcheck option)
buildkite test this
buildkite test this rebuild
buildkite test this warnlinkcheck
buildkite test this skiplinkcheck
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few thoughts here.

  1. Do we need to publicize both versions of the build commands? As I understand it, run docs-build * and buildkite test this * are identical. I think we should pick one set of commands to keep things simple.
  2. I'm not convinced we should publicize the warnlinkcheck and skiplinkcheck options. These really shouldn't be used by most folks as they'll break the doc build if you merge a PR with broken links. These are almost exclusively for members of the docs release team in emergency merge situations.
  3. I think we should explain the difference between run docs-build and run docs-build rebuild.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With that being said. My suggestion would be something like this:

        <details>
            <summary>Request a new doc build by commenting</summary>

            * Rebuild this PR: `run docs-build`
            * Rebuild this PR and all Elastic docs: `run docs-build rebuild`

            > [!NOTE]  
            > `run docs-build` is much faster than `run docs-build rebuild`. A `rebuild` should only be needed in 
            rare situations. If your PR continues to fail for an unknown reason, the doc build pipeline may be 
            broken. Elastic employees can check the pipeline status [here](https://buildkite.com/elastic/docs-build).
          </details>

Is this too much info?

\`\`\`
</details>
`;

github.rest.issues.createComment({
issue_number: PR,
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/doc-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: elastic/docs/.github/actions/docs-preview@master
- uses: elastic/docs/.github/actions/docs-preview@action-update
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repo: ${{ github.event.repository.name }}
preview-path: 'guide/en/observability/master/index.html'
pr: 2842
pr: 2865