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

ci: add TeamCity build script for post-merge algolia index updation #19315

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ebembi-crdb
Copy link
Contributor

Summary

This PR introduces a TeamCity build script that automates post-merge tasks for the main branch of the docs repository. The script performs the following steps:

  • Sets the site URL for production builds.
  • Installs dependencies using Bundler.
  • Builds the site using Jekyll with the appropriate configuration files.
  • Runs the Algolia indexing process to update search results.

Why This Change Is Needed

This is being done to decouple it from the netlify build

Notes

  • The script expects the PROD_ALGOLIA_API_KEY environment variable to be set in the build environment.
  • It is intended to run in the Internal / Cockroach / Post Merge / Docs TeamCity project.

Testing

  1. Ensure the script runs successfully in a local environment with the required dependencies and environment variables.
  2. Validate that the site builds correctly and the Algolia indexing process completes without errors.

Copy link

Files changed:

  • src/current/teamcity_algolia_production_build.sh

Copy link

netlify bot commented Jan 20, 2025

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit 0dbdf0e
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-interactivetutorials-docs/deploys/678e903a483545000851d3d6

Copy link

netlify bot commented Jan 20, 2025

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit 0dbdf0e
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-api-docs/deploys/678e903a8548850008c55e8c

Copy link

netlify bot commented Jan 20, 2025

Netlify Preview

Name Link
🔨 Latest commit 0dbdf0e
🔍 Latest deploy log https://app.netlify.com/sites/cockroachdb-docs/deploys/678e903a4a08ab00087a555e
😎 Deploy Preview https://deploy-preview-19315--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@mikeCRL mikeCRL left a comment

Choose a reason for hiding this comment

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

LGTM! Left a comment on a minor style choice from the old script, that we could change here - or leave as-is, to avoid any delay.

exit 1
fi

ALGOLIA_API_KEY=${PROD_ALGOLIA_API_KEY} ALGOLIA_LOG_LEVEL=debug bundle exec jekyll algolia --config _config_base.yml,_config_url.yml --builds-config _config_cockroachdb.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor nit, re. this line inherited from the old script.

For better readability, we could have the key and log level assignment on their own lines. (No downside in allowing them to persist for the 'rest of the script', as this is essentially the end of the script.)

Please feel free to merge as-is, though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants