Sergey Rymsha GitHub Actions

Sergey Rymsha, Architect at Enonic, recently held a presentation where he discussed how Enonic has automated nearly everything possible using GitHub Actions.

Enonic operates a large number of repositories within its organization. Historically, we used a mix of tools like Travis, Drone, and other automation solutions.

However, since GitHub Actions became available, we have fully transitioned to using it for all our automation needs. Sergey explained the workflow and demonstrated how GitHub Actions have simplified complex processes across multiple repositories.

See the presentation:

Build, Test, and Release Enonic Apps Using GitHub Actions

The Core Workflow

Enonic’s basic GitHub Actions workflow revolves around three steps:

  1. Wait for a push event: Any code changes trigger the workflow.
  2. Build the application: Enonic’s applications and libraries are Gradle-based, so the workflow runs Gradle builds.
  3. Release if necessary: If a release is needed, the workflow generates a release page on GitHub, including a changelog.

This simple workflow is used across Enonic’s 250+ applications. To streamline this for every project, we utilize the .github repository—a shared repository in GitHub for storing workflows. For example, we have a shared workflow called "Enonic Gradle," which can be applied to any application with just a few clicks in the Actions tab.

Beyond these basics, the workflow also handles additional tasks, such as:

  • Collecting code coverage data.
  • Publishing TypeScript definitions for libraries to NPM.
  • Building Docker images for deployment in Kubernetes (used for projects like our XP Operator).

See also: Why choose Enonic's headless CMS when building a Next.js website »

Documentation Automation with DocGen

Sergey showcased another workflow called DocGen, which automates documentation updates for Enonic’s developer portal. Any changes made to the documentation files in the repository are detected, built into HTML using Asciidoc, and then published directly to the developer portal via a webhook.

This workflow uses a mix of open-source GitHub Actions, Java, Node.js, and Bash scripts. Additionally, GitHub’s Composite Actions feature allows for the bundling of multiple steps into a single reusable action, further simplifying the process.

Complex Workflows for Multi-Repository Projects

For larger projects, such as Enonic XP, which involves multiple interconnected repositories, Enonic employs more advanced workflows:

  • Integration testing across repositories: Changes in one repository (e.g., XP) trigger builds and tests in dependent repositories (e.g., Content Studio).
  • Multi-version support: Workflows are designed to handle multiple branches (e.g., XP 7.14 and XP 8) by using specific Gradle build files to ensure branch-specific builds.
  • UI testing: UI tests are run as part of the workflow, often taking up to 40 minutes. To optimize this, tests are split into parallel buckets, reducing overall runtime.

Additional Automation Use Cases

Sergey shared several other use cases for GitHub Actions at Enonic:

  1. Nightly server deployments: GitHub Actions automate deployments to our nightly server, connecting to Google Cloud and bootstrapping XP with XP Operator.
  2. Application deployments: For example, changes to "site-market" trigger deployment pipelines that run through development, QA, and production environments.
  3. Multi-architecture Docker images: Using third-party GitHub Actions, we build images that run on various architectures, including different versions of macOS.
  4. Releasing to Maven Central: Enonic’s libraries are now being published to Maven Central using GitHub Actions. While some manual steps remain, the process is largely automated.
  5. Go-based projects: Enonic has started using Go for some projects, leveraging its seamless integration with GitHub Actions.

Documentation and Accessibility

Enonic has made these workflows accessible and documented them on our developer portal. Developers working with Enonic can easily create pipelines by copying and configuring these pre-built workflows. With minimal effort, they can automate builds, deployments, and other tasks using GitHub Actions.

In summary, Enonic has embraced GitHub Actions as the backbone of our automation strategy, leveraging it to simplify workflows, streamline documentation updates, and manage multi-repository projects effectively. We will continue to explore and expand its capabilities across our growing ecosystem.

Guide to Composable CMS

Related blog posts

Get some more insights 🤓


Get started with Enonic! 🚀