Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Automate your changelogs! Release Drafter

Automate your changelogs! Release Drafter

[Almost] nobody likes writing documentation, and same for the changelogs! So, can we automate them and improve both user and developer experiences? Of course!

We will review the Release Drafter - a handy changelog automation tool for those who use GitHub or GitHub Enterprise. It can be used as a GitHub Action and can easily generate changelog drafts, using pull requests and labels as a foundation. Many advanced features are included, e.g. text formatting and substitutions, semantic versioning support, and management at the organization level. So let’s take this tool and configure it for a project together!

During the presentation we will also review the changelog automation examples from WireMock, Testcontainers, Jenkins and other open source communities. Those examples just need copy and paste.

Oleg Nenashev

March 07, 2024
Tweet

More Decks by Oleg Nenashev

Other Decks in Technology

Transcript

  1. > whoami @oleg_nenashev oleg-nenashev Dr. Nenashev / Mr. Jenkins Developer

    tools hacker Community builder FOSS/DevRel consultant #RussiansAgainstPutin #StandWithUkraine
  2. My Open [and not so] Communities Time * Once a

    contributor, [almost] always a contributor
  3. Takeaways 6 • Automate changelog drafts • There are tools

    for pull requests, not just [conventional?] commits • Release Drafter • Add tools to your release Pipeline
  4. • jenkins.io • CHANGELOG.md / Wiki • GitHub Releases •

    Changelogs elsewhere • No changelogs Changelogs in Jenkins 10
  5. 11

  6. • jenkins.io • CHANGELOG.md / Wiki • GitHub Releases •

    Changelogs elsewhere • No changelogs Changelogs in Jenkins 17
  7. 18

  8. • jenkins.io ⇔ GitHub Releases • Jenkins Wiki • CHANGELOG.md

    on GitHub ⇔ (often) GitHub Releases • GitHub Releases • Changelogs elsewhere • No changelogs In Jenkins… 19
  9. 21 • Created by Tim Lucas, @toolmantim • Co-maintained by

    Joseph Petersen, @jetersen • GitHub Releases & Markdown • Based on the Probot & GitHub Actions • **Very** flexible, not just a semver • Pull requests, not [not so?] Conventional Commits GitHub: release-drafter/release-drafter
  10. 22 • Powered by pull request titles and labels •

    If needed, Maintainers edit PR titles and labels before the merge (or release) • No reliance on commit history by default github.com/gradle/gradle-profiler/pulls? q=is%3Apr+is%3Aclosed
  11. 23 • Release Drafter generates changelog drafts • Most likely

    you’ll have to copy-edit the drafts before the release github.com/gradle/gradle-profiler/releases
  12. 25 • You publish the release • Manual or automatic,

    depends on your Pipeline • Assets & Co can be attached to the draft too wiremock/wiremock-testcontainers-go/rel eases/tag/v1.0.0-alpha-7
  13. • Uses Probot Config engine, powered by deepmerge • Global

    config repo: https://github.com/jenkinsci/.github • Minimal configuration in repositories Inheritance! 32
  14. Variables for injection into the code/configurations Output variables for subsequent

    GitHub Actions Automatic resolution in the drafts Version resolvers 35
  15. 1.0-alpha-1 bit.ly/faascinator 🚀 New features and improvements • Initial implementation,

    powered by Quarkus and picocli • Support running the CLI commands via "/" endpoint • Support for printing help via the "/help" endpoint • Configure target JAR and main class via runtime properties • Docker images, based on AdoptOpenJDK 11 Hotspot 📝 Documentation updates • Initial docs: Overview, Quick Start, and Usage Guide • First "Current Time” demo for local and Docker runs • Create Contributor Guide 👻 Maintenance • Add continuous integration for the project • Enable continuous delivery of Docker images to ghrc.io • Release tagged versions of Docker images
  16. 4 years with Release Drafter in Jenkins • Almost all

    development tools use Release Drafter • Global configuration by default in templates/archetypes • 500+ plugins use Release drafter • 6 contributors to Release Drafter from Jenkins 44
  17. • jenkins.io ⇔ GitHub Releases • Jenkins Wiki • CHANGELOG.md

    on GitHub • GitHub Releases • Changelogs elsewhere • No changelogs In Jenkins… 45
  18. Takeaways • Use changelog automation • Make them a part

    of your release Pipeline • Consider Release Drafter for a custom development Pipeline • There are other tools, esp. for integrated releases or Conventional commits: JReleaser, Git Cliff
  19. Global configurations / projects • Jenkins: jenkinsci/.github/blob/master/.github/release-drafter.adoc https://github.com/jenkinsci/.github/blob/master/.github/release-drafter.yml • WireMock:

    https://github.com/wiremock/.github/blob/main/.github/release-drafter.yml Local configurations: • testcontainers/testcontainers-java • oleg-nenashev/testcontainers-c Examples 49